mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-31 03:59:25 +00:00
Update check (#6020)
We were assigning the name as None in on_chat_model_start then not updating, resulting in a validation error.
This commit is contained in:
parent
18af149e91
commit
a197acfcd3
@ -53,7 +53,6 @@ class LangChainTracer(BaseTracer):
|
||||
execution_order = self._get_execution_order(parent_run_id_)
|
||||
chat_model_run = Run(
|
||||
id=run_id,
|
||||
name=serialized.get("name"),
|
||||
parent_run_id=parent_run_id,
|
||||
serialized=serialized,
|
||||
inputs={"messages": [messages_to_dict(batch) for batch in messages]},
|
||||
|
@ -123,7 +123,7 @@ class Run(RunBase):
|
||||
@root_validator(pre=True)
|
||||
def assign_name(cls, values: dict) -> dict:
|
||||
"""Assign name to the run."""
|
||||
if "name" not in values:
|
||||
if values.get("name") is None:
|
||||
if "name" in values["serialized"]:
|
||||
values["name"] = values["serialized"]["name"]
|
||||
elif "id" in values["serialized"]:
|
||||
|
Loading…
Reference in New Issue
Block a user