exo icon indicating copy to clipboard operation
exo copied to clipboard

concurrent execution of chatgpt_api.py handle_post_chat_completions produce chaos

Open liaoweiguo opened this issue 1 year ago • 3 comments

any hints?

liaoweiguo avatar Feb 12 '25 08:02 liaoweiguo

streaming mode

liaoweiguo avatar Feb 12 '25 08:02 liaoweiguo

没办法,强制单线程先:

  async def handle_post_chat_completions(self, request):
    async with self._lock:
      data = await request.json()
      if DEBUG >= 2: print(f"[ChatGPTAPI] Handling chat completions request from {request.remote}: {data}")
      stream = data.get("stream", False)

liaoweiguo avatar Feb 12 '25 09:02 liaoweiguo

I've also appeared

d6638219 avatar Feb 13 '25 10:02 d6638219

Should be fixed in 1.0!

Evanev7 avatar Dec 18 '25 20:12 Evanev7