Remove message.content from openai streaming API (#5503)

This commit is contained in:
Kevin Pham 2024-02-19 13:50:27 -08:00 committed by GitHub
parent 0b2279d031
commit 10df23efb7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -297,8 +297,6 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) -
resp_list: [{ resp_list: [{
"index": 0, "index": 0,
"finish_reason": None, "finish_reason": None,
# So yeah... do both methods? delta and messages.
"message": {'role': 'assistant', 'content': content},
"delta": {'role': 'assistant', 'content': content}, "delta": {'role': 'assistant', 'content': content},
}], }],
} }