Skip to content

Commit 44465ce

Browse files
[Feat] Add streaming agents (#277)
* format * fix ReAct * support streaming agents * fix type hints * update
1 parent 73c8326 commit 44465ce

File tree

7 files changed

+402
-337
lines changed

7 files changed

+402
-337
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ print(dumped_memory['memory'])
9696
Clear the memory of this session(`session_id=0` by default):
9797

9898
```python
99-
agent.memory.reset()
99+
agent.reset()
100100
```
101101

102102
### Custom Message Aggregation

lagent/agents/__init__.py

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1-
from .agent import Agent, AgentDict, AgentList, AsyncAgent, AsyncSequential, Sequential
1+
from .agent import (
2+
Agent,
3+
AgentDict,
4+
AgentList,
5+
AsyncAgent,
6+
AsyncSequential,
7+
AsyncStreamingAgent,
8+
AsyncStreamingSequential,
9+
Sequential,
10+
StreamingAgent,
11+
StreamingSequential,
12+
)
213
from .react import AsyncReAct, ReAct
314
from .stream import AgentForInternLM, AsyncAgentForInternLM, AsyncMathCoder, MathCoder
415

516
__all__ = [
6-
'Agent', 'AgentDict', 'AgentList', 'AsyncAgent', 'AgentForInternLM',
7-
'AsyncAgentForInternLM', 'MathCoder', 'AsyncMathCoder', 'ReAct',
8-
'AsyncReAct', 'Sequential', 'AsyncSequential'
17+
'Agent',
18+
'AgentDict',
19+
'AgentList',
20+
'AsyncAgent',
21+
'AgentForInternLM',
22+
'AsyncAgentForInternLM',
23+
'MathCoder',
24+
'AsyncMathCoder',
25+
'ReAct',
26+
'AsyncReAct',
27+
'Sequential',
28+
'AsyncSequential',
29+
'StreamingAgent',
30+
'StreamingSequential',
31+
'AsyncStreamingAgent',
32+
'AsyncStreamingSequential',
933
]

0 commit comments

Comments
 (0)