File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
agentpress/agents/simple_web_dev Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ class FilesTool(Tool):
96
96
pass
97
97
```
98
98
99
- 4 . Use the Thread Manager with streaming and tool execution:
99
+ 4 . Use the Thread Manager with tool execution:
100
100
``` python
101
101
import asyncio
102
102
from agentpress.thread_manager import ThreadManager
@@ -124,20 +124,11 @@ async def main():
124
124
" content" : " You are a helpful assistant with calculation abilities."
125
125
},
126
126
model_name = " anthropic/claude-3-5-sonnet-latest" ,
127
- stream = True ,
128
- native_tool_calling = True ,
129
127
execute_tools = True ,
130
- execute_tools_on_stream = True
128
+ native_tool_calling = True , # Contrary to xml_tool_calling = True
129
+ parallel_tool_execution = True # Will execute tools in parallel, contrary to sequential (one after another)
131
130
)
132
131
133
- # Handle streaming response
134
- if isinstance (response, AsyncGenerator):
135
- async for chunk in response:
136
- if hasattr (chunk.choices[0 ], ' delta' ):
137
- delta = chunk.choices[0 ].delta
138
- if hasattr (delta, ' content' ) and delta.content:
139
- print (delta.content, end = ' ' , flush = True )
140
-
141
132
asyncio.run(main())
142
133
```
143
134
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ async def after_iteration():
121
121
await pre_iteration ()
122
122
123
123
state = await state_manager .export_store ()
124
+
124
125
state_message = {
125
126
"role" : "user" ,
126
127
"content" : f"""
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " agentpress"
3
- version = " 0.1.8 "
3
+ version = " 0.1.9 "
4
4
description = " Building blocks for AI Agents"
5
5
authors = [
" marko-kraemer <[email protected] >" ]
6
6
readme = " README.md"
You can’t perform that action at this time.
0 commit comments