diff --git a/.codegen.json b/.codegen.json index 57aae7499..18c0213b6 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "504b5a7", "specHash": "62fdfd1", "version": "10.0.0" } +{ "engineHash": "10c68c7", "specHash": "62fdfd1", "version": "10.0.0" } diff --git a/test/ai.py b/test/ai.py index 98c6d26e3..d982ee16c 100644 --- a/test/ai.py +++ b/test/ai.py @@ -328,21 +328,11 @@ def testAIExtractStructuredWithFields(): ], ai_agent=agent_ignoring_overriding_embeddings_model, ) - assert to_string( - get_value_from_object_raw_data(response, 'answer.hobby') - ) == to_string(['guitar']) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.firstName')) - == 'John' - ) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.lastName')) == 'Doe' - ) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.dateOfBirth')) - == '1990-07-04' - ) - assert to_string(get_value_from_object_raw_data(response, 'answer.age')) == '34' + assert to_string(response.answer.get('hobby')) == to_string(['guitar']) + assert to_string(response.answer.get('firstName')) == 'John' + assert to_string(response.answer.get('lastName')) == 'Doe' + assert to_string(response.answer.get('dateOfBirth')) == '1990-07-04' + assert to_string(response.answer.get('age')) == '34' assert response.completion_reason == 'done' client.files.delete_file_by_id(file.id) @@ -407,21 +397,11 @@ def testAIExtractStructuredWithMetadataTemplate(): template_key=template_key, scope='enterprise' ), ) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.firstName')) - == 'John' - ) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.lastName')) == 'Doe' - ) - assert ( - to_string(get_value_from_object_raw_data(response, 'answer.dateOfBirth')) - == '1990-07-04T00:00:00Z' - ) - assert to_string(get_value_from_object_raw_data(response, 'answer.age')) == '34' - assert to_string( - get_value_from_object_raw_data(response, 'answer.hobby') - ) == to_string(['guitar']) + assert to_string(response.answer.get('firstName')) == 'John' + assert to_string(response.answer.get('lastName')) == 'Doe' + assert to_string(response.answer.get('dateOfBirth')) == '1990-07-04T00:00:00Z' + assert to_string(response.answer.get('age')) == '34' + assert to_string(response.answer.get('hobby')) == to_string(['guitar']) assert response.completion_reason == 'done' client.metadata_templates.delete_metadata_template( DeleteMetadataTemplateScope.ENTERPRISE, template.template_key diff --git a/test/events.py b/test/events.py index 37d525d4d..5cafcfd8d 100644 --- a/test/events.py +++ b/test/events.py @@ -53,6 +53,7 @@ def testEventUpload(): assert len(events.entries) > 0 first_event: Event = events.entries[0] assert to_string(first_event.event_type) == 'UPLOAD' + assert to_string(first_event.additional_details.get('hash_type')) == 'sha1' source: EventSource = first_event.source assert ( to_string(source.item_type) == 'file' or to_string(source.item_type) == 'folder'