mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-10 15:29:39 +00:00
fix: object type for non-streaming response
This commit is contained in:
parent
6d45871de8
commit
584c7d5639
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ async def chat_completion(request:Request,create:ChatCompletionCreate):
|
|||
yield chunk
|
||||
return chat_stream_response(request,inner())
|
||||
else:
|
||||
comp = ChatCompletionObject(id=id,object='chat.completion.chunk',created=int(time()))
|
||||
comp = ChatCompletionObject(id=id,object='chat.completion',created=int(time()))
|
||||
comp.usage = Usage(completion_tokens=1, prompt_tokens=1, total_tokens=2)
|
||||
async for token in interface.inference(input_message,id):
|
||||
comp.append_token(token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue