@@ -240,6 +240,21 @@ def testAIExtractStructuredWithFields():
240240 GetAiAgentDefaultConfigMode .EXTRACT_STRUCTURED , language = 'en-US'
241241 )
242242 )
243+ long_text_config_with_no_embeddings : AiAgentExtractStructured = (
244+ AiAgentExtractStructured (
245+ system_message = ai_extract_structured_agent_config .long_text .system_message ,
246+ prompt_template = ai_extract_structured_agent_config .long_text .prompt_template ,
247+ model = ai_extract_structured_agent_config .long_text .model ,
248+ num_tokens_for_completion = ai_extract_structured_agent_config .long_text .num_tokens_for_completion ,
249+ llm_endpoint_params = ai_extract_structured_agent_config .long_text .llm_endpoint_params ,
250+ )
251+ )
252+ agent_ignoring_overriding_embeddings_model : AiAgentExtractStructured = (
253+ AiAgentExtractStructured (
254+ basic_text = ai_extract_structured_agent_config .basic_text ,
255+ long_text = long_text_config_with_no_embeddings ,
256+ )
257+ )
243258 uploaded_files : Files = client .uploads .upload_file (
244259 UploadFileAttributes (
245260 name = '' .join ([get_uuid (), '.txt' ]),
@@ -294,7 +309,7 @@ def testAIExtractStructuredWithFields():
294309 ],
295310 ),
296311 ],
297- ai_agent = ai_extract_structured_agent_config ,
312+ ai_agent = agent_ignoring_overriding_embeddings_model ,
298313 )
299314 assert to_string (get_value_from_object_raw_data (response , 'firstName' )) == 'John'
300315 assert to_string (get_value_from_object_raw_data (response , 'lastName' )) == 'Doe'
0 commit comments