Skip to content

Commit 5091195

Browse files
committed
Add a timeout parameter to ChatAgent and DynamicTriage
1 parent d38ceba commit 5091195

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

coagent/agents/chat_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ def __init__(
208208
system: str = "",
209209
tools: list[Callable] | None = None,
210210
client: ModelClient = default_model_client,
211+
timeout: float = 300,
211212
):
212-
super().__init__()
213+
super().__init__(timeout=timeout)
213214

214215
self._name: str = name
215216
self._system: str = system

coagent/agents/dynamic_triage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def __init__(
3939
namespace: str = "",
4040
inclusive: bool = False,
4141
client: ModelClient = default_model_client,
42+
timeout: float = 300,
4243
):
43-
super().__init__()
44+
super().__init__(timeout=timeout)
4445

4546
self._name: str = name
4647
self._system: str = system

coagent/core/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ class BaseAgent(Agent):
101101
102102
Args:
103103
timeout (float, optional): The inactivity timeout for transitioning the
104-
agent state from RUNNING to IDLE. Defaults to 60 (in seconds).
104+
agent state from RUNNING to IDLE. Defaults to 300 (in seconds).
105105
106106
If the agent is not receiving any messages within this duration, it
107107
will be transitioned to the IDLE state. Once in the IDLE state, the
108108
agent will be deleted (recycled) by its corresponding factory agent.
109109
"""
110110

111-
def __init__(self, timeout: float = 60):
111+
def __init__(self, timeout: float = 300):
112112
# The following attributes will be set by the runtime after agent creation.
113113
self.channel: Channel | None = None
114114
self.address: Address | None = None

0 commit comments

Comments
 (0)