@@ -264,6 +264,7 @@ def chat(
264264 messages : Iterable [session_chat_params .Message ],
265265 connection_pool : object | NotGiven = NOT_GIVEN ,
266266 agent : Optional [str ] | NotGiven = NOT_GIVEN ,
267+ auto_run_tools : bool | NotGiven = NOT_GIVEN ,
267268 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
268269 length_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
269270 logit_bias : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
@@ -273,6 +274,7 @@ def chat(
273274 model : Optional [str ] | NotGiven = NOT_GIVEN ,
274275 presence_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
275276 recall : bool | NotGiven = NOT_GIVEN ,
277+ recall_tools : bool | NotGiven = NOT_GIVEN ,
276278 repetition_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
277279 response_format : Optional [session_chat_params .ResponseFormat ] | NotGiven = NOT_GIVEN ,
278280 save : bool | NotGiven = NOT_GIVEN ,
@@ -294,11 +296,18 @@ def chat(
294296 """
295297 Initiates a chat session.
296298
299+ Routes to different implementations based on feature flags:
300+
301+ - If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
302+ implementation
303+ - Otherwise, uses the legacy implementation
304+
297305 Parameters: developer (Developer): The developer associated with the chat
298306 session. session_id (UUID): The unique identifier of the chat session.
299307 chat_input (ChatInput): The chat input data. background_tasks (BackgroundTasks):
300308 The background tasks to run. x_custom_api_key (Optional[str]): The custom API
301- key.
309+ key. mock_response (Optional[str]): Mock response for testing. connection_pool:
310+ Connection pool for testing purposes.
302311
303312 Returns: ChatResponse or StreamingResponse: The chat response or streaming
304313 response.
@@ -367,6 +376,7 @@ def chat(
367376 {
368377 "messages" : messages ,
369378 "agent" : agent ,
379+ "auto_run_tools" : auto_run_tools ,
370380 "frequency_penalty" : frequency_penalty ,
371381 "length_penalty" : length_penalty ,
372382 "logit_bias" : logit_bias ,
@@ -376,6 +386,7 @@ def chat(
376386 "model" : model ,
377387 "presence_penalty" : presence_penalty ,
378388 "recall" : recall ,
389+ "recall_tools" : recall_tools ,
379390 "repetition_penalty" : repetition_penalty ,
380391 "response_format" : response_format ,
381392 "save" : save ,
@@ -538,6 +549,7 @@ def render(
538549 * ,
539550 messages : Iterable [session_render_params .Message ],
540551 agent : Optional [str ] | NotGiven = NOT_GIVEN ,
552+ auto_run_tools : bool | NotGiven = NOT_GIVEN ,
541553 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
542554 length_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
543555 logit_bias : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
@@ -547,6 +559,7 @@ def render(
547559 model : Optional [str ] | NotGiven = NOT_GIVEN ,
548560 presence_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
549561 recall : bool | NotGiven = NOT_GIVEN ,
562+ recall_tools : bool | NotGiven = NOT_GIVEN ,
550563 repetition_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
551564 response_format : Optional [session_render_params .ResponseFormat ] | NotGiven = NOT_GIVEN ,
552565 save : bool | NotGiven = NOT_GIVEN ,
@@ -567,6 +580,12 @@ def render(
567580 """
568581 Renders a chat input.
569582
583+ Routes to different implementations based on feature flags:
584+
585+ - If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
586+ implementation
587+ - Otherwise, uses the legacy implementation
588+
570589 Parameters: developer (Developer): The developer associated with the chat
571590 session. session_id (UUID): The unique identifier of the chat session.
572591 chat_input (ChatInput): The chat input data.
@@ -590,6 +609,7 @@ def render(
590609 {
591610 "messages" : messages ,
592611 "agent" : agent ,
612+ "auto_run_tools" : auto_run_tools ,
593613 "frequency_penalty" : frequency_penalty ,
594614 "length_penalty" : length_penalty ,
595615 "logit_bias" : logit_bias ,
@@ -599,6 +619,7 @@ def render(
599619 "model" : model ,
600620 "presence_penalty" : presence_penalty ,
601621 "recall" : recall ,
622+ "recall_tools" : recall_tools ,
602623 "repetition_penalty" : repetition_penalty ,
603624 "response_format" : response_format ,
604625 "save" : save ,
@@ -901,6 +922,7 @@ async def chat(
901922 messages : Iterable [session_chat_params .Message ],
902923 connection_pool : object | NotGiven = NOT_GIVEN ,
903924 agent : Optional [str ] | NotGiven = NOT_GIVEN ,
925+ auto_run_tools : bool | NotGiven = NOT_GIVEN ,
904926 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
905927 length_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
906928 logit_bias : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
@@ -910,6 +932,7 @@ async def chat(
910932 model : Optional [str ] | NotGiven = NOT_GIVEN ,
911933 presence_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
912934 recall : bool | NotGiven = NOT_GIVEN ,
935+ recall_tools : bool | NotGiven = NOT_GIVEN ,
913936 repetition_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
914937 response_format : Optional [session_chat_params .ResponseFormat ] | NotGiven = NOT_GIVEN ,
915938 save : bool | NotGiven = NOT_GIVEN ,
@@ -931,11 +954,18 @@ async def chat(
931954 """
932955 Initiates a chat session.
933956
957+ Routes to different implementations based on feature flags:
958+
959+ - If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
960+ implementation
961+ - Otherwise, uses the legacy implementation
962+
934963 Parameters: developer (Developer): The developer associated with the chat
935964 session. session_id (UUID): The unique identifier of the chat session.
936965 chat_input (ChatInput): The chat input data. background_tasks (BackgroundTasks):
937966 The background tasks to run. x_custom_api_key (Optional[str]): The custom API
938- key.
967+ key. mock_response (Optional[str]): Mock response for testing. connection_pool:
968+ Connection pool for testing purposes.
939969
940970 Returns: ChatResponse or StreamingResponse: The chat response or streaming
941971 response.
@@ -1008,6 +1038,7 @@ async def chat(
10081038 {
10091039 "messages" : messages ,
10101040 "agent" : agent ,
1041+ "auto_run_tools" : auto_run_tools ,
10111042 "frequency_penalty" : frequency_penalty ,
10121043 "length_penalty" : length_penalty ,
10131044 "logit_bias" : logit_bias ,
@@ -1017,6 +1048,7 @@ async def chat(
10171048 "model" : model ,
10181049 "presence_penalty" : presence_penalty ,
10191050 "recall" : recall ,
1051+ "recall_tools" : recall_tools ,
10201052 "repetition_penalty" : repetition_penalty ,
10211053 "response_format" : response_format ,
10221054 "save" : save ,
@@ -1181,6 +1213,7 @@ async def render(
11811213 * ,
11821214 messages : Iterable [session_render_params .Message ],
11831215 agent : Optional [str ] | NotGiven = NOT_GIVEN ,
1216+ auto_run_tools : bool | NotGiven = NOT_GIVEN ,
11841217 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
11851218 length_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
11861219 logit_bias : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
@@ -1190,6 +1223,7 @@ async def render(
11901223 model : Optional [str ] | NotGiven = NOT_GIVEN ,
11911224 presence_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
11921225 recall : bool | NotGiven = NOT_GIVEN ,
1226+ recall_tools : bool | NotGiven = NOT_GIVEN ,
11931227 repetition_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
11941228 response_format : Optional [session_render_params .ResponseFormat ] | NotGiven = NOT_GIVEN ,
11951229 save : bool | NotGiven = NOT_GIVEN ,
@@ -1210,6 +1244,12 @@ async def render(
12101244 """
12111245 Renders a chat input.
12121246
1247+ Routes to different implementations based on feature flags:
1248+
1249+ - If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
1250+ implementation
1251+ - Otherwise, uses the legacy implementation
1252+
12131253 Parameters: developer (Developer): The developer associated with the chat
12141254 session. session_id (UUID): The unique identifier of the chat session.
12151255 chat_input (ChatInput): The chat input data.
@@ -1233,6 +1273,7 @@ async def render(
12331273 {
12341274 "messages" : messages ,
12351275 "agent" : agent ,
1276+ "auto_run_tools" : auto_run_tools ,
12361277 "frequency_penalty" : frequency_penalty ,
12371278 "length_penalty" : length_penalty ,
12381279 "logit_bias" : logit_bias ,
@@ -1242,6 +1283,7 @@ async def render(
12421283 "model" : model ,
12431284 "presence_penalty" : presence_penalty ,
12441285 "recall" : recall ,
1286+ "recall_tools" : recall_tools ,
12451287 "repetition_penalty" : repetition_penalty ,
12461288 "response_format" : response_format ,
12471289 "save" : save ,
0 commit comments