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,203 @@
|
|
|
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, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .input_message_param import InputMessageParam
|
|
9
|
+
from .mcp_tool_call_param import McpToolCallParam
|
|
10
|
+
from .mcp_list_tools_param import McpListToolsParam
|
|
11
|
+
from .output_message_param import OutputMessageParam
|
|
12
|
+
from .reasoning_item_param import ReasoningItemParam
|
|
13
|
+
from .custom_tool_call_param import CustomToolCallParam
|
|
14
|
+
from .computer_tool_call_param import ComputerToolCallParam
|
|
15
|
+
from .easy_input_message_param import EasyInputMessageParam
|
|
16
|
+
from .function_tool_call_param import FunctionToolCallParam
|
|
17
|
+
from .function_call_item_status import FunctionCallItemStatus
|
|
18
|
+
from .image_gen_tool_call_param import ImageGenToolCallParam
|
|
19
|
+
from .mcp_approval_request_param import McpApprovalRequestParam
|
|
20
|
+
from .web_search_tool_call_param import WebSearchToolCallParam
|
|
21
|
+
from .file_search_tool_call_param import FileSearchToolCallParam
|
|
22
|
+
from .local_shell_tool_call_param import LocalShellToolCallParam
|
|
23
|
+
from .custom_tool_call_output_param import CustomToolCallOutputParam
|
|
24
|
+
from .computer_screenshot_image_param import ComputerScreenshotImageParam
|
|
25
|
+
from .code_interpreter_tool_call_param import CodeInterpreterToolCallParam
|
|
26
|
+
from .local_shell_tool_call_output_param import LocalShellToolCallOutputParam
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"InputItemParam",
|
|
30
|
+
"ComputerCallOutput",
|
|
31
|
+
"ComputerCallOutputAcknowledgedSafetyCheck",
|
|
32
|
+
"FunctionCallOutput",
|
|
33
|
+
"FunctionCallOutputOutputUnionMember1",
|
|
34
|
+
"FunctionCallOutputOutputUnionMember1InputText",
|
|
35
|
+
"FunctionCallOutputOutputUnionMember1InputImage",
|
|
36
|
+
"FunctionCallOutputOutputUnionMember1InputFile",
|
|
37
|
+
"McpApprovalResponse",
|
|
38
|
+
"ItemReference",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ComputerCallOutputAcknowledgedSafetyCheck(TypedDict, total=False):
|
|
43
|
+
id: Required[str]
|
|
44
|
+
"""The ID of the pending safety check."""
|
|
45
|
+
|
|
46
|
+
code: Optional[str]
|
|
47
|
+
"""The type of the pending safety check."""
|
|
48
|
+
|
|
49
|
+
message: Optional[str]
|
|
50
|
+
"""Details about the pending safety check."""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ComputerCallOutput(TypedDict, total=False):
|
|
54
|
+
call_id: Required[str]
|
|
55
|
+
"""The ID of the computer tool call that produced the output."""
|
|
56
|
+
|
|
57
|
+
output: Required[ComputerScreenshotImageParam]
|
|
58
|
+
"""A computer screenshot image used with the computer use tool."""
|
|
59
|
+
|
|
60
|
+
type: Required[Literal["computer_call_output"]]
|
|
61
|
+
"""The type of the computer tool call output. Always `computer_call_output`."""
|
|
62
|
+
|
|
63
|
+
id: Optional[str]
|
|
64
|
+
"""The ID of the computer tool call output."""
|
|
65
|
+
|
|
66
|
+
acknowledged_safety_checks: Optional[Iterable[ComputerCallOutputAcknowledgedSafetyCheck]]
|
|
67
|
+
"""
|
|
68
|
+
The safety checks reported by the API that have been acknowledged by the
|
|
69
|
+
developer.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
status: Optional[FunctionCallItemStatus]
|
|
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(TypedDict, total=False):
|
|
81
|
+
text: Required[str]
|
|
82
|
+
"""The text input to the model."""
|
|
83
|
+
|
|
84
|
+
type: Required[Literal["input_text"]]
|
|
85
|
+
"""The type of the input item. Always `input_text`."""
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class FunctionCallOutputOutputUnionMember1InputImage(TypedDict, total=False):
|
|
89
|
+
type: Required[Literal["input_image"]]
|
|
90
|
+
"""The type of the input item. Always `input_image`."""
|
|
91
|
+
|
|
92
|
+
detail: Optional[Literal["low", "high", "auto"]]
|
|
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]
|
|
99
|
+
"""The ID of the file to be sent to the model."""
|
|
100
|
+
|
|
101
|
+
image_url: Optional[str]
|
|
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(TypedDict, total=False):
|
|
109
|
+
type: Required[Literal["input_file"]]
|
|
110
|
+
"""The type of the input item. Always `input_file`."""
|
|
111
|
+
|
|
112
|
+
file_data: Optional[str]
|
|
113
|
+
"""The base64-encoded data of the file to be sent to the model."""
|
|
114
|
+
|
|
115
|
+
file_id: Optional[str]
|
|
116
|
+
"""The ID of the file to be sent to the model."""
|
|
117
|
+
|
|
118
|
+
file_url: Optional[str]
|
|
119
|
+
"""The URL of the file to be sent to the model."""
|
|
120
|
+
|
|
121
|
+
filename: Optional[str]
|
|
122
|
+
"""The name of the file to be sent to the model."""
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
FunctionCallOutputOutputUnionMember1: TypeAlias = Union[
|
|
126
|
+
FunctionCallOutputOutputUnionMember1InputText,
|
|
127
|
+
FunctionCallOutputOutputUnionMember1InputImage,
|
|
128
|
+
FunctionCallOutputOutputUnionMember1InputFile,
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class FunctionCallOutput(TypedDict, total=False):
|
|
133
|
+
call_id: Required[str]
|
|
134
|
+
"""The unique ID of the function tool call generated by the model."""
|
|
135
|
+
|
|
136
|
+
output: Required[Union[str, Iterable[FunctionCallOutputOutputUnionMember1]]]
|
|
137
|
+
"""Text, image, or file output of the function tool call."""
|
|
138
|
+
|
|
139
|
+
type: Required[Literal["function_call_output"]]
|
|
140
|
+
"""The type of the function tool call output. Always `function_call_output`."""
|
|
141
|
+
|
|
142
|
+
id: Optional[str]
|
|
143
|
+
"""The unique ID of the function tool call output.
|
|
144
|
+
|
|
145
|
+
Populated when this item is returned via API.
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
status: Optional[FunctionCallItemStatus]
|
|
149
|
+
"""The status of the item.
|
|
150
|
+
|
|
151
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
152
|
+
returned via API.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class McpApprovalResponse(TypedDict, total=False):
|
|
157
|
+
approval_request_id: Required[str]
|
|
158
|
+
"""The ID of the approval request being answered."""
|
|
159
|
+
|
|
160
|
+
approve: Required[bool]
|
|
161
|
+
"""Whether the request was approved."""
|
|
162
|
+
|
|
163
|
+
type: Required[Literal["mcp_approval_response"]]
|
|
164
|
+
"""The type of the item. Always `mcp_approval_response`."""
|
|
165
|
+
|
|
166
|
+
id: Optional[str]
|
|
167
|
+
"""The unique ID of the approval response"""
|
|
168
|
+
|
|
169
|
+
reason: Optional[str]
|
|
170
|
+
"""Optional reason for the decision."""
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class ItemReference(TypedDict, total=False):
|
|
174
|
+
id: Required[str]
|
|
175
|
+
"""The ID of the item to reference."""
|
|
176
|
+
|
|
177
|
+
type: Optional[Literal["item_reference"]]
|
|
178
|
+
"""The type of item to reference. Always `item_reference`."""
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
InputItemParam: TypeAlias = Union[
|
|
182
|
+
EasyInputMessageParam,
|
|
183
|
+
InputMessageParam,
|
|
184
|
+
OutputMessageParam,
|
|
185
|
+
FileSearchToolCallParam,
|
|
186
|
+
ComputerToolCallParam,
|
|
187
|
+
ComputerCallOutput,
|
|
188
|
+
WebSearchToolCallParam,
|
|
189
|
+
FunctionToolCallParam,
|
|
190
|
+
FunctionCallOutput,
|
|
191
|
+
ReasoningItemParam,
|
|
192
|
+
ImageGenToolCallParam,
|
|
193
|
+
CodeInterpreterToolCallParam,
|
|
194
|
+
LocalShellToolCallParam,
|
|
195
|
+
LocalShellToolCallOutputParam,
|
|
196
|
+
McpListToolsParam,
|
|
197
|
+
McpApprovalRequestParam,
|
|
198
|
+
McpApprovalResponse,
|
|
199
|
+
McpToolCallParam,
|
|
200
|
+
CustomToolCallOutputParam,
|
|
201
|
+
CustomToolCallParam,
|
|
202
|
+
ItemReference,
|
|
203
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
from .input_content import InputContent
|
|
8
|
+
|
|
9
|
+
__all__ = ["InputMessage"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class InputMessage(BaseModel):
|
|
13
|
+
content: List[InputContent]
|
|
14
|
+
"""
|
|
15
|
+
A list of one or many input items to the model, containing different content
|
|
16
|
+
types.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
role: Literal["user", "system", "developer"]
|
|
20
|
+
"""The role of the message input. One of `user`, `system`, or `developer`."""
|
|
21
|
+
|
|
22
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
|
|
23
|
+
"""The status of item.
|
|
24
|
+
|
|
25
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
26
|
+
returned via API.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
type: Optional[Literal["message"]] = None
|
|
30
|
+
"""The type of the message input. Always set to `message`."""
|
|
@@ -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 import Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .input_content_param import InputContentParam
|
|
9
|
+
|
|
10
|
+
__all__ = ["InputMessageParam"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class InputMessageParam(TypedDict, total=False):
|
|
14
|
+
content: Required[Iterable[InputContentParam]]
|
|
15
|
+
"""
|
|
16
|
+
A list of one or many input items to the model, containing different content
|
|
17
|
+
types.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
role: Required[Literal["user", "system", "developer"]]
|
|
21
|
+
"""The role of the message input. One of `user`, `system`, or `developer`."""
|
|
22
|
+
|
|
23
|
+
status: Literal["in_progress", "completed", "incomplete"]
|
|
24
|
+
"""The status of item.
|
|
25
|
+
|
|
26
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
27
|
+
returned via API.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type: Literal["message"]
|
|
31
|
+
"""The type of the message input. Always set to `message`."""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["InputTextContent"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InputTextContent(BaseModel):
|
|
11
|
+
text: str
|
|
12
|
+
"""The text input to the model."""
|
|
13
|
+
|
|
14
|
+
type: Literal["input_text"]
|
|
15
|
+
"""The type of the input item. Always `input_text`."""
|
|
@@ -0,0 +1,15 @@
|
|
|
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__ = ["InputTextContentParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InputTextContentParam(TypedDict, total=False):
|
|
11
|
+
text: Required[str]
|
|
12
|
+
"""The text input to the model."""
|
|
13
|
+
|
|
14
|
+
type: Required[Literal["input_text"]]
|
|
15
|
+
"""The type of the input item. Always `input_text`."""
|
|
@@ -0,0 +1,24 @@
|
|
|
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 List, Iterable
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .includable import Includable
|
|
9
|
+
from .input_item_param import InputItemParam
|
|
10
|
+
|
|
11
|
+
__all__ = ["ItemCreateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ItemCreateParams(TypedDict, total=False):
|
|
15
|
+
items: Required[Iterable[InputItemParam]]
|
|
16
|
+
"""The items to add to the conversation. You may add up to 20 items at a time."""
|
|
17
|
+
|
|
18
|
+
include: List[Includable]
|
|
19
|
+
"""Additional fields to include in the response.
|
|
20
|
+
|
|
21
|
+
See the `include` parameter for
|
|
22
|
+
[listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
|
|
23
|
+
for more information.
|
|
24
|
+
"""
|
|
@@ -0,0 +1,50 @@
|
|
|
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 List
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from .includable import Includable
|
|
9
|
+
|
|
10
|
+
__all__ = ["ItemListParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ItemListParams(TypedDict, total=False):
|
|
14
|
+
after: str
|
|
15
|
+
"""An item ID to list items after, used in pagination."""
|
|
16
|
+
|
|
17
|
+
include: List[Includable]
|
|
18
|
+
"""Specify additional output data to include in the model response.
|
|
19
|
+
|
|
20
|
+
Currently supported values are:
|
|
21
|
+
|
|
22
|
+
- `web_search_call.action.sources`: Include the sources of the web search tool
|
|
23
|
+
call.
|
|
24
|
+
- `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
25
|
+
in code interpreter tool call items.
|
|
26
|
+
- `computer_call_output.output.image_url`: Include image urls from the computer
|
|
27
|
+
call output.
|
|
28
|
+
- `file_search_call.results`: Include the search results of the file search tool
|
|
29
|
+
call.
|
|
30
|
+
- `message.input_image.image_url`: Include image urls from the input message.
|
|
31
|
+
- `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
32
|
+
- `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
33
|
+
tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
34
|
+
multi-turn conversations when using the Responses API statelessly (like when
|
|
35
|
+
the `store` parameter is set to `false`, or when an organization is enrolled
|
|
36
|
+
in the zero data retention program).
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
limit: int
|
|
40
|
+
"""A limit on the number of objects to be returned.
|
|
41
|
+
|
|
42
|
+
Limit can range between 1 and 100, and the default is 20.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
order: Literal["asc", "desc"]
|
|
46
|
+
"""The order to return the input items in. Default is `desc`.
|
|
47
|
+
|
|
48
|
+
- `asc`: Return the input items in ascending order.
|
|
49
|
+
- `desc`: Return the input items in descending order.
|
|
50
|
+
"""
|
|
@@ -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 List
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .includable import Includable
|
|
9
|
+
|
|
10
|
+
__all__ = ["ItemRetrieveParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ItemRetrieveParams(TypedDict, total=False):
|
|
14
|
+
conversation_id: Required[str]
|
|
15
|
+
|
|
16
|
+
include: List[Includable]
|
|
17
|
+
"""Additional fields to include in the response.
|
|
18
|
+
|
|
19
|
+
See the `include` parameter for
|
|
20
|
+
[listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
|
|
21
|
+
for more information.
|
|
22
|
+
"""
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["LocalShellToolCall", "Action"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Action(BaseModel):
|
|
12
|
+
command: List[str]
|
|
13
|
+
"""The command to run."""
|
|
14
|
+
|
|
15
|
+
env: Dict[str, str]
|
|
16
|
+
"""Environment variables to set for the command."""
|
|
17
|
+
|
|
18
|
+
type: Literal["exec"]
|
|
19
|
+
"""The type of the local shell action. Always `exec`."""
|
|
20
|
+
|
|
21
|
+
timeout_ms: Optional[int] = None
|
|
22
|
+
"""Optional timeout in milliseconds for the command."""
|
|
23
|
+
|
|
24
|
+
user: Optional[str] = None
|
|
25
|
+
"""Optional user to run the command as."""
|
|
26
|
+
|
|
27
|
+
working_directory: Optional[str] = None
|
|
28
|
+
"""Optional working directory to run the command in."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class LocalShellToolCall(BaseModel):
|
|
32
|
+
id: str
|
|
33
|
+
"""The unique ID of the local shell call."""
|
|
34
|
+
|
|
35
|
+
action: Action
|
|
36
|
+
"""Execute a shell command on the server."""
|
|
37
|
+
|
|
38
|
+
call_id: str
|
|
39
|
+
"""The unique ID of the local shell tool call generated by the model."""
|
|
40
|
+
|
|
41
|
+
status: Literal["in_progress", "completed", "incomplete"]
|
|
42
|
+
"""The status of the local shell call."""
|
|
43
|
+
|
|
44
|
+
type: Literal["local_shell_call"]
|
|
45
|
+
"""The type of the local shell call. Always `local_shell_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__ = ["LocalShellToolCallOutput"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LocalShellToolCallOutput(BaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
"""The unique ID of the local shell tool call generated by the model."""
|
|
14
|
+
|
|
15
|
+
output: str
|
|
16
|
+
"""A JSON string of the output of the local shell tool call."""
|
|
17
|
+
|
|
18
|
+
type: Literal["local_shell_call_output"]
|
|
19
|
+
"""The type of the local shell tool call output. Always `local_shell_call_output`."""
|
|
20
|
+
|
|
21
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
|
|
22
|
+
"""The status of the item. One of `in_progress`, `completed`, or `incomplete`."""
|
|
@@ -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__ = ["LocalShellToolCallOutputParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LocalShellToolCallOutputParam(TypedDict, total=False):
|
|
12
|
+
id: Required[str]
|
|
13
|
+
"""The unique ID of the local shell tool call generated by the model."""
|
|
14
|
+
|
|
15
|
+
output: Required[str]
|
|
16
|
+
"""A JSON string of the output of the local shell tool call."""
|
|
17
|
+
|
|
18
|
+
type: Required[Literal["local_shell_call_output"]]
|
|
19
|
+
"""The type of the local shell tool call output. Always `local_shell_call_output`."""
|
|
20
|
+
|
|
21
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]]
|
|
22
|
+
"""The status of the item. One of `in_progress`, `completed`, or `incomplete`."""
|
|
@@ -0,0 +1,47 @@
|
|
|
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 Dict, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["LocalShellToolCallParam", "Action"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Action(TypedDict, total=False):
|
|
14
|
+
command: Required[SequenceNotStr[str]]
|
|
15
|
+
"""The command to run."""
|
|
16
|
+
|
|
17
|
+
env: Required[Dict[str, str]]
|
|
18
|
+
"""Environment variables to set for the command."""
|
|
19
|
+
|
|
20
|
+
type: Required[Literal["exec"]]
|
|
21
|
+
"""The type of the local shell action. Always `exec`."""
|
|
22
|
+
|
|
23
|
+
timeout_ms: Optional[int]
|
|
24
|
+
"""Optional timeout in milliseconds for the command."""
|
|
25
|
+
|
|
26
|
+
user: Optional[str]
|
|
27
|
+
"""Optional user to run the command as."""
|
|
28
|
+
|
|
29
|
+
working_directory: Optional[str]
|
|
30
|
+
"""Optional working directory to run the command in."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class LocalShellToolCallParam(TypedDict, total=False):
|
|
34
|
+
id: Required[str]
|
|
35
|
+
"""The unique ID of the local shell call."""
|
|
36
|
+
|
|
37
|
+
action: Required[Action]
|
|
38
|
+
"""Execute a shell command on the server."""
|
|
39
|
+
|
|
40
|
+
call_id: Required[str]
|
|
41
|
+
"""The unique ID of the local shell tool call generated by the model."""
|
|
42
|
+
|
|
43
|
+
status: Required[Literal["in_progress", "completed", "incomplete"]]
|
|
44
|
+
"""The status of the local shell call."""
|
|
45
|
+
|
|
46
|
+
type: Required[Literal["local_shell_call"]]
|
|
47
|
+
"""The type of the local shell call. Always `local_shell_call`."""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["McpApprovalRequest"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class McpApprovalRequest(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The unique ID of the approval request."""
|
|
13
|
+
|
|
14
|
+
arguments: str
|
|
15
|
+
"""A JSON string of arguments for the tool."""
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
"""The name of the tool to run."""
|
|
19
|
+
|
|
20
|
+
server_label: str
|
|
21
|
+
"""The label of the MCP server making the request."""
|
|
22
|
+
|
|
23
|
+
type: Literal["mcp_approval_request"]
|
|
24
|
+
"""The type of the item. Always `mcp_approval_request`."""
|
|
@@ -0,0 +1,24 @@
|
|
|
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__ = ["McpApprovalRequestParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class McpApprovalRequestParam(TypedDict, total=False):
|
|
11
|
+
id: Required[str]
|
|
12
|
+
"""The unique ID of the approval request."""
|
|
13
|
+
|
|
14
|
+
arguments: Required[str]
|
|
15
|
+
"""A JSON string of arguments for the tool."""
|
|
16
|
+
|
|
17
|
+
name: Required[str]
|
|
18
|
+
"""The name of the tool to run."""
|
|
19
|
+
|
|
20
|
+
server_label: Required[str]
|
|
21
|
+
"""The label of the MCP server making the request."""
|
|
22
|
+
|
|
23
|
+
type: Required[Literal["mcp_approval_request"]]
|
|
24
|
+
"""The type of the item. Always `mcp_approval_request`."""
|
|
@@ -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__ = ["McpApprovalResponseResource"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class McpApprovalResponseResource(BaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
"""The unique ID of the approval response"""
|
|
14
|
+
|
|
15
|
+
approval_request_id: str
|
|
16
|
+
"""The ID of the approval request being answered."""
|
|
17
|
+
|
|
18
|
+
approve: bool
|
|
19
|
+
"""Whether the request was approved."""
|
|
20
|
+
|
|
21
|
+
type: Literal["mcp_approval_response"]
|
|
22
|
+
"""The type of the item. Always `mcp_approval_response`."""
|
|
23
|
+
|
|
24
|
+
reason: Optional[str] = None
|
|
25
|
+
"""Optional reason for the decision."""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["McpListTools", "Tool"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Tool(BaseModel):
|
|
12
|
+
input_schema: object
|
|
13
|
+
"""The JSON schema describing the tool's input."""
|
|
14
|
+
|
|
15
|
+
name: str
|
|
16
|
+
"""The name of the tool."""
|
|
17
|
+
|
|
18
|
+
annotations: Optional[object] = None
|
|
19
|
+
"""Additional annotations about the tool."""
|
|
20
|
+
|
|
21
|
+
description: Optional[str] = None
|
|
22
|
+
"""The description of the tool."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class McpListTools(BaseModel):
|
|
26
|
+
id: str
|
|
27
|
+
"""The unique ID of the list."""
|
|
28
|
+
|
|
29
|
+
server_label: str
|
|
30
|
+
"""The label of the MCP server."""
|
|
31
|
+
|
|
32
|
+
tools: List[Tool]
|
|
33
|
+
"""The tools available on the server."""
|
|
34
|
+
|
|
35
|
+
type: Literal["mcp_list_tools"]
|
|
36
|
+
"""The type of the item. Always `mcp_list_tools`."""
|
|
37
|
+
|
|
38
|
+
error: Optional[str] = None
|
|
39
|
+
"""Error message if the server could not list tools."""
|