Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP streaming support for JetStream #877

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vivianrwu
Copy link
Collaborator

Example snippet of streamed responses with respective full response for

curl --request POST --header "Content-type: application/json" -s localhost:8000/generate --data '{
    "prompt": "What are the top 5 programming languages ",
    "max_tokens": 100,
    "stream": true
}'
b'{\n    "id": "generate-b1f2ac51319944658db3f65560881067",\n    "time_created": 1731094258.4464087,\n    "text": "\\n"\n}'
b'{\n    "id": "generate-2670cd56a9ef40d697c25959d1d46d31",\n    "time_created": 1731094258.4621747,\n    "text": "\\n"\n}'
b'{\n    "id": "generate-be55c20ad9914364813738c842e84ce6",\n    "time_created": 1731094258.4723089,\n    "text": "for"\n}'
b'{\n    "id": "generate-dfcc3e724129453c936d4bb24b892310",\n    "time_created": 1731094258.4828267,\n    "text": " data"\n}'
b'{\n    "id": "generate-c5b3879d27c9479091412ac34ea38e9d",\n    "time_created": 1731094258.492773,\n    "text": " science"\n}'
b'{\n    "id": "generate-174ac5c04b2d40aa92f0685e0bb333ea",\n    "time_created": 1731094258.5034208,\n    "text": " in"\n}'
...
['\n\nfor data science in 2023?\n\n1. Python\n2. R\n3. SQL\n4. Java\n5. Scala\n\n**Explanation:**\n\n* **Python** is a popular choice for data science due to its ease of use, extensive libraries, and wide community.\n* **R** is a powerful statistical language widely used for data analysis, visualization, and modeling.\n* **SQL** is a widely-used language for data querying and manipulation.']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant