Skip to content

Commit ac76eb2

Browse files
feat: Support new tools in AI Studio (box/box-openapi#534) (#633)
1 parent 6635757 commit ac76eb2

10 files changed

+138
-16
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "fc1155c", "specHash": "b5422f4", "version": "1.15.0" }
1+
{ "engineHash": "a3ec39e", "specHash": "8402463", "version": "1.15.0" }

box_sdk_gen/schemas/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
from box_sdk_gen.schemas.ai_agent_spreadsheet_tool import *
3232

33+
from box_sdk_gen.schemas.ai_studio_agent_spreadsheet_tool import *
34+
35+
from box_sdk_gen.schemas.ai_studio_agent_spreadsheet_tool_response import *
36+
3337
from box_sdk_gen.schemas.ai_agent_basic_text_tool_base import *
3438

3539
from box_sdk_gen.schemas.ai_agent_basic_text_tool_text_gen import *

box_sdk_gen/schemas/ai_studio_agent_ask.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from typing import Optional
44

5+
from typing import List
6+
57
from box_sdk_gen.internal.base_object import BaseObject
68

79
from box_sdk_gen.schemas.ai_studio_agent_long_text_tool import AiStudioAgentLongTextTool
@@ -10,6 +12,10 @@
1012
AiStudioAgentBasicTextTool,
1113
)
1214

15+
from box_sdk_gen.schemas.ai_studio_agent_spreadsheet_tool import (
16+
AiStudioAgentSpreadsheetTool,
17+
)
18+
1319
from box_sdk_gen.box.errors import BoxSDKError
1420

1521

@@ -27,28 +33,38 @@ def __init__(
2733
*,
2834
type: AiStudioAgentAskTypeField = AiStudioAgentAskTypeField.AI_AGENT_ASK,
2935
custom_instructions: Optional[str] = None,
36+
suggested_questions: Optional[List[str]] = None,
3037
long_text: Optional[AiStudioAgentLongTextTool] = None,
3138
basic_text: Optional[AiStudioAgentBasicTextTool] = None,
39+
basic_image: Optional[AiStudioAgentBasicTextTool] = None,
40+
spreadsheet: Optional[AiStudioAgentSpreadsheetTool] = None,
3241
long_text_multi: Optional[AiStudioAgentLongTextTool] = None,
3342
basic_text_multi: Optional[AiStudioAgentBasicTextTool] = None,
43+
basic_image_multi: Optional[AiStudioAgentBasicTextTool] = None,
3444
**kwargs
3545
):
3646
"""
3747
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
3848
:type access_state: str
39-
:param description: The description of the AI Agent.
49+
:param description: The description of the AI agent.
4050
:type description: str
4151
:param type: The type of AI agent used to handle queries., defaults to AiStudioAgentAskTypeField.AI_AGENT_ASK
4252
:type type: AiStudioAgentAskTypeField, optional
43-
:param custom_instructions: Custom instructions for the agent., defaults to None
53+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
4454
:type custom_instructions: Optional[str], optional
55+
:param suggested_questions: Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed., defaults to None
56+
:type suggested_questions: Optional[List[str]], optional
4557
"""
4658
super().__init__(**kwargs)
4759
self.access_state = access_state
4860
self.description = description
4961
self.type = type
5062
self.custom_instructions = custom_instructions
63+
self.suggested_questions = suggested_questions
5164
self.long_text = long_text
5265
self.basic_text = basic_text
66+
self.basic_image = basic_image
67+
self.spreadsheet = spreadsheet
5368
self.long_text_multi = long_text_multi
5469
self.basic_text_multi = basic_text_multi
70+
self.basic_image_multi = basic_image_multi

box_sdk_gen/schemas/ai_studio_agent_ask_response.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from typing import Optional
44

5+
from typing import List
6+
57
from box_sdk_gen.internal.base_object import BaseObject
68

79
from box_sdk_gen.schemas.ai_studio_agent_long_text_tool_response import (
@@ -12,6 +14,10 @@
1214
AiStudioAgentBasicTextToolResponse,
1315
)
1416

17+
from box_sdk_gen.schemas.ai_studio_agent_spreadsheet_tool_response import (
18+
AiStudioAgentSpreadsheetToolResponse,
19+
)
20+
1521
from box_sdk_gen.box.errors import BoxSDKError
1622

1723

@@ -29,28 +35,38 @@ def __init__(
2935
*,
3036
type: AiStudioAgentAskResponseTypeField = AiStudioAgentAskResponseTypeField.AI_AGENT_ASK,
3137
custom_instructions: Optional[str] = None,
38+
suggested_questions: Optional[List[str]] = None,
3239
long_text: Optional[AiStudioAgentLongTextToolResponse] = None,
3340
basic_text: Optional[AiStudioAgentBasicTextToolResponse] = None,
41+
basic_image: Optional[AiStudioAgentBasicTextToolResponse] = None,
42+
spreadsheet: Optional[AiStudioAgentSpreadsheetToolResponse] = None,
3443
long_text_multi: Optional[AiStudioAgentLongTextToolResponse] = None,
3544
basic_text_multi: Optional[AiStudioAgentBasicTextToolResponse] = None,
45+
basic_image_multi: Optional[AiStudioAgentBasicTextToolResponse] = None,
3646
**kwargs
3747
):
3848
"""
3949
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
4050
:type access_state: str
41-
:param description: The description of the AI Agent.
51+
:param description: The description of the AI agent.
4252
:type description: str
43-
:param type: The type of AI agent used to handle queries., defaults to AiStudioAgentAskResponseTypeField.AI_AGENT_ASK
53+
:param type: The type of AI agent used to ask questions., defaults to AiStudioAgentAskResponseTypeField.AI_AGENT_ASK
4454
:type type: AiStudioAgentAskResponseTypeField, optional
45-
:param custom_instructions: Custom instructions for the agent., defaults to None
55+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
4656
:type custom_instructions: Optional[str], optional
57+
:param suggested_questions: Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed., defaults to None
58+
:type suggested_questions: Optional[List[str]], optional
4759
"""
4860
super().__init__(**kwargs)
4961
self.access_state = access_state
5062
self.description = description
5163
self.type = type
5264
self.custom_instructions = custom_instructions
65+
self.suggested_questions = suggested_questions
5366
self.long_text = long_text
5467
self.basic_text = basic_text
68+
self.basic_image = basic_image
69+
self.spreadsheet = spreadsheet
5570
self.long_text_multi = long_text_multi
5671
self.basic_text_multi = basic_text_multi
72+
self.basic_image_multi = basic_image_multi

box_sdk_gen/schemas/ai_studio_agent_extract.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ def __init__(
2929
custom_instructions: Optional[str] = None,
3030
long_text: Optional[AiStudioAgentLongTextTool] = None,
3131
basic_text: Optional[AiStudioAgentBasicTextTool] = None,
32+
basic_image: Optional[AiStudioAgentBasicTextTool] = None,
3233
**kwargs
3334
):
3435
"""
3536
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
3637
:type access_state: str
37-
:param description: The description of the AI Agent.
38+
:param description: The description of the AI agent.
3839
:type description: str
39-
:param type: The type of AI agent to be used for extraction., defaults to AiStudioAgentExtractTypeField.AI_AGENT_EXTRACT
40+
:param type: The type of AI agent to be used for metadata extraction., defaults to AiStudioAgentExtractTypeField.AI_AGENT_EXTRACT
4041
:type type: AiStudioAgentExtractTypeField, optional
41-
:param custom_instructions: Custom instructions for the agent., defaults to None
42+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
4243
:type custom_instructions: Optional[str], optional
4344
"""
4445
super().__init__(**kwargs)
@@ -48,3 +49,4 @@ def __init__(
4849
self.custom_instructions = custom_instructions
4950
self.long_text = long_text
5051
self.basic_text = basic_text
52+
self.basic_image = basic_image

box_sdk_gen/schemas/ai_studio_agent_extract_response.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ def __init__(
3131
custom_instructions: Optional[str] = None,
3232
long_text: Optional[AiStudioAgentLongTextToolResponse] = None,
3333
basic_text: Optional[AiStudioAgentBasicTextToolResponse] = None,
34+
basic_image: Optional[AiStudioAgentBasicTextToolResponse] = None,
3435
**kwargs
3536
):
3637
"""
3738
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
3839
:type access_state: str
39-
:param description: The description of the AI Agent.
40+
:param description: The description of the AI agent.
4041
:type description: str
41-
:param type: The type of AI agent to be used for extraction., defaults to AiStudioAgentExtractResponseTypeField.AI_AGENT_EXTRACT
42+
:param type: The type of AI agent to be used for metadata extraction., defaults to AiStudioAgentExtractResponseTypeField.AI_AGENT_EXTRACT
4243
:type type: AiStudioAgentExtractResponseTypeField, optional
43-
:param custom_instructions: Custom instructions for the agent., defaults to None
44+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
4445
:type custom_instructions: Optional[str], optional
4546
"""
4647
super().__init__(**kwargs)
@@ -50,3 +51,4 @@ def __init__(
5051
self.custom_instructions = custom_instructions
5152
self.long_text = long_text
5253
self.basic_text = basic_text
54+
self.basic_image = basic_image
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from typing import Optional
2+
3+
from box_sdk_gen.schemas.ai_llm_endpoint_params import AiLlmEndpointParams
4+
5+
from box_sdk_gen.schemas.ai_agent_spreadsheet_tool import AiAgentSpreadsheetTool
6+
7+
from box_sdk_gen.box.errors import BoxSDKError
8+
9+
10+
class AiStudioAgentSpreadsheetTool(AiAgentSpreadsheetTool):
11+
def __init__(
12+
self,
13+
*,
14+
model: Optional[str] = None,
15+
num_tokens_for_completion: Optional[int] = None,
16+
llm_endpoint_params: Optional[AiLlmEndpointParams] = None,
17+
**kwargs
18+
):
19+
"""
20+
:param model: The model used for the AI agent for spreadsheets. For specific model values, see the [available models list](g://box-ai/supported-models)., defaults to None
21+
:type model: Optional[str], optional
22+
:param num_tokens_for_completion: The number of tokens for completion., defaults to None
23+
:type num_tokens_for_completion: Optional[int], optional
24+
"""
25+
super().__init__(
26+
model=model,
27+
num_tokens_for_completion=num_tokens_for_completion,
28+
llm_endpoint_params=llm_endpoint_params,
29+
**kwargs
30+
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from typing import Optional
2+
3+
from typing import List
4+
5+
from box_sdk_gen.schemas.ai_llm_endpoint_params import AiLlmEndpointParams
6+
7+
from box_sdk_gen.schemas.ai_agent_spreadsheet_tool import AiAgentSpreadsheetTool
8+
9+
from box_sdk_gen.schemas.ai_studio_agent_spreadsheet_tool import (
10+
AiStudioAgentSpreadsheetTool,
11+
)
12+
13+
from box_sdk_gen.box.errors import BoxSDKError
14+
15+
16+
class AiStudioAgentSpreadsheetToolResponse(AiStudioAgentSpreadsheetTool):
17+
def __init__(
18+
self,
19+
*,
20+
warnings: Optional[List[str]] = None,
21+
model: Optional[str] = None,
22+
num_tokens_for_completion: Optional[int] = None,
23+
llm_endpoint_params: Optional[AiLlmEndpointParams] = None,
24+
**kwargs
25+
):
26+
"""
27+
:param warnings: Warnings concerning tool., defaults to None
28+
:type warnings: Optional[List[str]], optional
29+
:param model: The model used for the AI agent for spreadsheets. For specific model values, see the [available models list](g://box-ai/supported-models)., defaults to None
30+
:type model: Optional[str], optional
31+
:param num_tokens_for_completion: The number of tokens for completion., defaults to None
32+
:type num_tokens_for_completion: Optional[int], optional
33+
"""
34+
super().__init__(
35+
model=model,
36+
num_tokens_for_completion=num_tokens_for_completion,
37+
llm_endpoint_params=llm_endpoint_params,
38+
**kwargs
39+
)
40+
self.warnings = warnings

box_sdk_gen/schemas/ai_studio_agent_text_gen.py

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

33
from typing import Optional
44

5+
from typing import List
6+
57
from box_sdk_gen.internal.base_object import BaseObject
68

79
from box_sdk_gen.schemas.ai_studio_agent_basic_gen_tool import AiStudioAgentBasicGenTool
@@ -23,22 +25,26 @@ def __init__(
2325
*,
2426
type: AiStudioAgentTextGenTypeField = AiStudioAgentTextGenTypeField.AI_AGENT_TEXT_GEN,
2527
custom_instructions: Optional[str] = None,
28+
suggested_questions: Optional[List[str]] = None,
2629
basic_gen: Optional[AiStudioAgentBasicGenTool] = None,
2730
**kwargs
2831
):
2932
"""
3033
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
3134
:type access_state: str
32-
:param description: The description of the AI Agent.
35+
:param description: The description of the AI agent.
3336
:type description: str
3437
:param type: The type of AI agent used for generating text., defaults to AiStudioAgentTextGenTypeField.AI_AGENT_TEXT_GEN
3538
:type type: AiStudioAgentTextGenTypeField, optional
36-
:param custom_instructions: Custom instructions for the agent., defaults to None
39+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
3740
:type custom_instructions: Optional[str], optional
41+
:param suggested_questions: Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed., defaults to None
42+
:type suggested_questions: Optional[List[str]], optional
3843
"""
3944
super().__init__(**kwargs)
4045
self.access_state = access_state
4146
self.description = description
4247
self.type = type
4348
self.custom_instructions = custom_instructions
49+
self.suggested_questions = suggested_questions
4450
self.basic_gen = basic_gen

box_sdk_gen/schemas/ai_studio_agent_text_gen_response.py

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

33
from typing import Optional
44

5+
from typing import List
6+
57
from box_sdk_gen.internal.base_object import BaseObject
68

79
from box_sdk_gen.schemas.ai_studio_agent_basic_gen_tool_response import (
@@ -25,22 +27,26 @@ def __init__(
2527
*,
2628
type: AiStudioAgentTextGenResponseTypeField = AiStudioAgentTextGenResponseTypeField.AI_AGENT_TEXT_GEN,
2729
custom_instructions: Optional[str] = None,
30+
suggested_questions: Optional[List[str]] = None,
2831
basic_gen: Optional[AiStudioAgentBasicGenToolResponse] = None,
2932
**kwargs
3033
):
3134
"""
3235
:param access_state: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
3336
:type access_state: str
34-
:param description: The description of the AI Agent.
37+
:param description: The description of the AI agent.
3538
:type description: str
3639
:param type: The type of AI agent used for generating text., defaults to AiStudioAgentTextGenResponseTypeField.AI_AGENT_TEXT_GEN
3740
:type type: AiStudioAgentTextGenResponseTypeField, optional
38-
:param custom_instructions: Custom instructions for the agent., defaults to None
41+
:param custom_instructions: Custom instructions for the AI agent., defaults to None
3942
:type custom_instructions: Optional[str], optional
43+
:param suggested_questions: Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed., defaults to None
44+
:type suggested_questions: Optional[List[str]], optional
4045
"""
4146
super().__init__(**kwargs)
4247
self.access_state = access_state
4348
self.description = description
4449
self.type = type
4550
self.custom_instructions = custom_instructions
51+
self.suggested_questions = suggested_questions
4652
self.basic_gen = basic_gen

0 commit comments

Comments
 (0)