Skip to content

Commit 7920f1d

Browse files
committed
Fix examples and Build Full Pipeline
1 parent bbd07eb commit 7920f1d

5 files changed

Lines changed: 402 additions & 7 deletions

File tree

examples/langgraph_agent/agent/agent.py

Lines changed: 6 additions & 3 deletions
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]
@@ -79,8 +80,9 @@ def build_graph_with_subgraph():
7980
api_key, url, model_name = get_model_config()
8081
model = init_chat_model(
8182
model_name,
83+
model_provider="openai",
8284
api_key=api_key,
83-
api_base=url,
85+
base_url=url,
8486
)
8587

8688
# Build calculator subgraph
@@ -126,8 +128,9 @@ def build_graph():
126128
api_key, url, model_name = get_model_config()
127129
model = init_chat_model(
128130
model_name,
131+
model_provider="openai",
129132
api_key=api_key,
130-
api_base=url,
133+
base_url=url,
131134
)
132135

133136
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)