fix(thread-data): guard runtime.context None on line 110
This commit is contained in:
1 parent
ad5bd22c5e
commit
5b5e4f8ff0
1 file changed
+1
-1
+1
-1
@@ -107,7 +107,7 @@ class ThreadDataMiddleware(AgentMiddleware[ThreadDataMiddlewareState]):
|
||||
content=last_message.content,
|
||||
id=last_message.id,
|
||||
name=last_message.name,
|
||||
additional_kwargs={**last_message.additional_kwargs, "run_id": runtime.context.get("run_id"), "timestamp": datetime.now(UTC).isoformat()},
|
||||
additional_kwargs={**last_message.additional_kwargs, "run_id": (runtime.context or {}).get("run_id"), "timestamp": datetime.now(UTC).isoformat()},
|
||||
)
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user