-
Notifications
You must be signed in to change notification settings - Fork 365
Open
Description
I am using Supervisor complied graph in Python like this
workflow = create_supervisor(
[agent_add, agent_subtract, agent_multiply],
model=ChatOpenAI(model="gpt-4o", temperature=0.2),
prompt=supervisor_prompt,
)
graph = workflow.compile()
this is exposed via langgraph.json to frontend
{
"dependencies": ["."],
"graphs": {
"supervisor": "./agents/supervisor.py:graph"
},
"env": ".env"
}
But I am struggling on how to enable custom message streaming from Tools called vai subgraph / agents to main chat UI. I suspect I am not sending subgraph = true for streaming from subgraph but not sure where to configure this in my case?
Already tried passing it hear
const handleSubmitEdit = () => {
setIsEditing(false);
const newMessage: Message = { type: "human", content: value };
thread.submit(
{ messages: [newMessage] },
{
checkpoint: parentCheckpoint,
streamMode: ["values"],
**// @ts-ignore
subgraphs: true,**
optimisticValues: (prev) => {
const values = meta?.firstSeenState?.values;
if (!values) return prev;
return {
...values,
messages: [...(values.messages ?? []), newMessage],
};
},
},
);
};
but no luck, anyone knows?
privetin
Metadata
Metadata
Assignees
Labels
No labels