Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "504b5a7", "specHash": "62fdfd1", "version": "0.1.0" }
{ "engineHash": "10c68c7", "specHash": "62fdfd1", "version": "0.1.0" }
40 changes: 10 additions & 30 deletions test/box_sdk_gen/test/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/box_sdk_gen/test/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down