repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_mcp_list_tools_completed_event.py | src/openai/types/responses/response_mcp_list_tools_completed_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseMcpListToolsCompletedEvent"]
class ResponseMcpListToolsCompletedEvent(BaseModel):
"""Emitted when the list of available MCP tools has ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_code_interpreter_tool_call.py | src/openai/types/responses/response_code_interpreter_tool_call.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
__all__ = ["ResponseCodeInterpreterToolCall", "Output", "Outpu... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_computer_tool_call_output_screenshot.py | src/openai/types/responses/response_computer_tool_call_output_screenshot.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseComputerToolCallOutputScreenshot"]
class ResponseComputerToolCallOutputScreenshot(BaseModel):
"""A compute... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_image_content_param.py | src/openai/types/responses/response_input_image_content_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseInputImageContentParam"]
class ResponseInputImageContentParam(TypedDict, total=False):
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_text.py | src/openai/types/responses/response_input_text.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseInputText"]
class ResponseInputText(BaseModel):
"""A text input to the model."""
text: str
"""The text input to the model."""... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_apply_patch_tool_call_output.py | src/openai/types/responses/response_apply_patch_tool_call_output.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseApplyPatchToolCallOutput"]
class ResponseApplyPatchToolCallOutput(BaseModel):
"""The output emitted by an ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/__init__.py | src/openai/types/responses/__init__.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from .tool import Tool as Tool
from .response import Response as Response
from .tool_param import ToolParam as ToolParam
from .custom_tool import CustomTool as CustomTool
from .computer_tool import... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_file_search_tool_call.py | src/openai/types/responses/response_file_search_tool_call.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseFileSearchToolCall", "Result"]
class Result(BaseModel):
attributes: Optional[Dict[str, ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_create_params.py | src/openai/types/responses/response_create_params.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from .tool_param import ToolParam
from .response_includable import Response... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/parsed_response.py | src/openai/types/responses/parsed_response.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import TYPE_CHECKING, List, Union, Generic, TypeVar, Optional
from typing_extensions import Annotated, TypeAlias
from ..._utils import PropertyInfo
from .response import Response
from ..._models import GenericModel
from ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_web_search_call_completed_event.py | src/openai/types/responses/response_web_search_call_completed_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseWebSearchCallCompletedEvent"]
class ResponseWebSearchCallCompletedEvent(BaseModel):
"""Emitted when a web search call is completed."""... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_function_call_arguments_done_event.py | src/openai/types/responses/response_function_call_arguments_done_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseFunctionCallArgumentsDoneEvent"]
class ResponseFunctionCallArgumentsDoneEvent(BaseModel):
"""Emitted when function-call arguments are ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_param.py | src/openai/types/responses/tool_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from . import web_search_tool_param
from ..chat import ChatCompletionFunctionToolPara... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_created_event.py | src/openai/types/responses/response_created_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from .response import Response
from ..._models import BaseModel
__all__ = ["ResponseCreatedEvent"]
class ResponseCreatedEvent(BaseModel):
"""An event that is emitted when a response is cr... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_content.py | src/openai/types/responses/response_input_content.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union
from typing_extensions import Annotated, TypeAlias
from ..._utils import PropertyInfo
from .response_input_file import ResponseInputFile
from .response_input_text import ResponseInputText
from .response_inpu... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_mcp_call_completed_event.py | src/openai/types/responses/response_mcp_call_completed_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseMcpCallCompletedEvent"]
class ResponseMcpCallCompletedEvent(BaseModel):
"""Emitted when an MCP tool call has completed successfully."... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_output_item.py | src/openai/types/responses/response_output_item.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_output_message import ResponseOutputMessag... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_text_content_param.py | src/openai/types/responses/response_input_text_content_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseInputTextContentParam"]
class ResponseInputTextContentParam(TypedDict, total=False):
"""A text input to the mod... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_audio_param.py | src/openai/types/responses/response_input_audio_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseInputAudioParam", "InputAudio"]
class InputAudio(TypedDict, total=False):
data: Required[str]
"""Base64-enc... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_function_tool_call.py | src/openai/types/responses/response_function_tool_call.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseFunctionToolCall"]
class ResponseFunctionToolCall(BaseModel):
"""A tool call to run a function.
See t... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/input_item_list_params.py | src/openai/types/responses/input_item_list_params.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import List
from typing_extensions import Literal, TypedDict
from .response_includable import ResponseIncludable
__all__ = ["InputItemListParams"]
class InputItemListParams(TypedDic... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_file_search_tool_call_param.py | src/openai/types/responses/response_file_search_tool_call_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
from ..._types import SequenceNotStr
__all__ = ["ResponseFileSearchToolCallParam", "R... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_reasoning_text_delta_event.py | src/openai/types/responses/response_reasoning_text_delta_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseReasoningTextDeltaEvent"]
class ResponseReasoningTextDeltaEvent(BaseModel):
"""Emitted when a delta is added to a reasoning text."""
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_function_tool_call_output_item.py | src/openai/types/responses/response_function_tool_call_output_item.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_input_file import ResponseInputFile
from .respon... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_reasoning_summary_part_added_event.py | src/openai/types/responses/response_reasoning_summary_part_added_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseReasoningSummaryPartAddedEvent", "Part"]
class Part(BaseModel):
"""The summary part that was added."""
text: str
"""The text ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_compaction_item_param_param.py | src/openai/types/responses/response_compaction_item_param_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseCompactionItemParamParam"]
class ResponseCompactionItemParamParam(TypedDict, total=Fals... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_prompt.py | src/openai/types/responses/response_prompt.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, Union, Optional
from typing_extensions import TypeAlias
from ..._models import BaseModel
from .response_input_file import ResponseInputFile
from .response_input_text import ResponseInputText
from .response_i... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_choice_apply_patch.py | src/openai/types/responses/tool_choice_apply_patch.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ToolChoiceApplyPatch"]
class ToolChoiceApplyPatch(BaseModel):
"""Forces the model to call the apply_patch tool when executing a tool call."""
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/file_search_tool.py | src/openai/types/responses/file_search_tool.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, TypeAlias
from ..._models import BaseModel
from ..shared.compound_filter import CompoundFilter
from ..shared.comparison_filter import ComparisonFilter
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_completed_event.py | src/openai/types/responses/response_completed_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from .response import Response
from ..._models import BaseModel
__all__ = ["ResponseCompletedEvent"]
class ResponseCompletedEvent(BaseModel):
"""Emitted when the model response is complet... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_custom_tool_call.py | src/openai/types/responses/response_custom_tool_call.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseCustomToolCall"]
class ResponseCustomToolCall(BaseModel):
"""A call to a custom tool created by the model.... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_code_interpreter_call_code_done_event.py | src/openai/types/responses/response_code_interpreter_call_code_done_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseCodeInterpreterCallCodeDoneEvent"]
class ResponseCodeInterpreterCallCodeDoneEvent(BaseModel):
"""Emitted when the code snippet is fina... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_conversation_param.py | src/openai/types/responses/response_conversation_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Required, TypedDict
__all__ = ["ResponseConversationParam"]
class ResponseConversationParam(TypedDict, total=False):
"""The conversation that this response belo... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_function_tool_call_param.py | src/openai/types/responses/response_function_tool_call_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseFunctionToolCallParam"]
class ResponseFunctionToolCallParam(TypedDict, total=False):
"""A tool call to run a fu... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/custom_tool_param.py | src/openai/types/responses/custom_tool_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
from ..shared_params.custom_tool_input_format import CustomToolInputFormat
__all__ = ["CustomToolParam"]
class CustomToolParam(TypedDi... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_code_interpreter_call_completed_event.py | src/openai/types/responses/response_code_interpreter_call_completed_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseCodeInterpreterCallCompletedEvent"]
class ResponseCodeInterpreterCallCompletedEvent(BaseModel):
"""Emitted when the code interpreter c... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_choice_function.py | src/openai/types/responses/tool_choice_function.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ToolChoiceFunction"]
class ToolChoiceFunction(BaseModel):
"""Use this option to force the model to call a specific function."""
name: str... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_choice_allowed.py | src/openai/types/responses/tool_choice_allowed.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ToolChoiceAllowed"]
class ToolChoiceAllowed(BaseModel):
"""Constrains the tools available to the model to a pre-... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_file_param.py | src/openai/types/responses/response_input_file_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseInputFileParam"]
class ResponseInputFileParam(TypedDict, total=False):
"""A file in... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_param.py | src/openai/types/responses/response_input_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from .easy_input_message_param i... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/web_search_tool_param.py | src/openai/types/responses/web_search_tool_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal, Required, TypedDict
from ..._types import SequenceNotStr
__all__ = ["WebSearchToolParam", "Filters", "UserLocation"]
class Fil... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_incomplete_event.py | src/openai/types/responses/response_incomplete_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from .response import Response
from ..._models import BaseModel
__all__ = ["ResponseIncompleteEvent"]
class ResponseIncompleteEvent(BaseModel):
"""An event that is emitted when a response... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_computer_tool_call_param.py | src/openai/types/responses/response_computer_tool_call_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
__all__ = [
"ResponseComputerToolCallPa... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_message_item.py | src/openai/types/responses/response_input_message_item.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
from .response_input_message_content_list import ResponseInputMessageContentList
__all__ = ["ResponseInputMessageItem"]
class Resp... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_content_part_added_event.py | src/openai/types/responses/response_content_part_added_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_output_text import ResponseOutputText
from .response_output_refu... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_file_search_call_in_progress_event.py | src/openai/types/responses/response_file_search_call_in_progress_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseFileSearchCallInProgressEvent"]
class ResponseFileSearchCallInProgressEvent(BaseModel):
"""Emitted when a file search call is initiate... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool.py | src/openai/types/responses/tool.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from . import web_search_tool
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .custom_tool import Cu... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_format_text_json_schema_config_param.py | src/openai/types/responses/response_format_text_json_schema_config_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseFormatTextJSONSchemaConfigParam"]
class ResponseFormatTextJSONSchemaConfigParam(T... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_input_item.py | src/openai/types/responses/response_input_item.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .easy_input_message import EasyInputMessage
from .re... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_custom_tool_call_param.py | src/openai/types/responses/response_custom_tool_call_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ResponseCustomToolCallParam"]
class ResponseCustomToolCallParam(TypedDict, total=False):
"""A call to a custom tool cre... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/web_search_tool.py | src/openai/types/responses/web_search_tool.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["WebSearchTool", "Filters", "UserLocation"]
class Filters(BaseModel):
"""Filters for the search."""
allo... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_choice_custom.py | src/openai/types/responses/tool_choice_custom.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ToolChoiceCustom"]
class ToolChoiceCustom(BaseModel):
"""Use this option to force the model to call a specific custom tool."""
name: str
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/computer_tool_param.py | src/openai/types/responses/computer_tool_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ComputerToolParam"]
class ComputerToolParam(TypedDict, total=False):
"""A tool that controls a virtual computer.
L... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_reasoning_item.py | src/openai/types/responses/response_reasoning_item.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseReasoningItem", "Summary", "Content"]
class Summary(BaseModel):
"""A summary text from the model."""... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_web_search_call_in_progress_event.py | src/openai/types/responses/response_web_search_call_in_progress_event.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ResponseWebSearchCallInProgressEvent"]
class ResponseWebSearchCallInProgressEvent(BaseModel):
"""Emitted when a web search call is initiated."... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/response_custom_tool_call_output.py | src/openai/types/responses/response_custom_tool_call_output.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_input_file import ResponseInputFile
from .respon... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/types/responses/tool_choice_types_param.py | src/openai/types/responses/tool_choice_types_param.py | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import Literal, Required, TypedDict
__all__ = ["ToolChoiceTypesParam"]
class ToolChoiceTypesParam(TypedDict, total=False):
"""
Indicates that the model should use ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_tools.py | src/openai/lib/_tools.py | from __future__ import annotations
from typing import Any, Dict, cast
import pydantic
from ._pydantic import to_strict_json_schema
from ..types.chat import ChatCompletionFunctionToolParam
from ..types.shared_params import FunctionDefinition
from ..types.responses.function_tool_param import FunctionToolParam as Respo... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_pydantic.py | src/openai/lib/_pydantic.py | from __future__ import annotations
import inspect
from typing import Any, TypeVar
from typing_extensions import TypeGuard
import pydantic
from .._types import NOT_GIVEN
from .._utils import is_dict as _is_dict, is_list
from .._compat import PYDANTIC_V1, model_json_schema
_T = TypeVar("_T")
def to_strict_json_sche... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_realtime.py | src/openai/lib/_realtime.py | from __future__ import annotations
import json
from typing_extensions import override
import httpx
from openai import _legacy_response
from openai._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from openai._utils import maybe_transform, async_maybe_transform
from openai._base_client import make_... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_old_api.py | src/openai/lib/_old_api.py | from __future__ import annotations
from typing import TYPE_CHECKING, Any
from typing_extensions import override
from .._utils import LazyProxy
from .._exceptions import OpenAIError
INSTRUCTIONS = """
You tried to access openai.{symbol}, but this is no longer supported in openai>=1.0.0 - see the README at https://gi... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/__init__.py | src/openai/lib/__init__.py | from ._tools import pydantic_function_tool as pydantic_function_tool
from ._parsing import ResponseFormatT as ResponseFormatT
| python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/azure.py | src/openai/lib/azure.py | from __future__ import annotations
import os
import inspect
from typing import Any, Union, Mapping, TypeVar, Callable, Awaitable, cast, overload
from typing_extensions import Self, override
import httpx
from .._types import NOT_GIVEN, Omit, Query, Timeout, NotGiven
from .._utils import is_given, is_mapping
from .._c... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_validators.py | src/openai/lib/_validators.py | # pyright: basic
from __future__ import annotations
import os
import sys
from typing import Any, TypeVar, Callable, Optional, NamedTuple
from typing_extensions import TypeAlias
from .._extras import pandas as pd
class Remediation(NamedTuple):
name: str
immediate_msg: Optional[str] = None
necessary_msg: ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | true |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/_deltas.py | src/openai/lib/streaming/_deltas.py | from __future__ import annotations
from ..._utils import is_dict, is_list
def accumulate_delta(acc: dict[object, object], delta: dict[object, object]) -> dict[object, object]:
for key, delta_value in delta.items():
if key not in acc:
acc[key] = delta_value
continue
acc_va... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/__init__.py | src/openai/lib/streaming/__init__.py | from ._assistants import (
AssistantEventHandler as AssistantEventHandler,
AssistantEventHandlerT as AssistantEventHandlerT,
AssistantStreamManager as AssistantStreamManager,
AsyncAssistantEventHandler as AsyncAssistantEventHandler,
AsyncAssistantEventHandlerT as AsyncAssistantEventHandlerT,
Asy... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/_assistants.py | src/openai/lib/streaming/_assistants.py | from __future__ import annotations
import asyncio
from types import TracebackType
from typing import TYPE_CHECKING, Any, Generic, TypeVar, Callable, Iterable, Iterator, cast
from typing_extensions import Awaitable, AsyncIterable, AsyncIterator, assert_never
import httpx
from ..._utils import is_dict, is_list, consum... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | true |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/chat/_completions.py | src/openai/lib/streaming/chat/_completions.py | from __future__ import annotations
import inspect
from types import TracebackType
from typing import TYPE_CHECKING, Any, Generic, Callable, Iterable, Awaitable, AsyncIterator, cast
from typing_extensions import Self, Iterator, assert_never
from jiter import from_json
from ._types import ParsedChoiceSnapshot, ParsedC... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/chat/_events.py | src/openai/lib/streaming/chat/_events.py | from typing import List, Union, Generic, Optional
from typing_extensions import Literal
from ._types import ParsedChatCompletionSnapshot
from ...._models import BaseModel, GenericModel
from ..._parsing import ResponseFormatT
from ....types.chat import ChatCompletionChunk, ChatCompletionTokenLogprob
class ChunkEvent(... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/chat/_types.py | src/openai/lib/streaming/chat/_types.py | from __future__ import annotations
from typing_extensions import TypeAlias
from ....types.chat import ParsedChoice, ParsedChatCompletion, ParsedChatCompletionMessage
ParsedChatCompletionSnapshot: TypeAlias = ParsedChatCompletion[object]
"""Snapshot type representing an in-progress accumulation of
a `ParsedChatComple... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/chat/__init__.py | src/openai/lib/streaming/chat/__init__.py | from ._types import (
ParsedChoiceSnapshot as ParsedChoiceSnapshot,
ParsedChatCompletionSnapshot as ParsedChatCompletionSnapshot,
ParsedChatCompletionMessageSnapshot as ParsedChatCompletionMessageSnapshot,
)
from ._events import (
ChunkEvent as ChunkEvent,
ContentDoneEvent as ContentDoneEvent,
R... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/responses/_events.py | src/openai/lib/streaming/responses/_events.py | from __future__ import annotations
from typing import Optional
from typing_extensions import Union, Generic, TypeVar, Annotated, TypeAlias
from ...._utils import PropertyInfo
from ...._compat import GenericModel
from ....types.responses import (
ParsedResponse,
ResponseErrorEvent,
ResponseFailedEvent,
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/responses/_types.py | src/openai/lib/streaming/responses/_types.py | from __future__ import annotations
from typing_extensions import TypeAlias
from ....types.responses import ParsedResponse
ParsedResponseSnapshot: TypeAlias = ParsedResponse[object]
"""Snapshot type representing an in-progress accumulation of
a `ParsedResponse` object.
"""
| python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/responses/__init__.py | src/openai/lib/streaming/responses/__init__.py | from ._events import (
ResponseTextDoneEvent as ResponseTextDoneEvent,
ResponseTextDeltaEvent as ResponseTextDeltaEvent,
ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent,
)
from ._responses import (
ResponseStream as ResponseStream,
AsyncResponseStream as AsyncRespo... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/streaming/responses/_responses.py | src/openai/lib/streaming/responses/_responses.py | from __future__ import annotations
import inspect
from types import TracebackType
from typing import Any, List, Generic, Iterable, Awaitable, cast
from typing_extensions import Self, Callable, Iterator, AsyncIterator
from ._types import ParsedResponseSnapshot
from ._events import (
ResponseStreamEvent,
Respon... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_parsing/_completions.py | src/openai/lib/_parsing/_completions.py | from __future__ import annotations
import json
import logging
from typing import TYPE_CHECKING, Any, Iterable, cast
from typing_extensions import TypeVar, TypeGuard, assert_never
import pydantic
from .._tools import PydanticFunctionTool
from ..._types import Omit, omit
from ..._utils import is_dict, is_given
from ..... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_parsing/__init__.py | src/openai/lib/_parsing/__init__.py | from ._completions import (
ResponseFormatT as ResponseFormatT,
has_parseable_input,
has_parseable_input as has_parseable_input,
maybe_parse_content as maybe_parse_content,
validate_input_tools as validate_input_tools,
parse_chat_completion as parse_chat_completion,
get_input_tool_by_name as... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/lib/_parsing/_responses.py | src/openai/lib/_parsing/_responses.py | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any, List, Iterable, cast
from typing_extensions import TypeVar, assert_never
import pydantic
from .._tools import ResponsesPydanticFunctionTool
from ..._types import Omit
from ..._utils import is_given
from ..._compat import PYDANTIC_V... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_typing.py | src/openai/_utils/_typing.py | from __future__ import annotations
import sys
import typing
import typing_extensions
from typing import Any, TypeVar, Iterable, cast
from collections import abc as _c_abc
from typing_extensions import (
TypeIs,
Required,
Annotated,
get_args,
get_origin,
)
from ._utils import lru_cache
from .._type... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_logs.py | src/openai/_utils/_logs.py | import os
import logging
from typing_extensions import override
from ._utils import is_dict
logger: logging.Logger = logging.getLogger("openai")
httpx_logger: logging.Logger = logging.getLogger("httpx")
SENSITIVE_HEADERS = {"api-key", "authorization"}
def _basic_config() -> None:
# e.g. [2023-10-05 14:12:26 -... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_datetime_parse.py | src/openai/_utils/_datetime_parse.py | """
This file contains code from https://github.com/pydantic/pydantic/blob/main/pydantic/v1/datetime_parse.py
without the Pydantic v1 specific errors.
"""
from __future__ import annotations
import re
from typing import Dict, Union, Optional
from datetime import date, datetime, timezone, timedelta
from .._types impor... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_compat.py | src/openai/_utils/_compat.py | from __future__ import annotations
import sys
import typing_extensions
from typing import Any, Type, Union, Literal, Optional
from datetime import date, datetime
from typing_extensions import get_args as _get_args, get_origin as _get_origin
from .._types import StrBytesIntFloat
from ._datetime_parse import parse_date... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_reflection.py | src/openai/_utils/_reflection.py | from __future__ import annotations
import inspect
from typing import Any, Callable
def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool:
"""Returns whether or not the given function has a specific parameter"""
sig = inspect.signature(func)
return arg_name in sig.parameters
def ass... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_proxy.py | src/openai/_utils/_proxy.py | from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Generic, TypeVar, Iterable, cast
from typing_extensions import override
T = TypeVar("T")
class LazyProxy(Generic[T], ABC):
"""Implements data methods to pretend that an instance is another instance.
This includes forw... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_transform.py | src/openai/_utils/_transform.py | from __future__ import annotations
import io
import base64
import pathlib
from typing import Any, Mapping, TypeVar, cast
from datetime import date, datetime
from typing_extensions import Literal, get_args, override, get_type_hints as _get_type_hints
import anyio
import pydantic
from ._utils import (
is_list,
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/__init__.py | src/openai/_utils/__init__.py | from ._logs import SensitiveHeadersFilter as SensitiveHeadersFilter
from ._sync import asyncify as asyncify
from ._proxy import LazyProxy as LazyProxy
from ._utils import (
flatten as flatten,
is_dict as is_dict,
is_list as is_list,
is_given as is_given,
is_tuple as is_tuple,
json_safe as json_s... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_sync.py | src/openai/_utils/_sync.py | from __future__ import annotations
import asyncio
import functools
from typing import TypeVar, Callable, Awaitable
from typing_extensions import ParamSpec
import anyio
import sniffio
import anyio.to_thread
T_Retval = TypeVar("T_Retval")
T_ParamSpec = ParamSpec("T_ParamSpec")
async def to_thread(
func: Callable... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_utils.py | src/openai/_utils/_utils.py | from __future__ import annotations
import os
import re
import inspect
import functools
from typing import (
TYPE_CHECKING,
Any,
Tuple,
Mapping,
TypeVar,
Callable,
Iterable,
Sequence,
cast,
overload,
)
from pathlib import Path
from datetime import date, datetime
from typing_exten... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_resources_proxy.py | src/openai/_utils/_resources_proxy.py | from __future__ import annotations
from typing import Any
from typing_extensions import override
from ._proxy import LazyProxy
class ResourcesProxy(LazyProxy[Any]):
"""A proxy for the `openai.resources` module.
This is used so that we can lazily import `openai.resources` only when
needed *and* so that ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/_utils/_streams.py | src/openai/_utils/_streams.py | from typing import Any
from typing_extensions import Iterator, AsyncIterator
def consume_sync_iterator(iterator: Iterator[Any]) -> None:
for _ in iterator:
...
async def consume_async_iterator(iterator: AsyncIterator[Any]) -> None:
async for _ in iterator:
...
| python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_models.py | src/openai/cli/_models.py | from typing import Any
from typing_extensions import ClassVar
import pydantic
from .. import _models
from .._compat import PYDANTIC_V1, ConfigDict
class BaseModel(_models.BaseModel):
if PYDANTIC_V1:
class Config(pydantic.BaseConfig): # type: ignore
extra: Any = pydantic.Extra.ignore # typ... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_cli.py | src/openai/cli/_cli.py | from __future__ import annotations
import sys
import logging
import argparse
from typing import Any, List, Type, Optional
from typing_extensions import ClassVar
import httpx
import pydantic
import openai
from . import _tools
from .. import _ApiType, __version__
from ._api import register_commands
from ._utils impor... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/__init__.py | src/openai/cli/__init__.py | from ._cli import main as main
| python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_progress.py | src/openai/cli/_progress.py | from __future__ import annotations
import io
from typing import Callable
from typing_extensions import override
class CancelledError(Exception):
def __init__(self, msg: str) -> None:
self.msg = msg
super().__init__(msg)
@override
def __str__(self) -> str:
return self.msg
__r... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_errors.py | src/openai/cli/_errors.py | from __future__ import annotations
import sys
import pydantic
from ._utils import Colors, organization_info
from .._exceptions import APIError, OpenAIError
class CLIError(OpenAIError): ...
class SilentCLIError(CLIError): ...
def display_error(err: CLIError | APIError | pydantic.ValidationError) -> None:
if... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_utils.py | src/openai/cli/_utils.py | from __future__ import annotations
import sys
import openai
from .. import OpenAI, _load_client
from .._compat import model_json
from .._models import BaseModel
class Colors:
HEADER = "\033[95m"
OKBLUE = "\033[94m"
OKGREEN = "\033[92m"
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_api/image.py | src/openai/cli/_api/image.py | from __future__ import annotations
from typing import TYPE_CHECKING, Any, cast
from argparse import ArgumentParser
from .._utils import get_client, print_model
from ..._types import Omit, Omittable, omit
from .._models import BaseModel
from .._progress import BufferReader
if TYPE_CHECKING:
from argparse import _... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_api/audio.py | src/openai/cli/_api/audio.py | from __future__ import annotations
import sys
from typing import TYPE_CHECKING, Any, Optional, cast
from argparse import ArgumentParser
from .._utils import get_client, print_model
from ..._types import omit
from .._models import BaseModel
from .._progress import BufferReader
from ...types.audio import Transcription
... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_api/models.py | src/openai/cli/_api/models.py | from __future__ import annotations
from typing import TYPE_CHECKING
from argparse import ArgumentParser
from .._utils import get_client, print_model
from .._models import BaseModel
if TYPE_CHECKING:
from argparse import _SubParsersAction
def register(subparser: _SubParsersAction[ArgumentParser]) -> None:
s... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
openai/openai-python | https://github.com/openai/openai-python/blob/d3e632171c7842abf97b26379f564531d80ad096/src/openai/cli/_api/_main.py | src/openai/cli/_api/_main.py | from __future__ import annotations
from argparse import ArgumentParser
from . import chat, audio, files, image, models, completions, fine_tuning
def register_commands(parser: ArgumentParser) -> None:
subparsers = parser.add_subparsers(help="All API subcommands")
chat.register(subparsers)
image.register... | python | Apache-2.0 | d3e632171c7842abf97b26379f564531d80ad096 | 2026-01-04T14:43:29.641198Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.