lm-sys / lm-sys/FastChat

fastchat.serve.openai_api_server doesn't work with `stream=true` parameter

Open
#3,307 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to get FastChat working on https://github.com/open-webui/open-webui via it's option to accept OpenAI compatible endpoints. TabbyAPI seems to be able to serve OpenAI API format with streaming/chunking. FastChat doesn't seem to support.

I've install Exllamav2 and confirmed API works well

python3 -m fastchat.serve.controller --host 0.0.0.0 --port 21001

python3 -m fastchat.serve.model_worker --model-path ~/model/Llama-3-8B-Instruct-262k-8.0bpw-h6-exl2 --enable-exllama

python3 -m fastchat.serve.openai_api_server --host 0.0.0.0 --port 8000

Works fine w/o "stream": true
no_stream_option

Issue

Errors with "stream": true
stream_true

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the fastchat.serve.openai_api_server entry point and reproduce the reported commands using an OpenAI-compatible request with "stream": true. Compare it with the working non-streaming request and use the resulting error output to define completion: streaming responses should work through the OpenAI-compatible endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.