File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- { "engineHash" : " f9e2519 " , "specHash" : " ccdb456" , "version" : " 10.3.0" }
1+ { "engineHash" : " b181eba " , "specHash" : " ccdb456" , "version" : " 10.3.0" }
Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ client.ai.create_ai_extract_structured(
246246 ],
247247 ),
248248 ],
249+ include_confidence_score = True ,
249250 ai_agent = ai_extract_structured_agent_basic_text_config,
250251)
251252```
Original file line number Diff line number Diff line change @@ -252,7 +252,12 @@ def testAIExtractStructuredWithFields():
252252 parent = UploadFileAttributesParentField (id = '0' ),
253253 ),
254254 string_to_byte_stream (
255- 'My name is John Doe. I was born in 4th July 1990. I am 34 years old. My hobby is guitar.'
255+ '' .join (
256+ [
257+ 'My name is John Doe. I was born in 4th July 1990. I am 34 years old. My hobby is guitar. My UUID is ' ,
258+ get_uuid (),
259+ ]
260+ )
256261 ),
257262 )
258263 file : FileFull = uploaded_files .entries [0 ]
@@ -300,8 +305,10 @@ def testAIExtractStructuredWithFields():
300305 ],
301306 ),
302307 ],
308+ include_confidence_score = True ,
303309 ai_agent = ai_extract_structured_agent_basic_text_config ,
304310 )
311+ assert not response .confidence_score == None
305312 assert to_string (response .answer .get ('hobby' )) == to_string (['guitar' ])
306313 assert to_string (response .answer .get ('firstName' )) == 'John'
307314 assert to_string (response .answer .get ('lastName' )) == 'Doe'
@@ -318,7 +325,12 @@ def testAIExtractStructuredWithMetadataTemplate():
318325 parent = UploadFileAttributesParentField (id = '0' ),
319326 ),
320327 string_to_byte_stream (
321- 'My name is John Doe. I was born in 4th July 1990. I am 34 years old. My hobby is guitar.'
328+ '' .join (
329+ [
330+ 'My name is John Doe. I was born in 4th July 1990. I am 34 years old. My hobby is guitar. My UUID is ' ,
331+ get_uuid (),
332+ ]
333+ )
322334 ),
323335 )
324336 file : FileFull = uploaded_files .entries [0 ]
You can’t perform that action at this time.
0 commit comments