Skip to content

Commit 6dc8880

Browse files
committed
Update examples
1 parent f4a4b32 commit 6dc8880

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

examples/app-builder/auto_team.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import asyncio
22

3-
from coagent.agents import StreamChatAgent, tool
3+
from coagent.agents import ChatAgent, tool
44
from coagent.core import AgentSpec, idle_loop, new, set_stderr_logger
55
from coagent.runtimes import NATSRuntime
66

77

8-
class AutoTeam(StreamChatAgent):
8+
class AutoTeam(ChatAgent):
99
system = """You are an manager who manages a team that consists of a dev agent and a qa agent.
1010
1111
Your team is responsible for build software for users, and you should follow these rules:

examples/opencsg/csghub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import asyncio
33
from enum import Enum
44

5-
from coagent.agents import StreamChatAgent, confirm, RunContext, tool
5+
from coagent.agents import ChatAgent, confirm, RunContext, tool
66
from coagent.agents.messages import ChatMessage
77
from coagent.core import AgentSpec, idle_loop, new, set_stderr_logger
88
from coagent.runtimes import NATSRuntime
@@ -19,7 +19,7 @@ class Language(str, Enum):
1919
de = "de"
2020

2121

22-
class CSGHub(StreamChatAgent):
22+
class CSGHub(ChatAgent):
2323
"""An agent that help users deal with tasks related to models."""
2424

2525
system = "You are an assistant that help users deal with tasks related to models."

examples/opencsg/dataflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import argparse
22
import asyncio
33

4-
from coagent.agents import StreamChatAgent, RunContext, submit, tool
4+
from coagent.agents import ChatAgent, RunContext, submit, tool
55
from coagent.core import AgentSpec, idle_loop, new, set_stderr_logger
66
from coagent.runtimes import NATSRuntime
77

88
import httpx
99
from pydantic import Field
1010

1111

12-
class DataFlow(StreamChatAgent):
12+
class DataFlow(ChatAgent):
1313
"""An agent that help users deal with tasks related to datasets."""
1414

1515
system = "You are an agent that help users deal with tasks related to datasets."

examples/patterns/chaining.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22
import os
33

4-
from coagent.agents import ChatAgent, StreamChatAgent, Sequential, ModelClient
4+
from coagent.agents import ChatAgent, Sequential, ModelClient
55
from coagent.agents.messages import ChatMessage
66
from coagent.core import AgentSpec, new, set_stderr_logger
77
from coagent.runtimes import LocalRuntime
@@ -62,7 +62,7 @@
6262
formatter = AgentSpec(
6363
"formatter",
6464
new(
65-
StreamChatAgent,
65+
ChatAgent,
6666
system="""\
6767
Format the sorted data as a markdown table with columns:
6868
| Metric | Value |

examples/patterns/triaging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22
import os
33

4-
from coagent.agents import ChatMessage, DynamicTriage, ModelClient, StreamChatAgent
4+
from coagent.agents import ChatAgent, ChatMessage, DynamicTriage, ModelClient
55
from coagent.core import AgentSpec, new, set_stderr_logger
66
from coagent.runtimes import LocalRuntime
77

@@ -15,7 +15,7 @@
1515
billing = AgentSpec(
1616
"team.billing", # Under the team namespace
1717
new(
18-
StreamChatAgent,
18+
ChatAgent,
1919
system="""\
2020
You are a billing support specialist. Follow these guidelines:
2121
1. Always start with "Billing Support Response:"
@@ -33,7 +33,7 @@
3333
account = AgentSpec(
3434
"team.account", # Under the team namespace
3535
new(
36-
StreamChatAgent,
36+
ChatAgent,
3737
system="""\
3838
You are an account security specialist. Follow these guidelines:
3939
1. Always start with "Account Support Response:"

examples/translator/translator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import asyncio
22

3-
from coagent.agents import StreamChatAgent
3+
from coagent.agents import ChatAgent
44
from coagent.core import AgentSpec, idle_loop, new, set_stderr_logger
55
from coagent.runtimes import NATSRuntime
66

77

88
translator = AgentSpec(
99
"translator",
1010
new(
11-
StreamChatAgent,
11+
ChatAgent,
1212
system="""You are a professional translator that can translate Chinese to English.""",
1313
),
1414
)

0 commit comments

Comments
 (0)