-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpt-4-turbo-2024-04-09 tools agent error #5078
Comments
The error message you're encountering, "Unknown parameter: 'messages[1].tool_calls[0].index'", suggests there's a mismatch between the parameters being passed to To address this issue, you should:
Regarding the structure and parameters for the If these steps do not resolve your issue, further investigation with detailed error logs and how your implementation interacts with Sources
|
It seems that the fix in langchain was approved and has been merged: langchain-ai/langchain#20271. Waiting now for it to adapt in langchainjs. Thank you. |
Thanks, will have a look! |
Hmm I'm actually not able to repro - did OpenAI maybe patch on their end? https://smith.langchain.com/public/4c7bc175-c9a5-4f2d-bd67-1ecabc03fc6d/r Here's my code: const tools = [new TavilySearchResults({ maxResults: 1 })];
const prompt = await pull<ChatPromptTemplate>("hwchase17/openai-tools-agent");
const llm = new ChatOpenAI({
model: "gpt-4-turbo-2024-04-09",
temperature: 0,
});
const agent = await createOpenAIToolsAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({
agent,
tools,
});
const input = "Who is the current prime minister of Malaysia?";
const result = await agentExecutor.invoke({
input,
}); Could someone else verify? |
Hi @jacoblee93 thank you for looking into it. It seems that it resolved itself after the changes in Tested also with |
Upgrade @langchain/openai to 0.0.28 works fine, thanks. |
I don't think we changed anything but glad it's working! |
Yes. I checked and it seems to have been patched on the OpenAI side. |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
{
message: '{\n' +
' "error": {\n' +
"message": "Unknown parameter: 'messages[1].tool_calls[0].index'.",\n
+' "type": "invalid_request_error",\n' +
' "param": "messages[1].tool_calls[0].index",\n' +
' "code": "unknown_parameter"\n' +
' }\n' +
'}',
code: 400
}
Description
It should be the same error as this one. langchain-ai/langchain#20264
System Info
The text was updated successfully, but these errors were encountered: