You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I cloned the repo as is and ran it in langgraph studio with the example in the README. It seems to always come up with the "Unsatisfactory response"
After a bunch of logging and digging into the code, it seems like the info variable is always undefined or just shows up as {} in the log and never ends up structuring the output per the extraction schema, which is strange since it seems to work perfectly in the python version and at every stage of the relevant tool call it pulls out information per the extraction schema.
Here is the section of the code where I think the issue lies
console.error("Response Messages", responseMessages )
// If the model has collected enough information to fill uot
// the provided schema, great! It will call the "Info" tool
// We've decided to track this as a separate state variable
let info;
if ((response?.tool_calls && response.tool_calls?.length) || 0) {
for (const tool_call of response.tool_calls || []) {
if (tool_call.name === "Info") {
info = tool_call.args;
// If info was called, the agent is submitting a response.
// (it's not actually a function to call, it's a schema to extract)
// To ensure that the graph doesn'tend up in an invalid state
// (where the AI has called tools but no tool message has been provided)
// we will drop any extra tool_calls.
response.tool_calls = response.tool_calls?.filter(
(tool_call) => tool_call.name === "Info",
);
console.error("Info in tool calls",tool_call)
console.error("Response in tool calls",response.tool_calls)
break;
}
}
} else {
// If LLM didn't respect the tool_choice
responseMessages.push(
new HumanMessage("Please respond by calling one of the provided tools."),
);
}
console.error("info ", info)
Here is the screenshot of the output where I can see this issue
The text was updated successfully, but these errors were encountered:
So I cloned the repo as is and ran it in langgraph studio with the example in the README. It seems to always come up with the "Unsatisfactory response"
After a bunch of logging and digging into the code, it seems like the info variable is always undefined or just shows up as {} in the log and never ends up structuring the output per the extraction schema, which is strange since it seems to work perfectly in the python version and at every stage of the relevant tool call it pulls out information per the extraction schema.
Here is the section of the code where I think the issue lies
Here is the screenshot of the output where I can see this issue
The text was updated successfully, but these errors were encountered: