Skip to content

Commit 23aabb6

Browse files
committed
Remove comments from agent examples
1 parent af86b2a commit 23aabb6

File tree

3 files changed

+0
-55
lines changed

3 files changed

+0
-55
lines changed

agent_tool/src/agents/chat_tool_functions.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: ERA001
21
from datetime import timedelta
32

43
from pydantic import BaseModel
@@ -9,8 +8,6 @@
98

109
from src.functions.llm_chat import LlmChatInput, Message, llm_chat
1110
from src.functions.lookup_sales import LookupSalesInput, lookup_sales
12-
# Step 2: Import your new function to the agent
13-
# from src.functions.new_function import new_function, FunctionInput, FunctionOutput
1411

1512

1613
class MessageEvent(BaseModel):
@@ -37,15 +34,8 @@ async def message(self, message: MessageEvent) -> list[Message]:
3734
name=lookup_sales.__name__,
3835
description="Lookup sales for a given category",
3936
),
40-
# Step 3 Add your new function to the tools list and adjust the system prompt
41-
# pydantic_function_tool(
42-
# model=FunctionInput,
43-
# name=new_function.__name__,
44-
# description="A function to talk to an ERP to get the latest sales data"
45-
# )
4637
]
4738

48-
# Change the system prompt to the agent
4939
system_content = "You are a helpful assistant that can help with sales data."
5040

5141
self.messages.append(Message(role="user", content=message.content or ""))
@@ -113,19 +103,6 @@ async def message(self, message: MessageEvent) -> list[Message]:
113103
or "",
114104
)
115105
)
116-
117-
## Step 4: Add your new function to the match case and append the result to the messages
118-
# case new_function.__name__:
119-
# args = FunctionInput.model_validate_json(tool_call.function.arguments)
120-
121-
# log.info(f"calling {name} with args: {args}")
122-
123-
# result = await workflow.step(new_function, input=FunctionInput(message=args.message), start_to_close_timeout=timedelta(seconds=120))
124-
# self.messages.append(Message(role="tool", tool_call_id=tool_call.id, content=str(result)))
125-
126-
# completion_with_tool_call = await workflow.step(llm_chat, LlmChatInput(messages=self.messages), start_to_close_timeout=timedelta(seconds=120))
127-
# self.messages.append(Message(role="assistant", content=completion_with_tool_call.choices[0].message.content or ""))
128-
129106
else:
130107
pass
131108

agent_tool/src/functions/new_function.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

agent_tool/src/services.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: ERA001
21
import asyncio
32
import logging
43
import webbrowser
@@ -11,14 +10,10 @@
1110
from src.functions.llm_chat import llm_chat
1211
from src.functions.lookup_sales import lookup_sales
1312

14-
# Step 5: Import a new function to tool calling here
15-
# from src.functions.new_function import new_function, FunctionInput, FunctionOutput
16-
1713

1814
async def main() -> None:
1915
await client.start_service(
2016
agents=[AgentChatToolFunctions],
21-
## Step 6: Add your new function to the functions list -> functions=[lookupSales, llm_chat, new_function]
2217
functions=[lookup_sales, llm_chat],
2318
)
2419

0 commit comments

Comments
 (0)