agentlin-client 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agentlin-client might be problematic. Click here for more details.
- agentlin_client/__init__.py +90 -0
- agentlin_client/_base_client.py +1995 -0
- agentlin_client/_client.py +403 -0
- agentlin_client/_compat.py +219 -0
- agentlin_client/_constants.py +14 -0
- agentlin_client/_exceptions.py +108 -0
- agentlin_client/_files.py +123 -0
- agentlin_client/_models.py +835 -0
- agentlin_client/_qs.py +150 -0
- agentlin_client/_resource.py +43 -0
- agentlin_client/_response.py +832 -0
- agentlin_client/_streaming.py +333 -0
- agentlin_client/_types.py +260 -0
- agentlin_client/_utils/__init__.py +64 -0
- agentlin_client/_utils/_compat.py +45 -0
- agentlin_client/_utils/_datetime_parse.py +136 -0
- agentlin_client/_utils/_logs.py +25 -0
- agentlin_client/_utils/_proxy.py +65 -0
- agentlin_client/_utils/_reflection.py +42 -0
- agentlin_client/_utils/_resources_proxy.py +24 -0
- agentlin_client/_utils/_streams.py +12 -0
- agentlin_client/_utils/_sync.py +86 -0
- agentlin_client/_utils/_transform.py +457 -0
- agentlin_client/_utils/_typing.py +156 -0
- agentlin_client/_utils/_utils.py +421 -0
- agentlin_client/_version.py +4 -0
- agentlin_client/lib/.keep +4 -0
- agentlin_client/py.typed +0 -0
- agentlin_client/resources/__init__.py +33 -0
- agentlin_client/resources/conversations/__init__.py +33 -0
- agentlin_client/resources/conversations/conversations.py +489 -0
- agentlin_client/resources/conversations/items.py +558 -0
- agentlin_client/resources/responses.py +1136 -0
- agentlin_client/types/__init__.py +22 -0
- agentlin_client/types/conversation_create_params.py +28 -0
- agentlin_client/types/conversation_delete_response.py +15 -0
- agentlin_client/types/conversation_update_params.py +20 -0
- agentlin_client/types/conversations/__init__.py +74 -0
- agentlin_client/types/conversations/code_interpreter_tool_call.py +55 -0
- agentlin_client/types/conversations/code_interpreter_tool_call_param.py +54 -0
- agentlin_client/types/conversations/computer_screenshot_image.py +22 -0
- agentlin_client/types/conversations/computer_screenshot_image_param.py +21 -0
- agentlin_client/types/conversations/computer_tool_call.py +201 -0
- agentlin_client/types/conversations/computer_tool_call_output_resource.py +37 -0
- agentlin_client/types/conversations/computer_tool_call_param.py +199 -0
- agentlin_client/types/conversations/computer_tool_call_safety_check.py +16 -0
- agentlin_client/types/conversations/computer_tool_call_safety_check_param.py +18 -0
- agentlin_client/types/conversations/conversation_item.py +133 -0
- agentlin_client/types/conversations/conversation_item_list.py +26 -0
- agentlin_client/types/conversations/conversation_resource.py +32 -0
- agentlin_client/types/conversations/custom_tool_call.py +25 -0
- agentlin_client/types/conversations/custom_tool_call_output.py +26 -0
- agentlin_client/types/conversations/custom_tool_call_output_param.py +27 -0
- agentlin_client/types/conversations/custom_tool_call_param.py +24 -0
- agentlin_client/types/conversations/easy_input_message.py +26 -0
- agentlin_client/types/conversations/easy_input_message_param.py +27 -0
- agentlin_client/types/conversations/file_search_tool_call.py +42 -0
- agentlin_client/types/conversations/file_search_tool_call_param.py +44 -0
- agentlin_client/types/conversations/function_and_custom_tool_call_output.py +15 -0
- agentlin_client/types/conversations/function_and_custom_tool_call_output_param.py +16 -0
- agentlin_client/types/conversations/function_call_item_status.py +7 -0
- agentlin_client/types/conversations/function_tool_call.py +32 -0
- agentlin_client/types/conversations/function_tool_call_output_resource.py +33 -0
- agentlin_client/types/conversations/function_tool_call_param.py +31 -0
- agentlin_client/types/conversations/function_tool_call_resource.py +10 -0
- agentlin_client/types/conversations/image_gen_tool_call.py +22 -0
- agentlin_client/types/conversations/image_gen_tool_call_param.py +22 -0
- agentlin_client/types/conversations/includable.py +14 -0
- agentlin_client/types/conversations/input_content.py +32 -0
- agentlin_client/types/conversations/input_content_param.py +30 -0
- agentlin_client/types/conversations/input_file_content.py +25 -0
- agentlin_client/types/conversations/input_file_content_param.py +25 -0
- agentlin_client/types/conversations/input_image_content.py +28 -0
- agentlin_client/types/conversations/input_image_content_param.py +28 -0
- agentlin_client/types/conversations/input_item.py +209 -0
- agentlin_client/types/conversations/input_item_param.py +203 -0
- agentlin_client/types/conversations/input_message.py +30 -0
- agentlin_client/types/conversations/input_message_param.py +31 -0
- agentlin_client/types/conversations/input_text_content.py +15 -0
- agentlin_client/types/conversations/input_text_content_param.py +15 -0
- agentlin_client/types/conversations/item_create_params.py +24 -0
- agentlin_client/types/conversations/item_list_params.py +50 -0
- agentlin_client/types/conversations/item_retrieve_params.py +22 -0
- agentlin_client/types/conversations/local_shell_tool_call.py +45 -0
- agentlin_client/types/conversations/local_shell_tool_call_output.py +22 -0
- agentlin_client/types/conversations/local_shell_tool_call_output_param.py +22 -0
- agentlin_client/types/conversations/local_shell_tool_call_param.py +47 -0
- agentlin_client/types/conversations/mcp_approval_request.py +24 -0
- agentlin_client/types/conversations/mcp_approval_request_param.py +24 -0
- agentlin_client/types/conversations/mcp_approval_response_resource.py +25 -0
- agentlin_client/types/conversations/mcp_list_tools.py +39 -0
- agentlin_client/types/conversations/mcp_list_tools_param.py +39 -0
- agentlin_client/types/conversations/mcp_tool_call.py +44 -0
- agentlin_client/types/conversations/mcp_tool_call_param.py +44 -0
- agentlin_client/types/conversations/output_message.py +34 -0
- agentlin_client/types/conversations/output_message_param.py +34 -0
- agentlin_client/types/conversations/output_text_content.py +117 -0
- agentlin_client/types/conversations/output_text_content_param.py +115 -0
- agentlin_client/types/conversations/reasoning_item.py +44 -0
- agentlin_client/types/conversations/reasoning_item_param.py +45 -0
- agentlin_client/types/conversations/reasoning_text_content.py +15 -0
- agentlin_client/types/conversations/reasoning_text_content_param.py +15 -0
- agentlin_client/types/conversations/refusal_content.py +15 -0
- agentlin_client/types/conversations/refusal_content_param.py +15 -0
- agentlin_client/types/conversations/web_search_tool_call.py +67 -0
- agentlin_client/types/conversations/web_search_tool_call_param.py +66 -0
- agentlin_client/types/mcp_tool_filter.py +20 -0
- agentlin_client/types/mcp_tool_filter_param.py +22 -0
- agentlin_client/types/model_response_properties_standard.py +87 -0
- agentlin_client/types/response.py +166 -0
- agentlin_client/types/response_create_params.py +497 -0
- agentlin_client/types/response_list_input_items_params.py +34 -0
- agentlin_client/types/response_list_input_items_response.py +70 -0
- agentlin_client/types/response_properties.py +328 -0
- agentlin_client/types/response_retrieve_params.py +42 -0
- agentlin_client/types/response_tool.py +495 -0
- agentlin_client/types/response_tool_param.py +491 -0
- agentlin_client/types/text_response_format_configuration.py +59 -0
- agentlin_client/types/text_response_format_configuration_param.py +54 -0
- agentlin_client-0.1.0.dist-info/METADATA +429 -0
- agentlin_client-0.1.0.dist-info/RECORD +123 -0
- agentlin_client-0.1.0.dist-info/WHEEL +4 -0
- agentlin_client-0.1.0.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
from typing_extensions import Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from .input_file_content import InputFileContent
|
|
8
|
+
from .input_text_content import InputTextContent
|
|
9
|
+
from .input_image_content import InputImageContent
|
|
10
|
+
|
|
11
|
+
__all__ = ["FunctionAndCustomToolCallOutput"]
|
|
12
|
+
|
|
13
|
+
FunctionAndCustomToolCallOutput: TypeAlias = Annotated[
|
|
14
|
+
Union[InputTextContent, InputImageContent, InputFileContent], PropertyInfo(discriminator="type")
|
|
15
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import TypeAlias
|
|
7
|
+
|
|
8
|
+
from .input_file_content_param import InputFileContentParam
|
|
9
|
+
from .input_text_content_param import InputTextContentParam
|
|
10
|
+
from .input_image_content_param import InputImageContentParam
|
|
11
|
+
|
|
12
|
+
__all__ = ["FunctionAndCustomToolCallOutputParam"]
|
|
13
|
+
|
|
14
|
+
FunctionAndCustomToolCallOutputParam: TypeAlias = Union[
|
|
15
|
+
InputTextContentParam, InputImageContentParam, InputFileContentParam
|
|
16
|
+
]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
|
+
|
|
5
|
+
__all__ = ["FunctionCallItemStatus"]
|
|
6
|
+
|
|
7
|
+
FunctionCallItemStatus: TypeAlias = Literal["in_progress", "completed", "incomplete"]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["FunctionToolCall"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionToolCall(BaseModel):
|
|
12
|
+
arguments: str
|
|
13
|
+
"""A JSON string of the arguments to pass to the function."""
|
|
14
|
+
|
|
15
|
+
call_id: str
|
|
16
|
+
"""The unique ID of the function tool call generated by the model."""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
"""The name of the function to run."""
|
|
20
|
+
|
|
21
|
+
type: Literal["function_call"]
|
|
22
|
+
"""The type of the function tool call. Always `function_call`."""
|
|
23
|
+
|
|
24
|
+
id: Optional[str] = None
|
|
25
|
+
"""The unique ID of the function tool call."""
|
|
26
|
+
|
|
27
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
|
|
28
|
+
"""The status of the item.
|
|
29
|
+
|
|
30
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
31
|
+
returned via API.
|
|
32
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
from .function_and_custom_tool_call_output import FunctionAndCustomToolCallOutput
|
|
8
|
+
|
|
9
|
+
__all__ = ["FunctionToolCallOutputResource"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionToolCallOutputResource(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""The unique ID of the function call tool output."""
|
|
15
|
+
|
|
16
|
+
call_id: str
|
|
17
|
+
"""The unique ID of the function tool call generated by the model."""
|
|
18
|
+
|
|
19
|
+
output: Union[str, List[FunctionAndCustomToolCallOutput]]
|
|
20
|
+
"""
|
|
21
|
+
The output from the function call generated by your code. Can be a string or an
|
|
22
|
+
list of output content.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
type: Literal["function_call_output"]
|
|
26
|
+
"""The type of the function tool call output. Always `function_call_output`."""
|
|
27
|
+
|
|
28
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
|
|
29
|
+
"""The status of the item.
|
|
30
|
+
|
|
31
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
32
|
+
returned via API.
|
|
33
|
+
"""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["FunctionToolCallParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionToolCallParam(TypedDict, total=False):
|
|
11
|
+
arguments: Required[str]
|
|
12
|
+
"""A JSON string of the arguments to pass to the function."""
|
|
13
|
+
|
|
14
|
+
call_id: Required[str]
|
|
15
|
+
"""The unique ID of the function tool call generated by the model."""
|
|
16
|
+
|
|
17
|
+
name: Required[str]
|
|
18
|
+
"""The name of the function to run."""
|
|
19
|
+
|
|
20
|
+
type: Required[Literal["function_call"]]
|
|
21
|
+
"""The type of the function tool call. Always `function_call`."""
|
|
22
|
+
|
|
23
|
+
id: str
|
|
24
|
+
"""The unique ID of the function tool call."""
|
|
25
|
+
|
|
26
|
+
status: Literal["in_progress", "completed", "incomplete"]
|
|
27
|
+
"""The status of the item.
|
|
28
|
+
|
|
29
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
30
|
+
returned via API.
|
|
31
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .function_tool_call import FunctionToolCall
|
|
4
|
+
|
|
5
|
+
__all__ = ["FunctionToolCallResource"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FunctionToolCallResource(FunctionToolCall):
|
|
9
|
+
id: str # type: ignore
|
|
10
|
+
"""The unique ID of the function tool call."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["ImageGenToolCall"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ImageGenToolCall(BaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
"""The unique ID of the image generation call."""
|
|
14
|
+
|
|
15
|
+
result: Optional[str] = None
|
|
16
|
+
"""The generated image encoded in base64."""
|
|
17
|
+
|
|
18
|
+
status: Literal["in_progress", "completed", "generating", "failed"]
|
|
19
|
+
"""The status of the image generation call."""
|
|
20
|
+
|
|
21
|
+
type: Literal["image_generation_call"]
|
|
22
|
+
"""The type of the image generation call. Always `image_generation_call`."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["ImageGenToolCallParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ImageGenToolCallParam(TypedDict, total=False):
|
|
12
|
+
id: Required[str]
|
|
13
|
+
"""The unique ID of the image generation call."""
|
|
14
|
+
|
|
15
|
+
result: Required[Optional[str]]
|
|
16
|
+
"""The generated image encoded in base64."""
|
|
17
|
+
|
|
18
|
+
status: Required[Literal["in_progress", "completed", "generating", "failed"]]
|
|
19
|
+
"""The status of the image generation call."""
|
|
20
|
+
|
|
21
|
+
type: Required[Literal["image_generation_call"]]
|
|
22
|
+
"""The type of the image generation call. Always `image_generation_call`."""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
|
+
|
|
5
|
+
__all__ = ["Includable"]
|
|
6
|
+
|
|
7
|
+
Includable: TypeAlias = Literal[
|
|
8
|
+
"code_interpreter_call.outputs",
|
|
9
|
+
"computer_call_output.output.image_url",
|
|
10
|
+
"file_search_call.results",
|
|
11
|
+
"message.input_image.image_url",
|
|
12
|
+
"message.output_text.logprobs",
|
|
13
|
+
"reasoning.encrypted_content",
|
|
14
|
+
]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .input_file_content import InputFileContent
|
|
9
|
+
from .input_text_content import InputTextContent
|
|
10
|
+
from .input_image_content import InputImageContent
|
|
11
|
+
|
|
12
|
+
__all__ = ["InputContent", "InputAudio", "InputAudioInputAudio"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class InputAudioInputAudio(BaseModel):
|
|
16
|
+
data: str
|
|
17
|
+
"""Base64-encoded audio data."""
|
|
18
|
+
|
|
19
|
+
format: Literal["mp3", "wav"]
|
|
20
|
+
"""The format of the audio data. Currently supported formats are `mp3` and `wav`."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class InputAudio(BaseModel):
|
|
24
|
+
input_audio: InputAudioInputAudio
|
|
25
|
+
|
|
26
|
+
type: Literal["input_audio"]
|
|
27
|
+
"""The type of the input item. Always `input_audio`."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
InputContent: TypeAlias = Annotated[
|
|
31
|
+
Union[InputTextContent, InputImageContent, InputFileContent, InputAudio], PropertyInfo(discriminator="type")
|
|
32
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .input_file_content_param import InputFileContentParam
|
|
9
|
+
from .input_text_content_param import InputTextContentParam
|
|
10
|
+
from .input_image_content_param import InputImageContentParam
|
|
11
|
+
|
|
12
|
+
__all__ = ["InputContentParam", "InputAudio", "InputAudioInputAudio"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class InputAudioInputAudio(TypedDict, total=False):
|
|
16
|
+
data: Required[str]
|
|
17
|
+
"""Base64-encoded audio data."""
|
|
18
|
+
|
|
19
|
+
format: Required[Literal["mp3", "wav"]]
|
|
20
|
+
"""The format of the audio data. Currently supported formats are `mp3` and `wav`."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class InputAudio(TypedDict, total=False):
|
|
24
|
+
input_audio: Required[InputAudioInputAudio]
|
|
25
|
+
|
|
26
|
+
type: Required[Literal["input_audio"]]
|
|
27
|
+
"""The type of the input item. Always `input_audio`."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
InputContentParam: TypeAlias = Union[InputTextContentParam, InputImageContentParam, InputFileContentParam, InputAudio]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["InputFileContent"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InputFileContent(BaseModel):
|
|
12
|
+
type: Literal["input_file"]
|
|
13
|
+
"""The type of the input item. Always `input_file`."""
|
|
14
|
+
|
|
15
|
+
file_data: Optional[str] = None
|
|
16
|
+
"""The content of the file to be sent to the model."""
|
|
17
|
+
|
|
18
|
+
file_id: Optional[str] = None
|
|
19
|
+
"""The ID of the file to be sent to the model."""
|
|
20
|
+
|
|
21
|
+
file_url: Optional[str] = None
|
|
22
|
+
"""The URL of the file to be sent to the model."""
|
|
23
|
+
|
|
24
|
+
filename: Optional[str] = None
|
|
25
|
+
"""The name of the file to be sent to the model."""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["InputFileContentParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InputFileContentParam(TypedDict, total=False):
|
|
12
|
+
type: Required[Literal["input_file"]]
|
|
13
|
+
"""The type of the input item. Always `input_file`."""
|
|
14
|
+
|
|
15
|
+
file_data: str
|
|
16
|
+
"""The content of the file to be sent to the model."""
|
|
17
|
+
|
|
18
|
+
file_id: Optional[str]
|
|
19
|
+
"""The ID of the file to be sent to the model."""
|
|
20
|
+
|
|
21
|
+
file_url: str
|
|
22
|
+
"""The URL of the file to be sent to the model."""
|
|
23
|
+
|
|
24
|
+
filename: str
|
|
25
|
+
"""The name of the file to be sent to the model."""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["InputImageContent"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InputImageContent(BaseModel):
|
|
12
|
+
detail: Literal["low", "high", "auto"]
|
|
13
|
+
"""The detail level of the image to be sent to the model.
|
|
14
|
+
|
|
15
|
+
One of `high`, `low`, or `auto`. Defaults to `auto`.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
type: Literal["input_image"]
|
|
19
|
+
"""The type of the input item. Always `input_image`."""
|
|
20
|
+
|
|
21
|
+
file_id: Optional[str] = None
|
|
22
|
+
"""The ID of the file to be sent to the model."""
|
|
23
|
+
|
|
24
|
+
image_url: Optional[str] = None
|
|
25
|
+
"""The URL of the image to be sent to the model.
|
|
26
|
+
|
|
27
|
+
A fully qualified URL or base64 encoded image in a data URL.
|
|
28
|
+
"""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["InputImageContentParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InputImageContentParam(TypedDict, total=False):
|
|
12
|
+
detail: Required[Literal["low", "high", "auto"]]
|
|
13
|
+
"""The detail level of the image to be sent to the model.
|
|
14
|
+
|
|
15
|
+
One of `high`, `low`, or `auto`. Defaults to `auto`.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
type: Required[Literal["input_image"]]
|
|
19
|
+
"""The type of the input item. Always `input_image`."""
|
|
20
|
+
|
|
21
|
+
file_id: Optional[str]
|
|
22
|
+
"""The ID of the file to be sent to the model."""
|
|
23
|
+
|
|
24
|
+
image_url: Optional[str]
|
|
25
|
+
"""The URL of the image to be sent to the model.
|
|
26
|
+
|
|
27
|
+
A fully qualified URL or base64 encoded image in a data URL.
|
|
28
|
+
"""
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .input_message import InputMessage
|
|
9
|
+
from .mcp_tool_call import McpToolCall
|
|
10
|
+
from .mcp_list_tools import McpListTools
|
|
11
|
+
from .output_message import OutputMessage
|
|
12
|
+
from .reasoning_item import ReasoningItem
|
|
13
|
+
from .custom_tool_call import CustomToolCall
|
|
14
|
+
from .computer_tool_call import ComputerToolCall
|
|
15
|
+
from .easy_input_message import EasyInputMessage
|
|
16
|
+
from .function_tool_call import FunctionToolCall
|
|
17
|
+
from .image_gen_tool_call import ImageGenToolCall
|
|
18
|
+
from .mcp_approval_request import McpApprovalRequest
|
|
19
|
+
from .web_search_tool_call import WebSearchToolCall
|
|
20
|
+
from .file_search_tool_call import FileSearchToolCall
|
|
21
|
+
from .local_shell_tool_call import LocalShellToolCall
|
|
22
|
+
from .custom_tool_call_output import CustomToolCallOutput
|
|
23
|
+
from .computer_screenshot_image import ComputerScreenshotImage
|
|
24
|
+
from .function_call_item_status import FunctionCallItemStatus
|
|
25
|
+
from .code_interpreter_tool_call import CodeInterpreterToolCall
|
|
26
|
+
from .local_shell_tool_call_output import LocalShellToolCallOutput
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"InputItem",
|
|
30
|
+
"ComputerCallOutput",
|
|
31
|
+
"ComputerCallOutputAcknowledgedSafetyCheck",
|
|
32
|
+
"FunctionCallOutput",
|
|
33
|
+
"FunctionCallOutputOutputUnionMember1",
|
|
34
|
+
"FunctionCallOutputOutputUnionMember1InputText",
|
|
35
|
+
"FunctionCallOutputOutputUnionMember1InputImage",
|
|
36
|
+
"FunctionCallOutputOutputUnionMember1InputFile",
|
|
37
|
+
"McpApprovalResponse",
|
|
38
|
+
"ItemReference",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ComputerCallOutputAcknowledgedSafetyCheck(BaseModel):
|
|
43
|
+
id: str
|
|
44
|
+
"""The ID of the pending safety check."""
|
|
45
|
+
|
|
46
|
+
code: Optional[str] = None
|
|
47
|
+
"""The type of the pending safety check."""
|
|
48
|
+
|
|
49
|
+
message: Optional[str] = None
|
|
50
|
+
"""Details about the pending safety check."""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ComputerCallOutput(BaseModel):
|
|
54
|
+
call_id: str
|
|
55
|
+
"""The ID of the computer tool call that produced the output."""
|
|
56
|
+
|
|
57
|
+
output: ComputerScreenshotImage
|
|
58
|
+
"""A computer screenshot image used with the computer use tool."""
|
|
59
|
+
|
|
60
|
+
type: Literal["computer_call_output"]
|
|
61
|
+
"""The type of the computer tool call output. Always `computer_call_output`."""
|
|
62
|
+
|
|
63
|
+
id: Optional[str] = None
|
|
64
|
+
"""The ID of the computer tool call output."""
|
|
65
|
+
|
|
66
|
+
acknowledged_safety_checks: Optional[List[ComputerCallOutputAcknowledgedSafetyCheck]] = None
|
|
67
|
+
"""
|
|
68
|
+
The safety checks reported by the API that have been acknowledged by the
|
|
69
|
+
developer.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
status: Optional[FunctionCallItemStatus] = None
|
|
73
|
+
"""The status of the message input.
|
|
74
|
+
|
|
75
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when input items
|
|
76
|
+
are returned via API.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class FunctionCallOutputOutputUnionMember1InputText(BaseModel):
|
|
81
|
+
text: str
|
|
82
|
+
"""The text input to the model."""
|
|
83
|
+
|
|
84
|
+
type: Literal["input_text"]
|
|
85
|
+
"""The type of the input item. Always `input_text`."""
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class FunctionCallOutputOutputUnionMember1InputImage(BaseModel):
|
|
89
|
+
type: Literal["input_image"]
|
|
90
|
+
"""The type of the input item. Always `input_image`."""
|
|
91
|
+
|
|
92
|
+
detail: Optional[Literal["low", "high", "auto"]] = None
|
|
93
|
+
"""The detail level of the image to be sent to the model.
|
|
94
|
+
|
|
95
|
+
One of `high`, `low`, or `auto`. Defaults to `auto`.
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
file_id: Optional[str] = None
|
|
99
|
+
"""The ID of the file to be sent to the model."""
|
|
100
|
+
|
|
101
|
+
image_url: Optional[str] = None
|
|
102
|
+
"""The URL of the image to be sent to the model.
|
|
103
|
+
|
|
104
|
+
A fully qualified URL or base64 encoded image in a data URL.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class FunctionCallOutputOutputUnionMember1InputFile(BaseModel):
|
|
109
|
+
type: Literal["input_file"]
|
|
110
|
+
"""The type of the input item. Always `input_file`."""
|
|
111
|
+
|
|
112
|
+
file_data: Optional[str] = None
|
|
113
|
+
"""The base64-encoded data of the file to be sent to the model."""
|
|
114
|
+
|
|
115
|
+
file_id: Optional[str] = None
|
|
116
|
+
"""The ID of the file to be sent to the model."""
|
|
117
|
+
|
|
118
|
+
file_url: Optional[str] = None
|
|
119
|
+
"""The URL of the file to be sent to the model."""
|
|
120
|
+
|
|
121
|
+
filename: Optional[str] = None
|
|
122
|
+
"""The name of the file to be sent to the model."""
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
FunctionCallOutputOutputUnionMember1: TypeAlias = Annotated[
|
|
126
|
+
Union[
|
|
127
|
+
FunctionCallOutputOutputUnionMember1InputText,
|
|
128
|
+
FunctionCallOutputOutputUnionMember1InputImage,
|
|
129
|
+
FunctionCallOutputOutputUnionMember1InputFile,
|
|
130
|
+
],
|
|
131
|
+
PropertyInfo(discriminator="type"),
|
|
132
|
+
]
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class FunctionCallOutput(BaseModel):
|
|
136
|
+
call_id: str
|
|
137
|
+
"""The unique ID of the function tool call generated by the model."""
|
|
138
|
+
|
|
139
|
+
output: Union[str, List[FunctionCallOutputOutputUnionMember1]]
|
|
140
|
+
"""Text, image, or file output of the function tool call."""
|
|
141
|
+
|
|
142
|
+
type: Literal["function_call_output"]
|
|
143
|
+
"""The type of the function tool call output. Always `function_call_output`."""
|
|
144
|
+
|
|
145
|
+
id: Optional[str] = None
|
|
146
|
+
"""The unique ID of the function tool call output.
|
|
147
|
+
|
|
148
|
+
Populated when this item is returned via API.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
status: Optional[FunctionCallItemStatus] = None
|
|
152
|
+
"""The status of the item.
|
|
153
|
+
|
|
154
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
155
|
+
returned via API.
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class McpApprovalResponse(BaseModel):
|
|
160
|
+
approval_request_id: str
|
|
161
|
+
"""The ID of the approval request being answered."""
|
|
162
|
+
|
|
163
|
+
approve: bool
|
|
164
|
+
"""Whether the request was approved."""
|
|
165
|
+
|
|
166
|
+
type: Literal["mcp_approval_response"]
|
|
167
|
+
"""The type of the item. Always `mcp_approval_response`."""
|
|
168
|
+
|
|
169
|
+
id: Optional[str] = None
|
|
170
|
+
"""The unique ID of the approval response"""
|
|
171
|
+
|
|
172
|
+
reason: Optional[str] = None
|
|
173
|
+
"""Optional reason for the decision."""
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class ItemReference(BaseModel):
|
|
177
|
+
id: str
|
|
178
|
+
"""The ID of the item to reference."""
|
|
179
|
+
|
|
180
|
+
type: Optional[Literal["item_reference"]] = None
|
|
181
|
+
"""The type of item to reference. Always `item_reference`."""
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
InputItem: TypeAlias = Annotated[
|
|
185
|
+
Union[
|
|
186
|
+
EasyInputMessage,
|
|
187
|
+
InputMessage,
|
|
188
|
+
OutputMessage,
|
|
189
|
+
FileSearchToolCall,
|
|
190
|
+
ComputerToolCall,
|
|
191
|
+
ComputerCallOutput,
|
|
192
|
+
WebSearchToolCall,
|
|
193
|
+
FunctionToolCall,
|
|
194
|
+
FunctionCallOutput,
|
|
195
|
+
ReasoningItem,
|
|
196
|
+
ImageGenToolCall,
|
|
197
|
+
CodeInterpreterToolCall,
|
|
198
|
+
LocalShellToolCall,
|
|
199
|
+
LocalShellToolCallOutput,
|
|
200
|
+
McpListTools,
|
|
201
|
+
McpApprovalRequest,
|
|
202
|
+
McpApprovalResponse,
|
|
203
|
+
McpToolCall,
|
|
204
|
+
CustomToolCallOutput,
|
|
205
|
+
CustomToolCall,
|
|
206
|
+
ItemReference,
|
|
207
|
+
],
|
|
208
|
+
PropertyInfo(discriminator="type"),
|
|
209
|
+
]
|