Skip to content

About

This repository contains code examples and an implementation for building a streaming text generation interface using Server-Sent Events (SSE) in Golang. SSE is a lightweight protocol for real-time communication over HTTP, ideal for scenarios like Large Language Model (LLM) interfaces.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Streaming Text Generation with SSE in Golang

This repository contains code and examples for implementing a streaming text generation interface using Server-Sent Events (SSE) in Golang.

Directory Structure

  • exponential-distribution-plot: Contains a Python script for generating a plot of the exponential distribution used for simulating word generation intervals.
  • simple-example: A simple Golang example demonstrating basic SSE functionality with an HTML client.
  • final-implementation: The final Golang implementation with simulated word generation.

How to Use

Each directory contains its own README.md with instructions on how to run the code within that directory.

Blog Post

For a detailed explanation and context, please refer to the blog post: Streaming Text Generation with SSE in Golang

About

This repository contains code examples and an implementation for building a streaming text generation interface using Server-Sent Events (SSE) in Golang. SSE is a lightweight protocol for real-time communication over HTTP, ideal for scenarios like Large Language Model (LLM) interfaces.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages