Skip to content

Commit 671c6b9

Browse files
committed
fix langgraph example model config and mem0 import
1 parent 0521faa commit 671c6b9

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

examples/langgraph_agent/agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def build_calculator_subgraph():
3939
api_key, url, model_name = get_model_config()
4040
model = init_chat_model(
4141
model_name,
42+
model_provider="openai",
4243
api_key=api_key,
43-
api_base=url,
44+
base_url=url,
4445
)
4546

4647
tools = [calculate]

examples/langgraph_agent_with_cancel/agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ def build_graph():
4444
api_key, url, model_name = get_model_config()
4545
model = init_chat_model(
4646
model_name,
47+
model_provider="openai",
4748
api_key=api_key,
48-
api_base=url,
49+
base_url=url,
4950
)
5051

5152
tools = [calculate, analyze_data]

examples/langgraphagent_with_human_in_the_loop/agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def _build_graph():
5353
api_key, url, model_name = get_model_config()
5454
model = init_chat_model(
5555
model_name,
56+
model_provider="openai",
5657
api_key=api_key,
57-
api_base=url,
58+
base_url=url,
5859
)
5960
tools = [execute_database_operation]
6061
llm_with_tools = model.bind_tools(tools)

examples/mem0_tools/agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from trpc_agent_sdk.agents import LlmAgent
1111
from trpc_agent_sdk.models import LLMModel
1212
from trpc_agent_sdk.models import OpenAIModel
13-
from trpc_agent_sdk.tools.mem0_tools import SaveMemoryTool
14-
from trpc_agent_sdk.tools.mem0_tools import SearchMemoryTool
13+
from trpc_agent_sdk.tools.mem0_tool import SaveMemoryTool
14+
from trpc_agent_sdk.tools.mem0_tool import SearchMemoryTool
1515

1616
from .config import get_mem0_platform_config
1717
from .config import get_memory_config

0 commit comments

Comments
 (0)