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
I tried to use the new meta-llama/llama-3-3-70b-instruct model with langchain-ibm and got a somewhat odd behaviour when I use tool binding: even though I set tool_choice='auto', the model tried to use the tool in an obvious case where the tool should not be called.
def multiply(a: int, b: int) -> int:
"""Multiply a and b.
Args:
a: first int
b: second int
"""
return a * b
tool_calling_model = get_chat_model() # llama3-3 ChatWatsonx
llm_with_tools = tool_calling_model.bind_tools([multiply],tool_choice="auto" )
result = llm_with_tools.invoke("Hello")
print(result)
The reply from the model is: content='The provided functions are insufficient for me to answer the question.' additional_kwargs={} response_metadata={'token_usage': ....}
It would be odd for the model to decide to call completely unrelated tool for a relatively easy prompt, so maybe there's an issue with how tool_choice is handled.
My code uses the latest versions of langchain-ibm and ibm_watson_ai.
langchain-ibm==0.3.5
ibm_watsonx_ai==1.1.25
thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I tried to use the new
meta-llama/llama-3-3-70b-instruct
model with langchain-ibm and got a somewhat odd behaviour when I use tool binding: even though I set tool_choice='auto', the model tried to use the tool in an obvious case where the tool should not be called.The reply from the model is:
content='The provided functions are insufficient for me to answer the question.' additional_kwargs={} response_metadata={'token_usage': ....}
It would be odd for the model to decide to call completely unrelated tool for a relatively easy prompt, so maybe there's an issue with how
tool_choice
is handled.My code uses the latest versions of langchain-ibm and ibm_watson_ai.
langchain-ibm==0.3.5
ibm_watsonx_ai==1.1.25
thanks!
The text was updated successfully, but these errors were encountered: