@@ -104,7 +104,7 @@ pub struct Agent {
104
104
task_timeout : Option < Duration > ,
105
105
106
106
serializer : serialization:: Strategy ,
107
- force_strategy : bool ,
107
+ use_native_tools_format : bool ,
108
108
}
109
109
110
110
impl Agent {
@@ -117,7 +117,7 @@ impl Agent {
117
117
force_strategy : bool ,
118
118
max_iterations : usize ,
119
119
) -> Result < Self > {
120
- let use_native_tools_support = if force_strategy {
120
+ let use_native_tools_format = if force_strategy {
121
121
log:: info!( "using {:?} serialization strategy" , & serializer) ;
122
122
false
123
123
} else {
@@ -142,7 +142,7 @@ impl Agent {
142
142
task,
143
143
embedder,
144
144
max_iterations,
145
- use_native_tools_support ,
145
+ use_native_tools_format ,
146
146
)
147
147
. await ?,
148
148
) ) ;
@@ -153,7 +153,7 @@ impl Agent {
153
153
state,
154
154
max_history,
155
155
task_timeout,
156
- force_strategy ,
156
+ use_native_tools_format ,
157
157
serializer,
158
158
} )
159
159
}
@@ -372,7 +372,7 @@ impl Agent {
372
372
let ( response, tool_calls) = self . generator . chat ( self . state . clone ( ) , & options) . await ?;
373
373
374
374
// parse the model response into invocations
375
- let invocations = if tool_calls . is_empty ( ) || self . force_strategy {
375
+ let invocations = if ! self . use_native_tools_format {
376
376
// use our own parsing strategy
377
377
self . serializer . try_parse ( response. trim ( ) ) ?
378
378
} else {
0 commit comments