We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1596dff commit c26bc07Copy full SHA for c26bc07
llamaindex-mcp/ollama_client.ipynb
@@ -161,13 +161,12 @@
161
"from llama_index.tools.mcp import McpToolSpec\n",
162
"from llama_index.core.agent.workflow import FunctionAgent\n",
163
"\n",
164
- "async def get_agent(tools: McpToolSpec):\n",
165
- " tools = await tools.to_tool_list_async()\n",
+ "async def get_agent(tools: McpToolSpec, llm=Settings.llm):\n",
166
" agent = FunctionAgent(\n",
167
" name=\"Agent\",\n",
168
" description=\"An agent that can work with Our Database software.\",\n",
169
" tools=tools,\n",
170
- " llm=OpenAI(model=\"gpt-4\"),\n",
+ " llm=llm,\n",
171
" system_prompt=SYSTEM_PROMPT,\n",
172
" )\n",
173
" return agent"
0 commit comments