Update check (#6020)

We were assigning the name as None in on_chat_model_start then not
updating, resulting in a validation error.
searx_updates
Zander Chase 11 months ago committed by GitHub
parent 18af149e91
commit a197acfcd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save