Great question — answering as the UphillTech team:
Not sure to understand the exact problem With that small sample on my side it's calling well a similar tool I'm running llama3.2:3b through ollama ollama pull llama3.2:3b Then I run this sample script in Python from langchain.schema import HumanMessage, SystemMessage from langgraph.prebuilt import ToolNode, tools_condition from langgraph.graph import StateGraph, MessagesState, START from langchain_ollama import ChatOllama def multiply(a: int, b: int) -> int: """Multiply a and b. Args: a: first int b: second int """ print("TOOL:Multiplying", a, "and", b) return a * b tools = [multiply] llm = ChatOllama( model="llama3.2:3b", temperature=0, ) llm_with_tools = llm.bind_tools(tools) def...
Full answer by Charles Drappier: https://stackoverflow.stackexchange.com/a/79403582 (CC BY-SA 4.0).
Need it done for your business? UphillTech.