mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 20:28:10 +00:00
wip
This commit is contained in:
parent
22863b8ac3
commit
47b386d28f
@ -777,6 +777,8 @@ class BaseChatOpenAI(BaseChatModel):
|
||||
):
|
||||
message = response.choices[0].message # type: ignore[attr-defined]
|
||||
if hasattr(message, "parsed"):
|
||||
generations[0].message.parsed = message.parsed
|
||||
# For backwards compatibility.
|
||||
generations[0].message.additional_kwargs["parsed"] = message.parsed
|
||||
if hasattr(message, "refusal"):
|
||||
generations[0].message.additional_kwargs["refusal"] = message.refusal
|
||||
|
Loading…
Reference in New Issue
Block a user