mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-09 13:55:27 +00:00
Merge branch 'main' into temperature_top_p_from_request
This commit is contained in:
commit
26f7b4af11
54 changed files with 1573 additions and 159 deletions
|
@ -25,6 +25,9 @@ async def chat_completion(request:Request,create:ChatCompletionCreate):
|
|||
|
||||
input_message = [json.loads(m.model_dump_json()) for m in create.messages]
|
||||
|
||||
if Config().api_key != '':
|
||||
assert request.headers.get('Authorization', '').split()[-1] == Config().api_key
|
||||
|
||||
if create.stream:
|
||||
async def inner():
|
||||
chunk = ChatCompletionChunk(id=id,object='chat.completion.chunk',created=int(time()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue