File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ fn run_pipeline(agent: &mut Agent, toolset: &tools::ToolSet) {
7474 loop {
7575 println ! ( "\n ============= LLM RESPONSE =============" ) ;
7676 if let Ok ( response) = agent. post ( ) {
77+ if response. trim ( ) . ends_with ( "[[[[DONE]]]]" ) {
78+ println ! ( "Done." ) ;
79+ break ;
80+ }
7781 agent. add_message ( "assistant" , & response) ;
7882 let invoke_result = format ! (
7983 "\n ============= TOOL OUTPUT =============\n {}\n " ,
@@ -185,6 +189,9 @@ Please output the special heading and than follow the format (must be wrapped in
185189 "arg2": value2
186190 }}
187191}}
192+
193+ If you feel that you have finished your task, please return the output in the following token:
194+ [[[[DONE]]]]
188195```
189196
190197Please note that you can only call one tool at a time.
You can’t perform that action at this time.
0 commit comments