Open adampingel opened 2 months ago
Taking a look at this.
It looks like we can just bypass bind_tools
if we want to, when using the Granite models (on Replicate or WatsonX). This PR of the Function_Calling recipe just calls invoke()
on the WatsonX llm client, using a properly-constructed prompt.
The same thing works for Replicate; I've tested that.
While using Replicate Granite model via Langchain Langgraph following error is encountered for agent creation
from langchain_community.llms import Replicate from ibm_granite_community.notebook_utils import set_env_var, get_env_var
llm = Replicate ( model = "ibm-granite/granite-20b-code-instruct-8k", model_kwargs={"temperature": 0.3,} )
AttributeError: 'Replicate' object has no attribute 'bind_tools'
Research agent and node
research_agent = create_agent( llm, [tavily_tool], system_message="You should provide accurate data for the chart_generator to use.", )