Skip to content

Commit 46e7054

Browse files
committed
fix: Add info on Enhanced Extract Agent (box/box-openapi#555)
1 parent 4cdeec7 commit 46e7054

File tree

82 files changed

+135
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+135
-133
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "87747c8", "specHash": "a05e5d7", "version": "0.1.0" }
1+
{ "engineHash": "cedd6e8", "specHash": "1ed059a", "version": "0.1.0" }

box_sdk_gen/box/event_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _get_long_poll_info(self):
116116
info = self._events_manager.get_events_with_long_polling()
117117

118118
server = next(
119-
(e for e in (info.entries or []) if e.type == 'realtime_server'), None
119+
(e for e in info.entries or [] if e.type == 'realtime_server'), None
120120
)
121121
if not server:
122122
raise BoxSDKError(message='No realtime server found in the response.')

box_sdk_gen/managers/ai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def create_ai_extract_structured(
440440
To learn more about creating templates, see [Creating metadata templates in the Admin Console](https://support.box.com/hc/en-us/articles/360044194033-Customizing-Metadata-Templates)
441441
442442
443-
or use the [metadata template API](g://metadata/templates/create).
443+
or use the [metadata template API](g://metadata/templates/create). This endpoint also supports [Enhanced Extract Agent](g://box-ai/ai-tutorials/extract-metadata-structured/#enhanced-extract-agent).
444444
445445
:param items: The items to be processed by the LLM. Currently you can use files only.
446446
:type items: List[AiItemBase]

box_sdk_gen/schemas/ai_agent_reference.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ def __init__(
2222
**kwargs
2323
):
2424
"""
25-
:param type: The type of AI agent used to handle queries., defaults to AiAgentReferenceTypeField.AI_AGENT_ID
26-
:type type: AiAgentReferenceTypeField, optional
27-
:param id: The ID of an Agent., defaults to None
28-
:type id: Optional[str], optional
25+
:param type: The type of AI agent used to handle queries., defaults to AiAgentReferenceTypeField.AI_AGENT_ID
26+
:type type: AiAgentReferenceTypeField, optional
27+
:param id: The ID of an Agent. This can be a numeric ID for custom agents (for example, `14031`)
28+
or a unique identifier for pre-built agents (for example, `enhanced_extract_agent`
29+
for the [Enhanced Extract Agent](g://box-ai/ai-tutorials/extract-metadata-structured/#enhanced-extract-agent))., defaults to None
30+
:type id: Optional[str], optional
2931
"""
3032
super().__init__(**kwargs)
3133
self.type = type

docs/box_sdk_gen/ai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Sends an AI request to supported Large Language Models (LLMs) and returns extrac
154154
For this request, you either need a metadata template or a list of fields you want to extract.
155155
Input is **either** a metadata template or a list of fields to ensure the structure.
156156
To learn more about creating templates, see [Creating metadata templates in the Admin Console](https://support.box.com/hc/en-us/articles/360044194033-Customizing-Metadata-Templates)
157-
or use the [metadata template API](g://metadata/templates/create).
157+
or use the [metadata template API](g://metadata/templates/create). This endpoint also supports [Enhanced Extract Agent](g://box-ai/ai-tutorials/extract-metadata-structured/#enhanced-extract-agent).
158158

159159
This operation is performed by calling function `create_ai_extract_structured`.
160160

test/box_sdk_gen/__init__.py

Whitespace-only changes.

test/box_sdk_gen/test/ai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
from box_sdk_gen.managers.metadata_templates import DeleteMetadataTemplateScope
6060

61-
from test.commons import get_default_client
61+
from test.box_sdk_gen.test.commons import get_default_client
6262

6363
from box_sdk_gen.internal.utils import get_uuid
6464

@@ -74,7 +74,7 @@
7474

7575
from box_sdk_gen.internal.utils import get_value_from_object_raw_data
7676

77-
from test.commons import upload_new_file
77+
from test.box_sdk_gen.test.commons import upload_new_file
7878

7979
from box_sdk_gen.schemas.ai_agent_ask import AiAgentAsk
8080

test/box_sdk_gen/test/ai_studio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
from box_sdk_gen.client import BoxClient
2424

25-
from test.commons import get_default_client
25+
from test.box_sdk_gen.test.commons import get_default_client
2626

27-
from test.commons import upload_new_file
27+
from test.box_sdk_gen.test.commons import upload_new_file
2828

2929
from box_sdk_gen.internal.utils import get_uuid
3030

test/box_sdk_gen/test/app_item_associations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from box_sdk_gen.internal.utils import get_env_var
1616

17-
from test.commons import get_default_client_with_user_subject
17+
from test.box_sdk_gen.test.commons import get_default_client_with_user_subject
1818

1919

2020
def testListFileAppItemAssocations():

test/box_sdk_gen/test/archives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from box_sdk_gen.internal.utils import get_env_var
1414

15-
from test.commons import get_default_client_with_user_subject
15+
from test.box_sdk_gen.test.commons import get_default_client_with_user_subject
1616

1717
user_id: str = get_env_var('USER_ID')
1818

0 commit comments

Comments
 (0)