Skip to content

Commit

Permalink
v1.4.1 fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lanqian528 committed Aug 10, 2024
1 parent ec974f2 commit 73b8e2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions chat2api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion chatgpt/chatFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73b8e2b

Please sign in to comment.