mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-10 03:37:51 +02:00
Allow non-dict output
This commit is contained in:
+5
-1
@@ -202,7 +202,11 @@ class PubSub(Serializable, Runnable[Any, Any], ABC):
|
||||
run_manager.on_chain_error(exceptions[0])
|
||||
raise exceptions[0]
|
||||
else:
|
||||
run_manager.on_chain_end(final_output)
|
||||
run_manager.on_chain_end(
|
||||
final_output
|
||||
if isinstance(final_output, dict)
|
||||
else {"output": final_output}
|
||||
)
|
||||
|
||||
|
||||
PubSub.update_forward_refs()
|
||||
|
||||
Reference in New Issue
Block a user