Skip to content

Error: Object of type CallbackManagerForToolRun is not JSON serializable in LangGraph_03_MultiAgent_With_Supervisor.ipynb #1

@araujo-alexdias

Description

@araujo-alexdias

When I run this block of code it gives me this:
for s in graph.stream(
{
"messages": [
HumanMessage(content="Code hello world and print it to the terminal")
]
}
):
if "end" not in s:
print(s)
print("----")
this error below:

{'supervisor': {'next': 'Coder'}}

WARNING:langchain_experimental.utilities.python:Python REPL can execute arbitrary code. Use with caution.

TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 for s in graph.stream(
2 {
3 "messages": [
4 HumanMessage(content="Code hello world and print it to the terminal")
5 ]

35 frames
/usr/lib/python3.10/json/encoder.py in default(self, o)
177
178 """
--> 179 raise TypeError(f'Object of type {o.class.name} '
180 f'is not JSON serializable')
181

TypeError: Object of type CallbackManagerForToolRun is not JSON serializable

any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions