byteplussdk-arkruntime 3.0.64__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.
Files changed (240) hide show
  1. byteplussdk_arkruntime-3.0.64.dist-info/METADATA +36 -0
  2. byteplussdk_arkruntime-3.0.64.dist-info/RECORD +240 -0
  3. byteplussdk_arkruntime-3.0.64.dist-info/WHEEL +5 -0
  4. byteplussdk_arkruntime-3.0.64.dist-info/licenses/LICENSE.txt +203 -0
  5. byteplussdk_arkruntime-3.0.64.dist-info/top_level.txt +1 -0
  6. byteplussdkarkruntime/__init__.py +7 -0
  7. byteplussdkarkruntime/_base_client.py +1439 -0
  8. byteplussdkarkruntime/_client.py +570 -0
  9. byteplussdkarkruntime/_compat.py +245 -0
  10. byteplussdkarkruntime/_constants.py +43 -0
  11. byteplussdkarkruntime/_exceptions.py +202 -0
  12. byteplussdkarkruntime/_files.py +149 -0
  13. byteplussdkarkruntime/_legacy_response.py +451 -0
  14. byteplussdkarkruntime/_models.py +734 -0
  15. byteplussdkarkruntime/_qs.py +168 -0
  16. byteplussdkarkruntime/_request_options.py +117 -0
  17. byteplussdkarkruntime/_resource.py +47 -0
  18. byteplussdkarkruntime/_response.py +615 -0
  19. byteplussdkarkruntime/_streaming.py +470 -0
  20. byteplussdkarkruntime/_types.py +210 -0
  21. byteplussdkarkruntime/_utils/__init__.py +58 -0
  22. byteplussdkarkruntime/_utils/_key_agreement.py +207 -0
  23. byteplussdkarkruntime/_utils/_logs.py +24 -0
  24. byteplussdkarkruntime/_utils/_model_breaker.py +83 -0
  25. byteplussdkarkruntime/_utils/_streams.py +12 -0
  26. byteplussdkarkruntime/_utils/_transform.py +489 -0
  27. byteplussdkarkruntime/_utils/_typing.py +171 -0
  28. byteplussdkarkruntime/_utils/_utils.py +497 -0
  29. byteplussdkarkruntime/common/__init__.py +14 -0
  30. byteplussdkarkruntime/common/_parsing/__init__.py +22 -0
  31. byteplussdkarkruntime/common/_parsing/_completions.py +290 -0
  32. byteplussdkarkruntime/common/_parsing/_responses.py +189 -0
  33. byteplussdkarkruntime/common/_pydantic.py +192 -0
  34. byteplussdkarkruntime/common/_tools.py +67 -0
  35. byteplussdkarkruntime/common/streaming/__init__.py +12 -0
  36. byteplussdkarkruntime/common/streaming/_deltas.py +86 -0
  37. byteplussdkarkruntime/common/streaming/chat/__init__.py +33 -0
  38. byteplussdkarkruntime/common/streaming/chat/_completions.py +772 -0
  39. byteplussdkarkruntime/common/streaming/chat/_events.py +103 -0
  40. byteplussdkarkruntime/common/streaming/chat/_types.py +36 -0
  41. byteplussdkarkruntime/pagination.py +134 -0
  42. byteplussdkarkruntime/resources/__init__.py +48 -0
  43. byteplussdkarkruntime/resources/batch/__init__.py +3 -0
  44. byteplussdkarkruntime/resources/batch/_utils.py +155 -0
  45. byteplussdkarkruntime/resources/batch/batch.py +37 -0
  46. byteplussdkarkruntime/resources/batch/chat/__init__.py +3 -0
  47. byteplussdkarkruntime/resources/batch/chat/chat.py +19 -0
  48. byteplussdkarkruntime/resources/batch/chat/completions.py +329 -0
  49. byteplussdkarkruntime/resources/batch/embeddings.py +105 -0
  50. byteplussdkarkruntime/resources/batch/multimodal_embeddings.py +111 -0
  51. byteplussdkarkruntime/resources/batch_chat/__init__.py +3 -0
  52. byteplussdkarkruntime/resources/batch_chat/chat.py +21 -0
  53. byteplussdkarkruntime/resources/batch_chat/completions.py +328 -0
  54. byteplussdkarkruntime/resources/beta/__init__.py +12 -0
  55. byteplussdkarkruntime/resources/beta/beta.py +81 -0
  56. byteplussdkarkruntime/resources/beta/chat/__init__.py +21 -0
  57. byteplussdkarkruntime/resources/beta/chat/chat.py +31 -0
  58. byteplussdkarkruntime/resources/beta/chat/completions.py +454 -0
  59. byteplussdkarkruntime/resources/chat/__init__.py +3 -0
  60. byteplussdkarkruntime/resources/chat/chat.py +21 -0
  61. byteplussdkarkruntime/resources/chat/completions.py +258 -0
  62. byteplussdkarkruntime/resources/content_generation/__init__.py +6 -0
  63. byteplussdkarkruntime/resources/content_generation/content_generation.py +17 -0
  64. byteplussdkarkruntime/resources/content_generation/tasks.py +348 -0
  65. byteplussdkarkruntime/resources/context/__init__.py +3 -0
  66. byteplussdkarkruntime/resources/context/completions.py +221 -0
  67. byteplussdkarkruntime/resources/context/context.py +98 -0
  68. byteplussdkarkruntime/resources/embeddings.py +110 -0
  69. byteplussdkarkruntime/resources/encryption.py +215 -0
  70. byteplussdkarkruntime/resources/files.py +592 -0
  71. byteplussdkarkruntime/resources/images/__init__.py +6 -0
  72. byteplussdkarkruntime/resources/images/images.py +335 -0
  73. byteplussdkarkruntime/resources/multimodal_embeddings.py +113 -0
  74. byteplussdkarkruntime/resources/responses/__init__.py +16 -0
  75. byteplussdkarkruntime/resources/responses/input_items.py +248 -0
  76. byteplussdkarkruntime/resources/responses/responses.py +417 -0
  77. byteplussdkarkruntime/types/__init__.py +28 -0
  78. byteplussdkarkruntime/types/chat/__init__.py +78 -0
  79. byteplussdkarkruntime/types/chat/chat_completion.py +93 -0
  80. byteplussdkarkruntime/types/chat/chat_completion_assistant_message_param.py +61 -0
  81. byteplussdkarkruntime/types/chat/chat_completion_audio.py +22 -0
  82. byteplussdkarkruntime/types/chat/chat_completion_chunk.py +165 -0
  83. byteplussdkarkruntime/types/chat/chat_completion_content_part_image_param.py +20 -0
  84. byteplussdkarkruntime/types/chat/chat_completion_content_part_param.py +30 -0
  85. byteplussdkarkruntime/types/chat/chat_completion_content_part_text_param.py +13 -0
  86. byteplussdkarkruntime/types/chat/chat_completion_content_part_video_param.py +32 -0
  87. byteplussdkarkruntime/types/chat/chat_completion_function_call_option_param.py +10 -0
  88. byteplussdkarkruntime/types/chat/chat_completion_function_message_param.py +17 -0
  89. byteplussdkarkruntime/types/chat/chat_completion_message.py +56 -0
  90. byteplussdkarkruntime/types/chat/chat_completion_message_param.py +19 -0
  91. byteplussdkarkruntime/types/chat/chat_completion_message_tool_call.py +29 -0
  92. byteplussdkarkruntime/types/chat/chat_completion_message_tool_call_param.py +29 -0
  93. byteplussdkarkruntime/types/chat/chat_completion_named_tool_choice_param.py +17 -0
  94. byteplussdkarkruntime/types/chat/chat_completion_role.py +5 -0
  95. byteplussdkarkruntime/types/chat/chat_completion_stream_options_param.py +19 -0
  96. byteplussdkarkruntime/types/chat/chat_completion_system_message_param.py +34 -0
  97. byteplussdkarkruntime/types/chat/chat_completion_token_logprob.py +55 -0
  98. byteplussdkarkruntime/types/chat/chat_completion_tool_choice_option_param.py +12 -0
  99. byteplussdkarkruntime/types/chat/chat_completion_tool_message_param.py +37 -0
  100. byteplussdkarkruntime/types/chat/chat_completion_tool_param.py +14 -0
  101. byteplussdkarkruntime/types/chat/chat_completion_user_message_param.py +34 -0
  102. byteplussdkarkruntime/types/chat/completion_create_params.py +258 -0
  103. byteplussdkarkruntime/types/chat/parsed_chat_completion.py +52 -0
  104. byteplussdkarkruntime/types/chat/parsed_function_tool_call.py +34 -0
  105. byteplussdkarkruntime/types/completion_usage.py +33 -0
  106. byteplussdkarkruntime/types/content_generation/__init__.py +0 -0
  107. byteplussdkarkruntime/types/content_generation/content_generation_task.py +106 -0
  108. byteplussdkarkruntime/types/content_generation/content_generation_task_id.py +11 -0
  109. byteplussdkarkruntime/types/content_generation/create_task_content_param.py +72 -0
  110. byteplussdkarkruntime/types/content_generation/list_content_generation_tasks_response.py +24 -0
  111. byteplussdkarkruntime/types/context/__init__.py +8 -0
  112. byteplussdkarkruntime/types/context/context_chat_completion.py +33 -0
  113. byteplussdkarkruntime/types/context/context_chat_completion_chunk.py +41 -0
  114. byteplussdkarkruntime/types/context/context_create_params.py +37 -0
  115. byteplussdkarkruntime/types/context/create_context_response.py +25 -0
  116. byteplussdkarkruntime/types/context/truncation_strategy.py +13 -0
  117. byteplussdkarkruntime/types/create_embedding_response.py +36 -0
  118. byteplussdkarkruntime/types/embedding.py +21 -0
  119. byteplussdkarkruntime/types/file_create_params.py +49 -0
  120. byteplussdkarkruntime/types/file_deleted.py +24 -0
  121. byteplussdkarkruntime/types/file_list_params.py +43 -0
  122. byteplussdkarkruntime/types/file_object.py +69 -0
  123. byteplussdkarkruntime/types/file_purpose.py +16 -0
  124. byteplussdkarkruntime/types/images/__init__.py +3 -0
  125. byteplussdkarkruntime/types/images/image_gen_completed_event.py +59 -0
  126. byteplussdkarkruntime/types/images/image_gen_generating_event.py +53 -0
  127. byteplussdkarkruntime/types/images/image_gen_stream_event.py +24 -0
  128. byteplussdkarkruntime/types/images/images.py +99 -0
  129. byteplussdkarkruntime/types/multimodal_embedding/__init__.py +15 -0
  130. byteplussdkarkruntime/types/multimodal_embedding/embedding_content_part_image_param.py +17 -0
  131. byteplussdkarkruntime/types/multimodal_embedding/embedding_content_part_text_param.py +13 -0
  132. byteplussdkarkruntime/types/multimodal_embedding/embedding_data.py +15 -0
  133. byteplussdkarkruntime/types/multimodal_embedding/embedding_input.py +12 -0
  134. byteplussdkarkruntime/types/multimodal_embedding/embedding_response.py +29 -0
  135. byteplussdkarkruntime/types/multimodal_embedding/embedding_usage.py +23 -0
  136. byteplussdkarkruntime/types/responses/__init__.py +133 -0
  137. byteplussdkarkruntime/types/responses/easy_input_message.py +36 -0
  138. byteplussdkarkruntime/types/responses/easy_input_message_param.py +37 -0
  139. byteplussdkarkruntime/types/responses/function_tool.py +35 -0
  140. byteplussdkarkruntime/types/responses/function_tool_param.py +35 -0
  141. byteplussdkarkruntime/types/responses/input_item_list_params.py +47 -0
  142. byteplussdkarkruntime/types/responses/mcp_input_item_param.py +109 -0
  143. byteplussdkarkruntime/types/responses/mcp_tool.py +80 -0
  144. byteplussdkarkruntime/types/responses/mcp_tool_param.py +78 -0
  145. byteplussdkarkruntime/types/responses/response.py +152 -0
  146. byteplussdkarkruntime/types/responses/response_annotation_added_event.py +36 -0
  147. byteplussdkarkruntime/types/responses/response_caching.py +25 -0
  148. byteplussdkarkruntime/types/responses/response_caching_param.py +22 -0
  149. byteplussdkarkruntime/types/responses/response_completed_event.py +26 -0
  150. byteplussdkarkruntime/types/responses/response_content_part_added_event.py +39 -0
  151. byteplussdkarkruntime/types/responses/response_content_part_done_event.py +39 -0
  152. byteplussdkarkruntime/types/responses/response_create_params.py +26 -0
  153. byteplussdkarkruntime/types/responses/response_created_event.py +26 -0
  154. byteplussdkarkruntime/types/responses/response_error.py +25 -0
  155. byteplussdkarkruntime/types/responses/response_error_event.py +32 -0
  156. byteplussdkarkruntime/types/responses/response_failed_event.py +26 -0
  157. byteplussdkarkruntime/types/responses/response_format_text_config.py +25 -0
  158. byteplussdkarkruntime/types/responses/response_format_text_config_param.py +25 -0
  159. byteplussdkarkruntime/types/responses/response_function_call_arguments_delta_event.py +33 -0
  160. byteplussdkarkruntime/types/responses/response_function_call_arguments_done_event.py +30 -0
  161. byteplussdkarkruntime/types/responses/response_function_tool_call.py +42 -0
  162. byteplussdkarkruntime/types/responses/response_function_tool_call_item.py +20 -0
  163. byteplussdkarkruntime/types/responses/response_function_tool_call_output_item.py +39 -0
  164. byteplussdkarkruntime/types/responses/response_function_tool_call_param.py +31 -0
  165. byteplussdkarkruntime/types/responses/response_in_progress_event.py +26 -0
  166. byteplussdkarkruntime/types/responses/response_includable.py +19 -0
  167. byteplussdkarkruntime/types/responses/response_incomplete_details.py +30 -0
  168. byteplussdkarkruntime/types/responses/response_incomplete_event.py +26 -0
  169. byteplussdkarkruntime/types/responses/response_input_content.py +24 -0
  170. byteplussdkarkruntime/types/responses/response_input_content_param.py +23 -0
  171. byteplussdkarkruntime/types/responses/response_input_image.py +38 -0
  172. byteplussdkarkruntime/types/responses/response_input_image_param.py +42 -0
  173. byteplussdkarkruntime/types/responses/response_input_image_pixel_limit_param.py +29 -0
  174. byteplussdkarkruntime/types/responses/response_input_message_content_list.py +20 -0
  175. byteplussdkarkruntime/types/responses/response_input_message_content_list_param.py +26 -0
  176. byteplussdkarkruntime/types/responses/response_input_message_item.py +43 -0
  177. byteplussdkarkruntime/types/responses/response_input_param.py +51 -0
  178. byteplussdkarkruntime/types/responses/response_input_text.py +25 -0
  179. byteplussdkarkruntime/types/responses/response_input_text_param.py +25 -0
  180. byteplussdkarkruntime/types/responses/response_input_video_param.py +34 -0
  181. byteplussdkarkruntime/types/responses/response_item.py +40 -0
  182. byteplussdkarkruntime/types/responses/response_item_list.py +36 -0
  183. byteplussdkarkruntime/types/responses/response_mcp_call_arguments_delta_event.py +37 -0
  184. byteplussdkarkruntime/types/responses/response_mcp_call_arguments_done_event.py +34 -0
  185. byteplussdkarkruntime/types/responses/response_mcp_call_completed_event.py +31 -0
  186. byteplussdkarkruntime/types/responses/response_mcp_call_failed_event.py +31 -0
  187. byteplussdkarkruntime/types/responses/response_mcp_call_in_progress_event.py +31 -0
  188. byteplussdkarkruntime/types/responses/response_mcp_item.py +110 -0
  189. byteplussdkarkruntime/types/responses/response_mcp_list_tools_completed_event.py +31 -0
  190. byteplussdkarkruntime/types/responses/response_mcp_list_tools_failed_event.py +31 -0
  191. byteplussdkarkruntime/types/responses/response_mcp_list_tools_in_progress_event.py +31 -0
  192. byteplussdkarkruntime/types/responses/response_output_item.py +36 -0
  193. byteplussdkarkruntime/types/responses/response_output_item_added_event.py +29 -0
  194. byteplussdkarkruntime/types/responses/response_output_item_done_event.py +29 -0
  195. byteplussdkarkruntime/types/responses/response_output_message.py +43 -0
  196. byteplussdkarkruntime/types/responses/response_output_text.py +61 -0
  197. byteplussdkarkruntime/types/responses/response_output_text_param.py +77 -0
  198. byteplussdkarkruntime/types/responses/response_reasoning_item.py +46 -0
  199. byteplussdkarkruntime/types/responses/response_reasoning_item_param.py +37 -0
  200. byteplussdkarkruntime/types/responses/response_reasoning_summary_part_added_event.py +42 -0
  201. byteplussdkarkruntime/types/responses/response_reasoning_summary_part_done_event.py +42 -0
  202. byteplussdkarkruntime/types/responses/response_reasoning_summary_text_delta_event.py +34 -0
  203. byteplussdkarkruntime/types/responses/response_reasoning_summary_text_done_event.py +34 -0
  204. byteplussdkarkruntime/types/responses/response_status.py +17 -0
  205. byteplussdkarkruntime/types/responses/response_stream_event.py +93 -0
  206. byteplussdkarkruntime/types/responses/response_text_config.py +28 -0
  207. byteplussdkarkruntime/types/responses/response_text_config_param.py +31 -0
  208. byteplussdkarkruntime/types/responses/response_text_delta_event.py +34 -0
  209. byteplussdkarkruntime/types/responses/response_text_done_event.py +34 -0
  210. byteplussdkarkruntime/types/responses/response_tool_usage.py +32 -0
  211. byteplussdkarkruntime/types/responses/response_usage.py +54 -0
  212. byteplussdkarkruntime/types/responses/response_web_search_call_completed_event.py +29 -0
  213. byteplussdkarkruntime/types/responses/response_web_search_call_in_progress_event.py +29 -0
  214. byteplussdkarkruntime/types/responses/response_web_search_call_searching_event.py +29 -0
  215. byteplussdkarkruntime/types/responses/response_web_search_item.py +43 -0
  216. byteplussdkarkruntime/types/responses/tool.py +25 -0
  217. byteplussdkarkruntime/types/responses/tool_choice_function.py +25 -0
  218. byteplussdkarkruntime/types/responses/tool_choice_function_param.py +25 -0
  219. byteplussdkarkruntime/types/responses/tool_choice_mcp_param.py +29 -0
  220. byteplussdkarkruntime/types/responses/tool_choice_options.py +17 -0
  221. byteplussdkarkruntime/types/responses/tool_param.py +24 -0
  222. byteplussdkarkruntime/types/responses/web_search_tool.py +49 -0
  223. byteplussdkarkruntime/types/responses/web_search_tool_param.py +46 -0
  224. byteplussdkarkruntime/types/shared/__init__.py +21 -0
  225. byteplussdkarkruntime/types/shared/reasoning.py +10 -0
  226. byteplussdkarkruntime/types/shared/reasoning_effort.py +16 -0
  227. byteplussdkarkruntime/types/shared/response_format_json_object.py +22 -0
  228. byteplussdkarkruntime/types/shared/response_format_json_schema.py +56 -0
  229. byteplussdkarkruntime/types/shared/response_format_text.py +22 -0
  230. byteplussdkarkruntime/types/shared/thinking.py +25 -0
  231. byteplussdkarkruntime/types/shared_params/__init__.py +13 -0
  232. byteplussdkarkruntime/types/shared_params/function_definition.py +34 -0
  233. byteplussdkarkruntime/types/shared_params/function_parameters.py +9 -0
  234. byteplussdkarkruntime/types/shared_params/metadata.py +20 -0
  235. byteplussdkarkruntime/types/shared_params/reasoning.py +12 -0
  236. byteplussdkarkruntime/types/shared_params/reasoning_effort.py +8 -0
  237. byteplussdkarkruntime/types/shared_params/response_format_json_object.py +22 -0
  238. byteplussdkarkruntime/types/shared_params/response_format_json_schema.py +54 -0
  239. byteplussdkarkruntime/types/shared_params/response_format_text.py +22 -0
  240. byteplussdkarkruntime/types/shared_params/thinking.py +22 -0
@@ -0,0 +1,36 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing import Union
14
+ from typing_extensions import Annotated, TypeAlias
15
+
16
+ from ..._utils import PropertyInfo
17
+ from .response_output_message import ResponseOutputMessage
18
+ from .response_reasoning_item import ResponseReasoningItem
19
+ from .response_function_tool_call import ResponseFunctionToolCall
20
+ from .response_web_search_item import ResponseWebSearchItem
21
+ from .response_mcp_item import McpListTools, McpCall, McpApprovalRequest
22
+
23
+ __all__ = ["ResponseOutputItem"]
24
+
25
+ ResponseOutputItem: TypeAlias = Annotated[
26
+ Union[
27
+ ResponseOutputMessage,
28
+ ResponseFunctionToolCall,
29
+ ResponseReasoningItem,
30
+ ResponseWebSearchItem,
31
+ McpListTools,
32
+ McpCall,
33
+ McpApprovalRequest,
34
+ ],
35
+ PropertyInfo(discriminator="type"),
36
+ ]
@@ -0,0 +1,29 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+ from .response_output_item import ResponseOutputItem
17
+
18
+ __all__ = ["ResponseOutputItemAddedEvent"]
19
+
20
+
21
+ class ResponseOutputItemAddedEvent(BaseModel):
22
+ item: ResponseOutputItem
23
+ """The output item that was added."""
24
+
25
+ output_index: int
26
+ """The index of the output item that was added."""
27
+
28
+ type: Literal["response.output_item.added"]
29
+ """The type of the event. Always `response.output_item.added`."""
@@ -0,0 +1,29 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+ from .response_output_item import ResponseOutputItem
17
+
18
+ __all__ = ["ResponseOutputItemDoneEvent"]
19
+
20
+
21
+ class ResponseOutputItemDoneEvent(BaseModel):
22
+ item: ResponseOutputItem
23
+ """The output item that was marked done."""
24
+
25
+ output_index: int
26
+ """The index of the output item that was marked done."""
27
+
28
+ type: Literal["response.output_item.done"]
29
+ """The type of the event. Always `response.output_item.done`."""
@@ -0,0 +1,43 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing import List, Union
14
+ from typing_extensions import Literal, Annotated, TypeAlias
15
+
16
+ from ..._utils import PropertyInfo
17
+ from ..._models import BaseModel
18
+ from .response_output_text import ResponseOutputText
19
+
20
+ __all__ = ["ResponseOutputMessage", "Content"]
21
+
22
+ Content: TypeAlias = Annotated[Union[ResponseOutputText], PropertyInfo(discriminator="type")]
23
+
24
+
25
+ class ResponseOutputMessage(BaseModel):
26
+ id: str
27
+ """The unique ID of the output message."""
28
+
29
+ content: List[Content]
30
+ """The content of the output message."""
31
+
32
+ role: Literal["assistant"]
33
+ """The role of the output message. Always `assistant`."""
34
+
35
+ status: Literal["in_progress", "completed", "incomplete"]
36
+ """The status of the message input.
37
+
38
+ One of `in_progress`, `completed`, or `incomplete`. Populated when input items
39
+ are returned via API.
40
+ """
41
+
42
+ type: Literal["message"]
43
+ """The type of the output message. Always `message`."""
@@ -0,0 +1,61 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal, Optional, List
14
+
15
+ from ..._models import BaseModel
16
+
17
+ __all__ = ["ResponseOutputText", "ResponseOutputTextAnnotation"]
18
+
19
+
20
+ class ResponsesOutputTextAnnotationCoverImage(BaseModel):
21
+ url: Optional[str] = None
22
+ """The url of the cover image."""
23
+ width: Optional[int] = None
24
+ """The width of the cover image."""
25
+ height: Optional[int] = None
26
+ """The height of the cover image."""
27
+
28
+
29
+ class ResponseOutputTextAnnotation(BaseModel):
30
+ type: Literal["annotation"]
31
+ """The type of the url_citation. Always `url_citation`."""
32
+ title: Optional[str] = None
33
+ """The title of the url_citation."""
34
+ url: Optional[str] = None
35
+ """The url of the url_citation."""
36
+ logo_url: Optional[str] = None
37
+ """The logo_url of the url_citation."""
38
+ mobile_url: Optional[str] = None
39
+ """The mobile_url of the url_citation."""
40
+ site_name: Optional[str] = None
41
+ """The site_name of the url_citation."""
42
+ publish_time: Optional[str] = None
43
+ """The publish_time of the url_citation."""
44
+ summary: Optional[str] = None
45
+ """The summary of the url_citation."""
46
+ freshness_info: Optional[str] = None
47
+ """The freshness_info of the url_citation."""
48
+ cover_image: Optional[ResponsesOutputTextAnnotationCoverImage] = None
49
+ """The cover_image of the url_citation."""
50
+
51
+
52
+ class ResponseOutputText(BaseModel):
53
+
54
+ text: str
55
+ """The text output from the model."""
56
+
57
+ type: Literal["output_text"]
58
+ """The type of the output text. Always `output_text`."""
59
+
60
+ annotations: Optional[List[ResponseOutputTextAnnotation]]
61
+ """The annotation of the output text."""
@@ -0,0 +1,77 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from __future__ import annotations
14
+
15
+ from typing import Union, Iterable
16
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
17
+
18
+ __all__ = [
19
+ "ResponseOutputTextParam",
20
+ "Annotation",
21
+ "AnnotationFileCitation",
22
+ "AnnotationURLCitation",
23
+ "AnnotationFilePath",
24
+ ]
25
+
26
+
27
+ class AnnotationFileCitation(TypedDict, total=False):
28
+ file_id: Required[str]
29
+ """The ID of the file."""
30
+
31
+ index: Required[int]
32
+ """The index of the file in the list of files."""
33
+
34
+ type: Required[Literal["file_citation"]]
35
+ """The type of the file citation. Always `file_citation`."""
36
+
37
+
38
+ class AnnotationURLCitation(TypedDict, total=False):
39
+ end_index: Required[int]
40
+ """The index of the last character of the URL citation in the message."""
41
+
42
+ start_index: Required[int]
43
+ """The index of the first character of the URL citation in the message."""
44
+
45
+ title: Required[str]
46
+ """The title of the web resource."""
47
+
48
+ type: Required[Literal["url_citation"]]
49
+ """The type of the URL citation. Always `url_citation`."""
50
+
51
+ url: Required[str]
52
+ """The URL of the web resource."""
53
+
54
+
55
+ class AnnotationFilePath(TypedDict, total=False):
56
+ file_id: Required[str]
57
+ """The ID of the file."""
58
+
59
+ index: Required[int]
60
+ """The index of the file in the list of files."""
61
+
62
+ type: Required[Literal["file_path"]]
63
+ """The type of the file path. Always `file_path`."""
64
+
65
+
66
+ Annotation: TypeAlias = Union[AnnotationFileCitation, AnnotationURLCitation, AnnotationFilePath]
67
+
68
+
69
+ class ResponseOutputTextParam(TypedDict, total=False):
70
+ annotations: Required[Iterable[Annotation]]
71
+ """The annotations of the text output."""
72
+
73
+ text: Required[str]
74
+ """The text output from the model."""
75
+
76
+ type: Required[Literal["output_text"]]
77
+ """The type of the output text. Always `output_text`."""
@@ -0,0 +1,46 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing import List, Optional
14
+ from typing_extensions import Literal
15
+
16
+ from ..._models import BaseModel
17
+
18
+ __all__ = ["ResponseReasoningItem", "Summary"]
19
+
20
+
21
+ class Summary(BaseModel):
22
+ text: str
23
+ """
24
+ A short summary of the reasoning used by the model when generating the response.
25
+ """
26
+
27
+ type: Literal["summary_text"]
28
+ """The type of the object. Always `summary_text`."""
29
+
30
+
31
+ class ResponseReasoningItem(BaseModel):
32
+ id: str
33
+ """The unique identifier of the reasoning content."""
34
+
35
+ summary: List[Summary]
36
+ """Reasoning text contents."""
37
+
38
+ type: Literal["reasoning"]
39
+ """The type of the object. Always `reasoning`."""
40
+
41
+ status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
42
+ """The status of the item.
43
+
44
+ One of `in_progress`, `completed`, or `incomplete`. Populated when items are
45
+ returned via API.
46
+ """
@@ -0,0 +1,37 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from __future__ import annotations
14
+
15
+ from typing import Iterable, Optional
16
+ from typing_extensions import Literal, Required, TypedDict
17
+
18
+ __all__ = ["ResponseReasoningItemParam", "Summary"]
19
+
20
+
21
+ class Summary(TypedDict, total=False):
22
+ text: Required[str]
23
+ """
24
+ A short summary of the reasoning used by the model when generating the response.
25
+ """
26
+
27
+ type: Required[Literal["summary_text"]]
28
+ """The type of the object. Always `summary_text`."""
29
+
30
+
31
+ class ResponseReasoningItemParam(TypedDict, total=False):
32
+
33
+ summary: Required[Iterable[Summary]]
34
+ """Reasoning text contents."""
35
+
36
+ type: Required[Literal["reasoning"]]
37
+ """The type of the object. Always `reasoning`."""
@@ -0,0 +1,42 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+
17
+ __all__ = ["ResponseReasoningSummaryPartAddedEvent", "Part"]
18
+
19
+
20
+ class Part(BaseModel):
21
+ text: str
22
+ """The text of the summary part."""
23
+
24
+ type: Literal["summary_text"]
25
+ """The type of the summary part. Always `summary_text`."""
26
+
27
+
28
+ class ResponseReasoningSummaryPartAddedEvent(BaseModel):
29
+ item_id: str
30
+ """The ID of the item this summary part is associated with."""
31
+
32
+ output_index: int
33
+ """The index of the output item this summary part is associated with."""
34
+
35
+ part: Part
36
+ """The summary part that was added."""
37
+
38
+ summary_index: int
39
+ """The index of the summary part within the reasoning summary."""
40
+
41
+ type: Literal["response.reasoning_summary_part.added"]
42
+ """The type of the event. Always `response.reasoning_summary_part.added`."""
@@ -0,0 +1,42 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+
17
+ __all__ = ["ResponseReasoningSummaryPartDoneEvent", "Part"]
18
+
19
+
20
+ class Part(BaseModel):
21
+ text: str
22
+ """The text of the summary part."""
23
+
24
+ type: Literal["summary_text"]
25
+ """The type of the summary part. Always `summary_text`."""
26
+
27
+
28
+ class ResponseReasoningSummaryPartDoneEvent(BaseModel):
29
+ item_id: str
30
+ """The ID of the item this summary part is associated with."""
31
+
32
+ output_index: int
33
+ """The index of the output item this summary part is associated with."""
34
+
35
+ part: Part
36
+ """The completed summary part."""
37
+
38
+ summary_index: int
39
+ """The index of the summary part within the reasoning summary."""
40
+
41
+ type: Literal["response.reasoning_summary_part.done"]
42
+ """The type of the event. Always `response.reasoning_summary_part.done`."""
@@ -0,0 +1,34 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+
17
+ __all__ = ["ResponseReasoningSummaryTextDeltaEvent"]
18
+
19
+
20
+ class ResponseReasoningSummaryTextDeltaEvent(BaseModel):
21
+ delta: str
22
+ """The text delta that was added to the summary."""
23
+
24
+ item_id: str
25
+ """The ID of the item this summary text delta is associated with."""
26
+
27
+ output_index: int
28
+ """The index of the output item this summary text delta is associated with."""
29
+
30
+ summary_index: int
31
+ """The index of the summary part within the reasoning summary."""
32
+
33
+ type: Literal["response.reasoning_summary_text.delta"]
34
+ """The type of the event. Always `response.reasoning_summary_text.delta`."""
@@ -0,0 +1,34 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal
14
+
15
+ from ..._models import BaseModel
16
+
17
+ __all__ = ["ResponseReasoningSummaryTextDoneEvent"]
18
+
19
+
20
+ class ResponseReasoningSummaryTextDoneEvent(BaseModel):
21
+ item_id: str
22
+ """The ID of the item this summary text is associated with."""
23
+
24
+ output_index: int
25
+ """The index of the output item this summary text is associated with."""
26
+
27
+ summary_index: int
28
+ """The index of the summary part within the reasoning summary."""
29
+
30
+ text: str
31
+ """The full text of the completed reasoning summary."""
32
+
33
+ type: Literal["response.reasoning_summary_text.done"]
34
+ """The type of the event. Always `response.reasoning_summary_text.done`."""
@@ -0,0 +1,17 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing_extensions import Literal, TypeAlias
14
+
15
+ __all__ = ["ResponseStatus"]
16
+
17
+ ResponseStatus: TypeAlias = Literal["completed", "failed", "in_progress", "incomplete"]
@@ -0,0 +1,93 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing import Union
14
+ from typing_extensions import Annotated, TypeAlias
15
+
16
+ from ..._utils import PropertyInfo
17
+ from .response_error_event import ResponseErrorEvent
18
+ from .response_failed_event import ResponseFailedEvent
19
+ from .response_created_event import ResponseCreatedEvent
20
+ from .response_completed_event import ResponseCompletedEvent
21
+ from .response_text_done_event import ResponseTextDoneEvent
22
+ from .response_incomplete_event import ResponseIncompleteEvent
23
+ from .response_text_delta_event import ResponseTextDeltaEvent
24
+ from .response_in_progress_event import ResponseInProgressEvent
25
+ from .response_output_item_done_event import ResponseOutputItemDoneEvent
26
+ from .response_content_part_done_event import ResponseContentPartDoneEvent
27
+ from .response_output_item_added_event import ResponseOutputItemAddedEvent
28
+ from .response_content_part_added_event import ResponseContentPartAddedEvent
29
+ from .response_reasoning_summary_part_done_event import ResponseReasoningSummaryPartDoneEvent
30
+ from .response_reasoning_summary_text_done_event import ResponseReasoningSummaryTextDoneEvent
31
+ from .response_function_call_arguments_done_event import ResponseFunctionCallArgumentsDoneEvent
32
+ from .response_reasoning_summary_part_added_event import ResponseReasoningSummaryPartAddedEvent
33
+ from .response_reasoning_summary_text_delta_event import ResponseReasoningSummaryTextDeltaEvent
34
+ from .response_function_call_arguments_delta_event import ResponseFunctionCallArgumentsDeltaEvent
35
+ from .response_web_search_call_in_progress_event import ResponseWebSearchCallInProgressEvent
36
+ from .response_web_search_call_searching_event import ResponseWebSearchCallSearchingEvent
37
+ from .response_web_search_call_completed_event import ResponseWebSearchCallCompletedEvent
38
+ from .response_annotation_added_event import ResponseOutputTextAnnotationAddedEvent
39
+ from .response_mcp_call_failed_event import ResponseMcpCallFailedEvent
40
+ from .response_mcp_call_in_progress_event import ResponseMcpCallInProgressEvent
41
+ from .response_mcp_call_completed_event import ResponseMcpCallCompletedEvent
42
+ from .response_mcp_call_arguments_done_event import ResponseMcpCallArgumentsDoneEvent
43
+ from .response_mcp_call_arguments_delta_event import ResponseMcpCallArgumentsDeltaEvent
44
+ from .response_mcp_list_tools_failed_event import ResponseMcpListToolsFailedEvent
45
+ from .response_mcp_list_tools_in_progress_event import ResponseMcpListToolsInProgressEvent
46
+ from .response_mcp_list_tools_completed_event import ResponseMcpListToolsCompletedEvent
47
+
48
+
49
+ __all__ = ["ResponseStreamEvent"]
50
+
51
+ ResponseStreamEvent: TypeAlias = Annotated[
52
+ Union[
53
+ ResponseCreatedEvent,
54
+ ResponseInProgressEvent,
55
+ ResponseCompletedEvent,
56
+ ResponseFailedEvent,
57
+ ResponseIncompleteEvent,
58
+
59
+ ResponseOutputItemAddedEvent,
60
+ ResponseOutputItemDoneEvent,
61
+
62
+ ResponseContentPartAddedEvent,
63
+ ResponseContentPartDoneEvent,
64
+
65
+ ResponseTextDeltaEvent,
66
+ ResponseTextDoneEvent,
67
+
68
+ ResponseReasoningSummaryPartAddedEvent,
69
+ ResponseReasoningSummaryPartDoneEvent,
70
+ ResponseReasoningSummaryTextDeltaEvent,
71
+ ResponseReasoningSummaryTextDoneEvent,
72
+
73
+ ResponseFunctionCallArgumentsDeltaEvent,
74
+ ResponseFunctionCallArgumentsDoneEvent,
75
+
76
+ ResponseErrorEvent,
77
+
78
+ ResponseWebSearchCallInProgressEvent,
79
+ ResponseWebSearchCallSearchingEvent,
80
+ ResponseWebSearchCallCompletedEvent,
81
+ ResponseOutputTextAnnotationAddedEvent,
82
+
83
+ ResponseMcpCallFailedEvent,
84
+ ResponseMcpCallInProgressEvent,
85
+ ResponseMcpCallCompletedEvent,
86
+ ResponseMcpCallArgumentsDoneEvent,
87
+ ResponseMcpCallArgumentsDeltaEvent,
88
+ ResponseMcpListToolsFailedEvent,
89
+ ResponseMcpListToolsInProgressEvent,
90
+ ResponseMcpListToolsCompletedEvent,
91
+ ],
92
+ PropertyInfo(discriminator="type"),
93
+ ]
@@ -0,0 +1,28 @@
1
+
2
+ # Copyright (c) [2025] [OpenAI]
3
+ # Copyright (c) [2025] [ByteDance Ltd. and/or its affiliates.]
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ #
6
+ # This file has been modified by [ByteDance Ltd. and/or its affiliates.] on 2025.7
7
+ #
8
+ # Original file was released under Apache License Version 2.0, with the full license text
9
+ # available at https://github.com/openai/openai-python/blob/main/LICENSE.
10
+ #
11
+ # This modified file is released under the same license.
12
+
13
+ from typing import Optional
14
+
15
+ from ..._models import BaseModel
16
+ from .response_format_text_config import ResponseFormatTextConfig
17
+
18
+ __all__ = ["ResponseTextConfig"]
19
+
20
+
21
+ class ResponseTextConfig(BaseModel):
22
+ format: Optional[ResponseFormatTextConfig] = None
23
+ """An object specifying the format that the model must output.
24
+
25
+ Setting to `{ "type": "json_object" }` enables the older JSON mode, which
26
+ ensures the message the model generates is valid JSON. Using `json_schema` is
27
+ preferred for models that support it.
28
+ """