lm-sys / lm-sys/FastChat

Why has the chat interface/v1/chat/completions been modified to serial

Open
#2,345 0 comments 1 reaction 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

In previous versions of Git, the chat interface /v1/chat/completions was tested. By outputting logs, it was found that when multiple threads called this interface, the logs immediately output information, proving that multiple threads had called and entered this interface. The resulting lag was due to the lag in the response generated by the large model when FastChat called the chat interface of the large model. However, the interface/v1/chat/completions did not intercept any requests. In the current version of Git, multithreaded calls to the/v1/chat/completions interface require a response from one thread before another thread can access the interface. Is there a serial restriction on this interface? What is the purpose and purpose of doing so?

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 by tracing the current /v1/chat/completions request handling and compare it with the earlier version described in the issue. Reproduce concurrent calls while inspecting logs to determine where serialization occurs; done means documenting whether the restriction is intentional, its purpose, and the relevant behavior or fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.