remove response field of completions api

This commit is contained in:
josc146 2023-07-29 19:20:43 +08:00
parent 3ef22239eb
commit aecacde819

View File

@ -127,7 +127,7 @@ async def eval_rwkv(
"object": "chat.completion.chunk" "object": "chat.completion.chunk"
if chat_mode if chat_mode
else "text_completion", else "text_completion",
"response": response, # "response": response,
"model": model.name, "model": model.name,
"choices": [ "choices": [
{ {
@ -165,7 +165,7 @@ async def eval_rwkv(
"object": "chat.completion.chunk" "object": "chat.completion.chunk"
if chat_mode if chat_mode
else "text_completion", else "text_completion",
"response": response, # "response": response,
"model": model.name, "model": model.name,
"choices": [ "choices": [
{ {
@ -186,7 +186,7 @@ async def eval_rwkv(
else: else:
yield { yield {
"object": "chat.completion" if chat_mode else "text_completion", "object": "chat.completion" if chat_mode else "text_completion",
"response": response, # "response": response,
"model": model.name, "model": model.name,
"usage": { "usage": {
"prompt_tokens": prompt_tokens, "prompt_tokens": prompt_tokens,