fix: new OpenAi api

This commit is contained in:
theluyuan 2024-06-12 21:46:14 +08:00
parent 5e5f21f90e
commit 250752c620

View File

@ -171,12 +171,15 @@ async def eval_rwkv(
),
# "response": response,
"model": model.name,
"id": "chatcmpl-123",
"system_fingerprint": "fp_44709d6fcb",
"choices": [
(
{
"delta": {"content": delta},
"delta": {"role":Role.Assistant.value,"content": delta},
"index": 0,
"finish_reason": None,
"logprobs":None
}
if chat_mode
else {
@ -218,11 +221,14 @@ async def eval_rwkv(
),
# "response": response,
"model": model.name,
"id": "chatcmpl-123",
"system_fingerprint": "fp_44709d6fcb",
"choices": [
(
{
"delta": {},
"index": 0,
"logprobs": None,
"finish_reason": "stop",
}
if chat_mode