mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
test -self.received_finish_reason = response_obj["finish_reason"]
This commit is contained in:
parent
f1777dbe3d
commit
4290e04e4f
1 changed files with 2 additions and 1 deletions
|
|
@ -1204,7 +1204,7 @@ class CustomStreamWrapper:
|
|||
if response_obj is None:
|
||||
return
|
||||
completion_obj["content"] = response_obj["text"]
|
||||
self.received_finish_reason = response_obj.get("finish_reason", None)
|
||||
self.intermittent_finish_reason = response_obj.get("finish_reason", None)
|
||||
if response_obj["is_finished"]:
|
||||
if response_obj["finish_reason"] == "error":
|
||||
raise Exception(
|
||||
|
|
@ -1212,6 +1212,7 @@ class CustomStreamWrapper:
|
|||
self.custom_llm_provider, response_obj
|
||||
)
|
||||
)
|
||||
self.received_finish_reason = response_obj["finish_reason"]
|
||||
if response_obj.get("original_chunk", None) is not None:
|
||||
if hasattr(response_obj["original_chunk"], "id"):
|
||||
model_response = self.set_model_id(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue