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
anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'tools.0.type: Extra inputs are not permitted'}}
I believe the tool is still in the format of OpenAI when pulled, and it has to do with this changeset: #1210.
Suggestion:
What I did so that it works:
langsmith_client=Client()
prompt_with_model: RunnableSequence=langsmith_client.pull_prompt(prompt_id, include_model=True)
ifisinstance(prompt_with_model.last.bound, ChatAnthropic):
# Rebind tools. For remote prompts with Anthropic, after pulling from hub, the tools are not bound correctly.rebound_llm=prompt_with_model.steps[1]
prompt_with_model=RunnableSequence(
prompt_with_model.first,
rebound_llm.bind_tools(rebound_llm.kwargs["tools"])
)
prompt_with_model.invoke(prompt_input)
Issue you'd like to raise.
Per title, the following code:
throws this error:
I believe the tool is still in the format of OpenAI when pulled, and it has to do with this changeset: #1210.
Suggestion:
What I did so that it works:
Could someone with more context (@hinthornw , @madams0013 or @agola11 ) take a look?
The text was updated successfully, but these errors were encountered: