mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(anthropic.py): bug fix
This commit is contained in:
parent
e892fc99a3
commit
d620b4dc5d
2 changed files with 3 additions and 3 deletions
|
|
@ -270,8 +270,8 @@ def completion(
|
|||
streaming_model_response.choices[0].finish_reason = model_response.choices[
|
||||
0
|
||||
].finish_reason
|
||||
# streaming_model_response.choices = [litellm.utils.StreamingChoices()]
|
||||
streaming_model_response.choices[0].index = model_response.choices[0].index
|
||||
streaming_model_response.choices = [litellm.utils.StreamingChoices()]
|
||||
_tool_calls = []
|
||||
print_verbose(
|
||||
f"type of model_response.choices[0]: {type(model_response.choices[0])}"
|
||||
|
|
|
|||
|
|
@ -480,12 +480,12 @@ class ModelResponse(OpenAIObject):
|
|||
object=None,
|
||||
system_fingerprint=None,
|
||||
usage=None,
|
||||
stream=False,
|
||||
stream=None,
|
||||
response_ms=None,
|
||||
hidden_params=None,
|
||||
**params,
|
||||
):
|
||||
if stream:
|
||||
if stream is not None and stream == True:
|
||||
object = "chat.completion.chunk"
|
||||
choices = [StreamingChoices()]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue