mirror of
https://github.com/lanqian528/chat2api.git
synced 2026-06-13 21:02:46 +08:00
v1.4.1 fix bugs
This commit is contained in:
parent
ec974f2503
commit
73b8e2b165
@ -64,6 +64,7 @@ async def process(request_data, req_token):
|
||||
res = await chat_service.send_conversation()
|
||||
return chat_service, res
|
||||
|
||||
|
||||
@app.post(f"/{api_prefix}/v1/chat/completions" if api_prefix else "/v1/chat/completions")
|
||||
async def send_conversation(request: Request, req_token: str = Depends(oauth2_scheme)):
|
||||
try:
|
||||
|
||||
@ -133,7 +133,7 @@ async def stream_response(service, response, model, max_tokens):
|
||||
system_fingerprint_list = model_system_fingerprint.get(model, None)
|
||||
system_fingerprint = random.choice(system_fingerprint_list) if system_fingerprint_list else None
|
||||
created_time = int(time.time())
|
||||
completion_tokens = -1
|
||||
completion_tokens = 0
|
||||
len_last_content = 0
|
||||
len_last_citation = 0
|
||||
last_message_id = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user