File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
topic/machine-learning/llm-langchain Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 2525"""
2626import asyncio
2727
28+ from cratedb_about .instruction import GeneralInstructions
2829from langchain_mcp_adapters .client import MultiServerMCPClient
2930from langgraph .prebuilt import create_react_agent
3031
@@ -39,7 +40,11 @@ async def amain():
3940 }
4041 )
4142 tools = await client .get_tools ()
42- agent = create_react_agent ("openai:gpt-4.1" , tools )
43+ agent = create_react_agent (
44+ model = "openai:gpt-4.1" ,
45+ tools = tools ,
46+ prompt = GeneralInstructions ().render (),
47+ )
4348
4449 QUERY_STR = "What is the average value for sensor 1?"
4550 response = await agent .ainvoke ({"messages" : QUERY_STR })
Original file line number Diff line number Diff line change 11crash
2+ cratedb-about == 0.0.6
23google-cloud-aiplatform < 2
34langchain-cratedb < 0.1.2
45langchain-mcp-adapters < 0.2
You can’t perform that action at this time.
0 commit comments