mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-10 06:14:58 +00:00
[update] support openai chat completion api
This commit is contained in:
parent
63b1c8525b
commit
299c4dca64
8 changed files with 166 additions and 83 deletions
|
@ -142,7 +142,7 @@ class ThreadContext:
|
|||
yield reply_message.stream_response_with_event(MessageObject.Status.in_progress)
|
||||
yield self.run.stream_response_with_event(RunObject.Status.in_progress)
|
||||
|
||||
async for token in self.interface.inference(local_messages,self.thread.id):
|
||||
async for token, finish_reason in self.interface.inference(local_messages,self.thread.id):
|
||||
if self.run.status == RunObject.Status.cancelling:
|
||||
logger.warn(f'Run {self.run.id} cancelling')
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue