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,39 @@
|
|
|
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, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["McpListToolsParam", "Tool"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Tool(TypedDict, total=False):
|
|
12
|
+
input_schema: Required[object]
|
|
13
|
+
"""The JSON schema describing the tool's input."""
|
|
14
|
+
|
|
15
|
+
name: Required[str]
|
|
16
|
+
"""The name of the tool."""
|
|
17
|
+
|
|
18
|
+
annotations: Optional[object]
|
|
19
|
+
"""Additional annotations about the tool."""
|
|
20
|
+
|
|
21
|
+
description: Optional[str]
|
|
22
|
+
"""The description of the tool."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class McpListToolsParam(TypedDict, total=False):
|
|
26
|
+
id: Required[str]
|
|
27
|
+
"""The unique ID of the list."""
|
|
28
|
+
|
|
29
|
+
server_label: Required[str]
|
|
30
|
+
"""The label of the MCP server."""
|
|
31
|
+
|
|
32
|
+
tools: Required[Iterable[Tool]]
|
|
33
|
+
"""The tools available on the server."""
|
|
34
|
+
|
|
35
|
+
type: Required[Literal["mcp_list_tools"]]
|
|
36
|
+
"""The type of the item. Always `mcp_list_tools`."""
|
|
37
|
+
|
|
38
|
+
error: Optional[str]
|
|
39
|
+
"""Error message if the server could not list tools."""
|
|
@@ -0,0 +1,44 @@
|
|
|
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__ = ["McpToolCall"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class McpToolCall(BaseModel):
|
|
12
|
+
id: str
|
|
13
|
+
"""The unique ID of the tool call."""
|
|
14
|
+
|
|
15
|
+
arguments: str
|
|
16
|
+
"""A JSON string of the arguments passed to the tool."""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
"""The name of the tool that was run."""
|
|
20
|
+
|
|
21
|
+
server_label: str
|
|
22
|
+
"""The label of the MCP server running the tool."""
|
|
23
|
+
|
|
24
|
+
type: Literal["mcp_call"]
|
|
25
|
+
"""The type of the item. Always `mcp_call`."""
|
|
26
|
+
|
|
27
|
+
approval_request_id: Optional[str] = None
|
|
28
|
+
"""
|
|
29
|
+
Unique identifier for the MCP tool call approval request. Include this value in
|
|
30
|
+
a subsequent `mcp_approval_response` input to approve or reject the
|
|
31
|
+
corresponding tool call.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
error: Optional[str] = None
|
|
35
|
+
"""The error from the tool call, if any."""
|
|
36
|
+
|
|
37
|
+
output: Optional[str] = None
|
|
38
|
+
"""The output from the tool call."""
|
|
39
|
+
|
|
40
|
+
status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
|
|
41
|
+
"""The status of the tool call.
|
|
42
|
+
|
|
43
|
+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
|
|
44
|
+
"""
|
|
@@ -0,0 +1,44 @@
|
|
|
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__ = ["McpToolCallParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class McpToolCallParam(TypedDict, total=False):
|
|
12
|
+
id: Required[str]
|
|
13
|
+
"""The unique ID of the tool call."""
|
|
14
|
+
|
|
15
|
+
arguments: Required[str]
|
|
16
|
+
"""A JSON string of the arguments passed to the tool."""
|
|
17
|
+
|
|
18
|
+
name: Required[str]
|
|
19
|
+
"""The name of the tool that was run."""
|
|
20
|
+
|
|
21
|
+
server_label: Required[str]
|
|
22
|
+
"""The label of the MCP server running the tool."""
|
|
23
|
+
|
|
24
|
+
type: Required[Literal["mcp_call"]]
|
|
25
|
+
"""The type of the item. Always `mcp_call`."""
|
|
26
|
+
|
|
27
|
+
approval_request_id: Optional[str]
|
|
28
|
+
"""
|
|
29
|
+
Unique identifier for the MCP tool call approval request. Include this value in
|
|
30
|
+
a subsequent `mcp_approval_response` input to approve or reject the
|
|
31
|
+
corresponding tool call.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
error: Optional[str]
|
|
35
|
+
"""The error from the tool call, if any."""
|
|
36
|
+
|
|
37
|
+
output: Optional[str]
|
|
38
|
+
"""The output from the tool call."""
|
|
39
|
+
|
|
40
|
+
status: Literal["in_progress", "completed", "incomplete", "calling", "failed"]
|
|
41
|
+
"""The status of the tool call.
|
|
42
|
+
|
|
43
|
+
One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
|
|
44
|
+
"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .refusal_content import RefusalContent
|
|
9
|
+
from .output_text_content import OutputTextContent
|
|
10
|
+
|
|
11
|
+
__all__ = ["OutputMessage", "Content"]
|
|
12
|
+
|
|
13
|
+
Content: TypeAlias = Annotated[Union[OutputTextContent, RefusalContent], PropertyInfo(discriminator="type")]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class OutputMessage(BaseModel):
|
|
17
|
+
id: str
|
|
18
|
+
"""The unique ID of the output message."""
|
|
19
|
+
|
|
20
|
+
content: List[Content]
|
|
21
|
+
"""The content of the output message."""
|
|
22
|
+
|
|
23
|
+
role: Literal["assistant"]
|
|
24
|
+
"""The role of the output message. Always `assistant`."""
|
|
25
|
+
|
|
26
|
+
status: Literal["in_progress", "completed", "incomplete"]
|
|
27
|
+
"""The status of the message input.
|
|
28
|
+
|
|
29
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when input items
|
|
30
|
+
are returned via API.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
type: Literal["message"]
|
|
34
|
+
"""The type of the output message. Always `message`."""
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .refusal_content_param import RefusalContentParam
|
|
9
|
+
from .output_text_content_param import OutputTextContentParam
|
|
10
|
+
|
|
11
|
+
__all__ = ["OutputMessageParam", "Content"]
|
|
12
|
+
|
|
13
|
+
Content: TypeAlias = Union[OutputTextContentParam, RefusalContentParam]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class OutputMessageParam(TypedDict, total=False):
|
|
17
|
+
id: Required[str]
|
|
18
|
+
"""The unique ID of the output message."""
|
|
19
|
+
|
|
20
|
+
content: Required[Iterable[Content]]
|
|
21
|
+
"""The content of the output message."""
|
|
22
|
+
|
|
23
|
+
role: Required[Literal["assistant"]]
|
|
24
|
+
"""The role of the output message. Always `assistant`."""
|
|
25
|
+
|
|
26
|
+
status: Required[Literal["in_progress", "completed", "incomplete"]]
|
|
27
|
+
"""The status of the message input.
|
|
28
|
+
|
|
29
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when input items
|
|
30
|
+
are returned via API.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
type: Required[Literal["message"]]
|
|
34
|
+
"""The type of the output message. Always `message`."""
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"OutputTextContent",
|
|
11
|
+
"Annotation",
|
|
12
|
+
"AnnotationFileCitation",
|
|
13
|
+
"AnnotationURLCitation",
|
|
14
|
+
"AnnotationContainerFileCitation",
|
|
15
|
+
"AnnotationFilePath",
|
|
16
|
+
"Logprob",
|
|
17
|
+
"LogprobTopLogprob",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AnnotationFileCitation(BaseModel):
|
|
22
|
+
file_id: str
|
|
23
|
+
"""The ID of the file."""
|
|
24
|
+
|
|
25
|
+
filename: str
|
|
26
|
+
"""The filename of the file cited."""
|
|
27
|
+
|
|
28
|
+
index: int
|
|
29
|
+
"""The index of the file in the list of files."""
|
|
30
|
+
|
|
31
|
+
type: Literal["file_citation"]
|
|
32
|
+
"""The type of the file citation. Always `file_citation`."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AnnotationURLCitation(BaseModel):
|
|
36
|
+
end_index: int
|
|
37
|
+
"""The index of the last character of the URL citation in the message."""
|
|
38
|
+
|
|
39
|
+
start_index: int
|
|
40
|
+
"""The index of the first character of the URL citation in the message."""
|
|
41
|
+
|
|
42
|
+
title: str
|
|
43
|
+
"""The title of the web resource."""
|
|
44
|
+
|
|
45
|
+
type: Literal["url_citation"]
|
|
46
|
+
"""The type of the URL citation. Always `url_citation`."""
|
|
47
|
+
|
|
48
|
+
url: str
|
|
49
|
+
"""The URL of the web resource."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class AnnotationContainerFileCitation(BaseModel):
|
|
53
|
+
container_id: str
|
|
54
|
+
"""The ID of the container file."""
|
|
55
|
+
|
|
56
|
+
end_index: int
|
|
57
|
+
"""The index of the last character of the container file citation in the message."""
|
|
58
|
+
|
|
59
|
+
file_id: str
|
|
60
|
+
"""The ID of the file."""
|
|
61
|
+
|
|
62
|
+
filename: str
|
|
63
|
+
"""The filename of the container file cited."""
|
|
64
|
+
|
|
65
|
+
start_index: int
|
|
66
|
+
"""The index of the first character of the container file citation in the message."""
|
|
67
|
+
|
|
68
|
+
type: Literal["container_file_citation"]
|
|
69
|
+
"""The type of the container file citation. Always `container_file_citation`."""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class AnnotationFilePath(BaseModel):
|
|
73
|
+
file_id: str
|
|
74
|
+
"""The ID of the file."""
|
|
75
|
+
|
|
76
|
+
index: int
|
|
77
|
+
"""The index of the file in the list of files."""
|
|
78
|
+
|
|
79
|
+
type: Literal["file_path"]
|
|
80
|
+
"""The type of the file path. Always `file_path`."""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
Annotation: TypeAlias = Annotated[
|
|
84
|
+
Union[AnnotationFileCitation, AnnotationURLCitation, AnnotationContainerFileCitation, AnnotationFilePath],
|
|
85
|
+
PropertyInfo(discriminator="type"),
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class LogprobTopLogprob(BaseModel):
|
|
90
|
+
token: str
|
|
91
|
+
|
|
92
|
+
bytes: List[int]
|
|
93
|
+
|
|
94
|
+
logprob: float
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class Logprob(BaseModel):
|
|
98
|
+
token: str
|
|
99
|
+
|
|
100
|
+
bytes: List[int]
|
|
101
|
+
|
|
102
|
+
logprob: float
|
|
103
|
+
|
|
104
|
+
top_logprobs: List[LogprobTopLogprob]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class OutputTextContent(BaseModel):
|
|
108
|
+
annotations: List[Annotation]
|
|
109
|
+
"""The annotations of the text output."""
|
|
110
|
+
|
|
111
|
+
text: str
|
|
112
|
+
"""The text output from the model."""
|
|
113
|
+
|
|
114
|
+
type: Literal["output_text"]
|
|
115
|
+
"""The type of the output text. Always `output_text`."""
|
|
116
|
+
|
|
117
|
+
logprobs: Optional[List[Logprob]] = None
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"OutputTextContentParam",
|
|
10
|
+
"Annotation",
|
|
11
|
+
"AnnotationFileCitation",
|
|
12
|
+
"AnnotationURLCitation",
|
|
13
|
+
"AnnotationContainerFileCitation",
|
|
14
|
+
"AnnotationFilePath",
|
|
15
|
+
"Logprob",
|
|
16
|
+
"LogprobTopLogprob",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AnnotationFileCitation(TypedDict, total=False):
|
|
21
|
+
file_id: Required[str]
|
|
22
|
+
"""The ID of the file."""
|
|
23
|
+
|
|
24
|
+
filename: Required[str]
|
|
25
|
+
"""The filename of the file cited."""
|
|
26
|
+
|
|
27
|
+
index: Required[int]
|
|
28
|
+
"""The index of the file in the list of files."""
|
|
29
|
+
|
|
30
|
+
type: Required[Literal["file_citation"]]
|
|
31
|
+
"""The type of the file citation. Always `file_citation`."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class AnnotationURLCitation(TypedDict, total=False):
|
|
35
|
+
end_index: Required[int]
|
|
36
|
+
"""The index of the last character of the URL citation in the message."""
|
|
37
|
+
|
|
38
|
+
start_index: Required[int]
|
|
39
|
+
"""The index of the first character of the URL citation in the message."""
|
|
40
|
+
|
|
41
|
+
title: Required[str]
|
|
42
|
+
"""The title of the web resource."""
|
|
43
|
+
|
|
44
|
+
type: Required[Literal["url_citation"]]
|
|
45
|
+
"""The type of the URL citation. Always `url_citation`."""
|
|
46
|
+
|
|
47
|
+
url: Required[str]
|
|
48
|
+
"""The URL of the web resource."""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AnnotationContainerFileCitation(TypedDict, total=False):
|
|
52
|
+
container_id: Required[str]
|
|
53
|
+
"""The ID of the container file."""
|
|
54
|
+
|
|
55
|
+
end_index: Required[int]
|
|
56
|
+
"""The index of the last character of the container file citation in the message."""
|
|
57
|
+
|
|
58
|
+
file_id: Required[str]
|
|
59
|
+
"""The ID of the file."""
|
|
60
|
+
|
|
61
|
+
filename: Required[str]
|
|
62
|
+
"""The filename of the container file cited."""
|
|
63
|
+
|
|
64
|
+
start_index: Required[int]
|
|
65
|
+
"""The index of the first character of the container file citation in the message."""
|
|
66
|
+
|
|
67
|
+
type: Required[Literal["container_file_citation"]]
|
|
68
|
+
"""The type of the container file citation. Always `container_file_citation`."""
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class AnnotationFilePath(TypedDict, total=False):
|
|
72
|
+
file_id: Required[str]
|
|
73
|
+
"""The ID of the file."""
|
|
74
|
+
|
|
75
|
+
index: Required[int]
|
|
76
|
+
"""The index of the file in the list of files."""
|
|
77
|
+
|
|
78
|
+
type: Required[Literal["file_path"]]
|
|
79
|
+
"""The type of the file path. Always `file_path`."""
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
Annotation: TypeAlias = Union[
|
|
83
|
+
AnnotationFileCitation, AnnotationURLCitation, AnnotationContainerFileCitation, AnnotationFilePath
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class LogprobTopLogprob(TypedDict, total=False):
|
|
88
|
+
token: Required[str]
|
|
89
|
+
|
|
90
|
+
bytes: Required[Iterable[int]]
|
|
91
|
+
|
|
92
|
+
logprob: Required[float]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class Logprob(TypedDict, total=False):
|
|
96
|
+
token: Required[str]
|
|
97
|
+
|
|
98
|
+
bytes: Required[Iterable[int]]
|
|
99
|
+
|
|
100
|
+
logprob: Required[float]
|
|
101
|
+
|
|
102
|
+
top_logprobs: Required[Iterable[LogprobTopLogprob]]
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class OutputTextContentParam(TypedDict, total=False):
|
|
106
|
+
annotations: Required[Iterable[Annotation]]
|
|
107
|
+
"""The annotations of the text output."""
|
|
108
|
+
|
|
109
|
+
text: Required[str]
|
|
110
|
+
"""The text output from the model."""
|
|
111
|
+
|
|
112
|
+
type: Required[Literal["output_text"]]
|
|
113
|
+
"""The type of the output text. Always `output_text`."""
|
|
114
|
+
|
|
115
|
+
logprobs: Iterable[Logprob]
|
|
@@ -0,0 +1,44 @@
|
|
|
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 .reasoning_text_content import ReasoningTextContent
|
|
8
|
+
|
|
9
|
+
__all__ = ["ReasoningItem", "Summary"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Summary(BaseModel):
|
|
13
|
+
text: str
|
|
14
|
+
"""A summary of the reasoning output from the model so far."""
|
|
15
|
+
|
|
16
|
+
type: Literal["summary_text"]
|
|
17
|
+
"""The type of the object. Always `summary_text`."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ReasoningItem(BaseModel):
|
|
21
|
+
id: str
|
|
22
|
+
"""The unique identifier of the reasoning content."""
|
|
23
|
+
|
|
24
|
+
summary: List[Summary]
|
|
25
|
+
"""Reasoning summary content."""
|
|
26
|
+
|
|
27
|
+
type: Literal["reasoning"]
|
|
28
|
+
"""The type of the object. Always `reasoning`."""
|
|
29
|
+
|
|
30
|
+
content: Optional[List[ReasoningTextContent]] = None
|
|
31
|
+
"""Reasoning text content."""
|
|
32
|
+
|
|
33
|
+
encrypted_content: Optional[str] = None
|
|
34
|
+
"""
|
|
35
|
+
The encrypted content of the reasoning item - populated when a response is
|
|
36
|
+
generated with `reasoning.encrypted_content` in the `include` parameter.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
|
|
40
|
+
"""The status of the item.
|
|
41
|
+
|
|
42
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
43
|
+
returned via API.
|
|
44
|
+
"""
|
|
@@ -0,0 +1,45 @@
|
|
|
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, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .reasoning_text_content_param import ReasoningTextContentParam
|
|
9
|
+
|
|
10
|
+
__all__ = ["ReasoningItemParam", "Summary"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Summary(TypedDict, total=False):
|
|
14
|
+
text: Required[str]
|
|
15
|
+
"""A summary of the reasoning output from the model so far."""
|
|
16
|
+
|
|
17
|
+
type: Required[Literal["summary_text"]]
|
|
18
|
+
"""The type of the object. Always `summary_text`."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ReasoningItemParam(TypedDict, total=False):
|
|
22
|
+
id: Required[str]
|
|
23
|
+
"""The unique identifier of the reasoning content."""
|
|
24
|
+
|
|
25
|
+
summary: Required[Iterable[Summary]]
|
|
26
|
+
"""Reasoning summary content."""
|
|
27
|
+
|
|
28
|
+
type: Required[Literal["reasoning"]]
|
|
29
|
+
"""The type of the object. Always `reasoning`."""
|
|
30
|
+
|
|
31
|
+
content: Iterable[ReasoningTextContentParam]
|
|
32
|
+
"""Reasoning text content."""
|
|
33
|
+
|
|
34
|
+
encrypted_content: Optional[str]
|
|
35
|
+
"""
|
|
36
|
+
The encrypted content of the reasoning item - populated when a response is
|
|
37
|
+
generated with `reasoning.encrypted_content` in the `include` parameter.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
status: Literal["in_progress", "completed", "incomplete"]
|
|
41
|
+
"""The status of the item.
|
|
42
|
+
|
|
43
|
+
One of `in_progress`, `completed`, or `incomplete`. Populated when items are
|
|
44
|
+
returned via API.
|
|
45
|
+
"""
|
|
@@ -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__ = ["ReasoningTextContent"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReasoningTextContent(BaseModel):
|
|
11
|
+
text: str
|
|
12
|
+
"""The reasoning text from the model."""
|
|
13
|
+
|
|
14
|
+
type: Literal["reasoning_text"]
|
|
15
|
+
"""The type of the reasoning text. Always `reasoning_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__ = ["ReasoningTextContentParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReasoningTextContentParam(TypedDict, total=False):
|
|
11
|
+
text: Required[str]
|
|
12
|
+
"""The reasoning text from the model."""
|
|
13
|
+
|
|
14
|
+
type: Required[Literal["reasoning_text"]]
|
|
15
|
+
"""The type of the reasoning text. Always `reasoning_text`."""
|
|
@@ -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__ = ["RefusalContent"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RefusalContent(BaseModel):
|
|
11
|
+
refusal: str
|
|
12
|
+
"""The refusal explanation from the model."""
|
|
13
|
+
|
|
14
|
+
type: Literal["refusal"]
|
|
15
|
+
"""The type of the refusal. Always `refusal`."""
|
|
@@ -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__ = ["RefusalContentParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RefusalContentParam(TypedDict, total=False):
|
|
11
|
+
refusal: Required[str]
|
|
12
|
+
"""The refusal explanation from the model."""
|
|
13
|
+
|
|
14
|
+
type: Required[Literal["refusal"]]
|
|
15
|
+
"""The type of the refusal. Always `refusal`."""
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
|
|
9
|
+
__all__ = ["WebSearchToolCall", "Action", "ActionSearch", "ActionSearchSource", "ActionOpenPage", "ActionFind"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ActionSearchSource(BaseModel):
|
|
13
|
+
type: Literal["url"]
|
|
14
|
+
"""The type of source. Always `url`."""
|
|
15
|
+
|
|
16
|
+
url: str
|
|
17
|
+
"""The URL of the source."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ActionSearch(BaseModel):
|
|
21
|
+
query: str
|
|
22
|
+
"""The search query."""
|
|
23
|
+
|
|
24
|
+
type: Literal["search"]
|
|
25
|
+
"""The action type."""
|
|
26
|
+
|
|
27
|
+
sources: Optional[List[ActionSearchSource]] = None
|
|
28
|
+
"""The sources used in the search."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ActionOpenPage(BaseModel):
|
|
32
|
+
type: Literal["open_page"]
|
|
33
|
+
"""The action type."""
|
|
34
|
+
|
|
35
|
+
url: str
|
|
36
|
+
"""The URL opened by the model."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ActionFind(BaseModel):
|
|
40
|
+
pattern: str
|
|
41
|
+
"""The pattern or text to search for within the page."""
|
|
42
|
+
|
|
43
|
+
type: Literal["find"]
|
|
44
|
+
"""The action type."""
|
|
45
|
+
|
|
46
|
+
url: str
|
|
47
|
+
"""The URL of the page searched for the pattern."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Action: TypeAlias = Annotated[Union[ActionSearch, ActionOpenPage, ActionFind], PropertyInfo(discriminator="type")]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class WebSearchToolCall(BaseModel):
|
|
54
|
+
id: str
|
|
55
|
+
"""The unique ID of the web search tool call."""
|
|
56
|
+
|
|
57
|
+
action: Action
|
|
58
|
+
"""
|
|
59
|
+
An object describing the specific action taken in this web search call. Includes
|
|
60
|
+
details on how the model used the web (search, open_page, find).
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
status: Literal["in_progress", "searching", "completed", "failed"]
|
|
64
|
+
"""The status of the web search tool call."""
|
|
65
|
+
|
|
66
|
+
type: Literal["web_search_call"]
|
|
67
|
+
"""The type of the web search tool call. Always `web_search_call`."""
|