instruction stringclasses 100
values | code stringlengths 78 193k | response stringlengths 259 170k | file stringlengths 59 203 |
|---|---|---|---|
Help me write clear docstrings | # 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 .transcription_diarized_segment import TranscriptionDiariz... | --- +++ @@ -11,6 +11,7 @@
class UsageTokensInputTokenDetails(BaseModel):
+ """Details about the input tokens billed for this request."""
audio_tokens: Optional[int] = None
"""Number of audio tokens billed for this request."""
@@ -20,6 +21,7 @@
class UsageTokens(BaseModel):
+ """Usage statistic... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/audio/transcription_diarized.py |
Add docstrings that explain inputs and outputs | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Optional
from typing_extensions import Literal
import httpx
from ... import _legacy_response
from .files import (
Files,
AsyncFiles,
FilesWithRawResponse,
... | --- +++ @@ -58,10 +58,21 @@
@cached_property
def with_raw_response(self) -> VectorStoresWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/resources/vector_stores/vector_stores.py |
Help me write clear docstrings | # 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
from .assistant_tool import AssistantTool
from ..shared.metadata import Metadata
from .assistant_response_format_option import ... | --- +++ @@ -31,6 +31,10 @@
class ToolResources(BaseModel):
+ """A set of resources that are used by the assistant's tools.
+
+ The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/assistant.py |
Document all endpoints with docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from .._models import BaseModel
__all__ = ["BatchUsage", "InputTokensDetails", "OutputTokensDetails"]
class InputTokensDetails(BaseModel):
cached_tokens: int
"""The number of tokens that were retrieved from the cache.
... | --- +++ @@ -6,6 +6,7 @@
class InputTokensDetails(BaseModel):
+ """A detailed breakdown of the input tokens."""
cached_tokens: int
"""The number of tokens that were retrieved from the cache.
@@ -15,12 +16,18 @@
class OutputTokensDetails(BaseModel):
+ """A detailed breakdown of the output tokens... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/batch_usage.py |
Add concise docstrings to each method | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import TYPE_CHECKING, Mapping, cast
from typing_extensions import Literal, assert_never
import httpx
from .. import _legacy_response
from ..types import (
VideoSize,
VideoSeco... | --- +++ @@ -48,10 +48,21 @@ class Videos(SyncAPIResource):
@cached_property
def with_raw_response(self) -> VideosWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more i... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/resources/videos.py |
Create structured documentation for my script | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from .thread import Thread
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .threads.run import Run
from .threads... | --- +++ @@ -43,6 +43,9 @@
class ThreadCreated(BaseModel):
+ """
+ Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created.
+ """
data: Thread
"""
@@ -57,6 +60,9 @@
class ThreadRunCreated(BaseModel):
+ """
+ Occurs when a new [run](https://p... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/assistant_stream_event.py |
Add docstrings for utility scripts | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ...._utils import PropertyInfo
from ...._models import BaseModel
__all__ = ["ChatKitThread", "Status", "StatusActive", "StatusLocke... | --- +++ @@ -10,12 +10,14 @@
class StatusActive(BaseModel):
+ """Indicates that a thread is active."""
type: Literal["active"]
"""Status discriminator that is always `active`."""
class StatusLocked(BaseModel):
+ """Indicates that a thread is locked and cannot accept new input."""
reason... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chatkit_thread.py |
Add docstrings for production code | # 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 .chatkit_widget_item import ChatKitWidgetItem
from .chat... | --- +++ @@ -20,6 +20,7 @@
class DataChatKitClientToolCall(BaseModel):
+ """Record of a client side tool invocation initiated by the assistant."""
id: str
"""Identifier of the thread item."""
@@ -56,6 +57,7 @@
class DataChatKitTask(BaseModel):
+ """Task emitted by the workflow to show progress ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chatkit_thread_item_list.py |
Add docstrings that explain purpose and usage | # 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 .chatkit_attachment import ChatKitAttachment
__all__ = ... | --- +++ @@ -18,6 +18,7 @@
class ContentInputText(BaseModel):
+ """Text block that a user contributed to the thread."""
text: str
"""Plain-text content supplied by the user."""
@@ -27,6 +28,7 @@
class ContentQuotedText(BaseModel):
+ """Quoted snippet that the user referenced in their message.""... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chatkit_thread_user_message_item.py |
Write docstrings including parameters and return values | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing_extensions import TypedDict
__all__ = ["ChatSessionChatKitConfigurationParam", "AutomaticThreadTitling", "FileUpload", "History"]
class AutomaticThreadTitling(TypedDict, total=False)... | --- +++ @@ -8,12 +8,20 @@
class AutomaticThreadTitling(TypedDict, total=False):
+ """Configuration for automatic thread titling.
+
+ When omitted, automatic thread titling is enabled by default.
+ """
enabled: bool
"""Enable automatic thread title generation. Defaults to true."""
class Fil... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chat_session_chatkit_configuration_param.py |
Add docstrings including usage examples | # 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__ = ["FileSearchToolParam", "FileSearch", "FileSearchRankingOptions"]
class FileSearchRankingOptions(TypedDict, total=False):
... | --- +++ @@ -8,6 +8,12 @@
class FileSearchRankingOptions(TypedDict, total=False):
+ """The ranking options for the file search.
+
+ If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.
+
+ See the [file search tool documentation](https://platform.openai.com/docs/assi... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/file_search_tool_param.py |
Can you add docstrings to this Python file? | # 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__ = ["FileSearchTool", "FileSearch", "FileSearchRankingOptions"]
class FileSearchRankingOptions(BaseModel):
score_thres... | --- +++ @@ -9,6 +9,12 @@
class FileSearchRankingOptions(BaseModel):
+ """The ranking options for the file search.
+
+ If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.
+
+ See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/file_search_tool.py |
Help me comply with documentation standards | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, Union
from typing_extensions import Required, TypedDict
__all__ = ["ChatSessionWorkflowParam", "Tracing"]
class Tracing(TypedDict, total=False):
enabled: bool
"... | --- +++ @@ -9,12 +9,17 @@
class Tracing(TypedDict, total=False):
+ """Optional tracing overrides for the workflow invocation.
+
+ When omitted, tracing is enabled by default.
+ """
enabled: bool
"""Whether tracing is enabled during the session. Defaults to true."""
class ChatSessionWorkflo... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chat_session_workflow_param.py |
Generate descriptive docstrings automatically | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union
from typing_extensions import Literal, Annotated, TypeAlias
from ...._utils import PropertyInfo
from ...._models import BaseModel
__all__ = [
"ChatKitResponseOutputText",
"Annotation",
"An... | --- +++ @@ -17,6 +17,7 @@
class AnnotationFileSource(BaseModel):
+ """File attachment referenced by the annotation."""
filename: str
"""Filename referenced by the annotation."""
@@ -26,6 +27,7 @@
class AnnotationFile(BaseModel):
+ """Annotation that references an uploaded file."""
sourc... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit/chatkit_response_output_text.py |
Generate docstrings for script automation | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, Union, Optional
from ..._models import BaseModel
__all__ = ["ChatKitWorkflow", "Tracing"]
class Tracing(BaseModel):
enabled: bool
"""Indicates whether tracing is enabled."""
class ChatKitWorkfl... | --- +++ @@ -8,12 +8,14 @@
class Tracing(BaseModel):
+ """Tracing settings applied to the workflow."""
enabled: bool
"""Indicates whether tracing is enabled."""
class ChatKitWorkflow(BaseModel):
+ """Workflow metadata and state returned for the session."""
id: str
"""Identifier of ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/chatkit_workflow.py |
Generate docstrings for script automation | # 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 .message_content import MessageContent
from ...shared.metadata import Metadata
from ..code_interpreter_... | --- +++ @@ -34,12 +34,16 @@
class IncompleteDetails(BaseModel):
+ """On an incomplete message, details about why the message is incomplete."""
reason: Literal["content_filter", "max_tokens", "run_cancelled", "run_expired", "run_failed"]
"""The reason the message is incomplete."""
class Message(B... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/message.py |
Document helper functions with docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union
from typing_extensions import Literal, Annotated, TypeAlias
from ....._utils import PropertyInfo
from ....._models import BaseModel
__all__ = [
"CodeInterpreterToolCall",
"CodeInterpreter",
... | --- +++ @@ -17,6 +17,7 @@
class CodeInterpreterOutputLogs(BaseModel):
+ """Text output from the Code Interpreter tool call as part of a run step."""
logs: str
"""The text output from the Code Interpreter tool call."""
@@ -46,6 +47,7 @@
class CodeInterpreter(BaseModel):
+ """The Code Interprete... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/runs/code_interpreter_tool_call.py |
Generate descriptive docstrings automatically | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ....._utils import PropertyInfo
from ....._models import BaseModel
from ....shared.metadata import Metadata
from .tool_calls_step_de... | --- +++ @@ -13,6 +13,10 @@
class LastError(BaseModel):
+ """The last error associated with this run step.
+
+ Will be `null` if there are no errors.
+ """
code: Literal["server_error", "rate_limit_exceeded"]
"""One of `server_error` or `rate_limit_exceeded`."""
@@ -27,6 +31,10 @@
class Usag... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/runs/run_step.py |
Add docstrings to clarify complex logic | # 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 .code_interpreter_logs import CodeInterpreterLogs
from... | --- +++ @@ -16,6 +16,7 @@
class CodeInterpreter(BaseModel):
+ """The Code Interpreter tool call definition."""
input: Optional[str] = None
"""The input to the Code Interpreter tool call."""
@@ -29,6 +30,7 @@
class CodeInterpreterToolCallDelta(BaseModel):
+ """Details of the Code Interpreter to... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/runs/code_interpreter_tool_call_delta.py |
Generate docstrings for this script | # 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
from ..shared_params.metadata import Metadat... | --- +++ @@ -106,6 +106,10 @@
class ToolResourcesFileSearchVectorStoreChunkingStrategyAuto(TypedDict, total=False):
+ """The default strategy.
+
+ This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
+ """
type: Required[Literal["auto"]]
"""Always ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/thread_create_params.py |
Fill in missing docstrings in my code | # 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__ = [
"FileSearchToolCall",
"FileSearch",
"FileSearchRankingOptions",
"FileSearchResult",
"FileSea... | --- +++ @@ -15,6 +15,7 @@
class FileSearchRankingOptions(BaseModel):
+ """The ranking options for the file search."""
ranker: Literal["auto", "default_2024_08_21"]
"""The ranker to use for the file search.
@@ -38,6 +39,7 @@
class FileSearchResult(BaseModel):
+ """A result instance of the file ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/runs/file_search_tool_call.py |
Can you add docstrings to this Python file? | # 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
from .run_status import RunStatus
from ..assistant_tool import AssistantTool
from ...shared.metadata import Metadata
from ..as... | --- +++ @@ -23,6 +23,10 @@
class IncompleteDetails(BaseModel):
+ """Details on why the run is incomplete.
+
+ Will be `null` if the run is not incomplete.
+ """
reason: Optional[Literal["max_completion_tokens", "max_prompt_tokens"]] = None
"""The reason why the run is incomplete.
@@ -33,6 +37,7... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/threads/run.py |
Add docstrings to existing functions | # 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
from ..shared.chat_model import ChatModel
fr... | --- +++ @@ -227,6 +227,10 @@
class ThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto(TypedDict, total=False):
+ """The default strategy.
+
+ This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
+ """
type: Required[Literal["auto"]]
"""A... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/thread_create_and_run_params.py |
Add standardized docstrings across the file | # 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
from ..shared.metadata import Metadata
__all__ = ["Thread", "ToolResources", "ToolResourcesCodeInterpreter", "ToolResourcesFil... | --- +++ @@ -29,6 +29,9 @@
class ToolResources(BaseModel):
+ """
+ A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a li... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/beta/thread.py |
Document this script properly | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ChatCompletionMessageFunctionToolCall", "Function"]
class Function(BaseModel):
arguments: str
"""
The arguments to call the function ... | --- +++ @@ -8,6 +8,7 @@
class Function(BaseModel):
+ """The function that the model called."""
arguments: str
"""
@@ -22,6 +23,7 @@
class ChatCompletionMessageFunctionToolCall(BaseModel):
+ """A call to a function tool created by the model."""
id: str
"""The ID of the tool call."""... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_message_function_tool_call.py |
Auto-generate documentation strings for this file | # 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__ = ["ChatCompletionMessageFunctionToolCallParam", "Function"]
class Function(TypedDict, total=False):
arguments: Required[s... | --- +++ @@ -8,6 +8,7 @@
class Function(TypedDict, total=False):
+ """The function that the model called."""
arguments: Required[str]
"""
@@ -22,6 +23,7 @@
class ChatCompletionMessageFunctionToolCallParam(TypedDict, total=False):
+ """A call to a function tool created by the model."""
id... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_message_function_tool_call_param.py |
Fill in missing docstrings in my code | # 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
from .chat_completion_audio import ChatCompletionAudio
from .chat_completion_message_tool_call import ChatCompletionMessageTool... | --- +++ @@ -11,6 +11,7 @@
class AnnotationURLCitation(BaseModel):
+ """A URL citation when using web search."""
end_index: int
"""The index of the last character of the URL citation in the message."""
@@ -26,6 +27,7 @@
class Annotation(BaseModel):
+ """A URL citation when using web search."""
... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_message.py |
Can you add docstrings to this Python file? | # 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
from ..completion_usage import CompletionUsage
from .chat_completion_message import ChatCompletionMessage
from .chat_completion... | --- +++ @@ -12,6 +12,7 @@
class ChoiceLogprobs(BaseModel):
+ """Log probability information for the choice."""
content: Optional[List[ChatCompletionTokenLogprob]] = None
"""A list of message content tokens with log probability information."""
@@ -42,6 +43,9 @@
class ChatCompletion(BaseModel):
+ ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion.py |
Add structured docstrings to improve clarity | # 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 ..shared.chat_model import ... | --- +++ @@ -383,6 +383,7 @@
class WebSearchOptionsUserLocationApproximate(TypedDict, total=False):
+ """Approximate location parameters for the search."""
city: str
"""Free text input for the city of the user, e.g. `San Francisco`."""
@@ -404,6 +405,7 @@
class WebSearchOptionsUserLocation(TypedDi... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/completion_create_params.py |
Add docstrings for better understanding | # 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__ = ["ContainerCreateResponse", "ExpiresAfter", "NetworkPolicy"]
class ExpiresAfter(BaseModel):
anchor: Optional[L... | --- +++ @@ -9,6 +9,11 @@
class ExpiresAfter(BaseModel):
+ """
+ The container will expire after this time period.
+ The anchor is the reference point for the expiration.
+ The minutes is the number of minutes after the anchor before the container expires.
+ """
anchor: Optional[Literal["last_a... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/container_create_response.py |
Write documentation strings for class attributes | # 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__ = ["ContainerRetrieveResponse", "ExpiresAfter", "NetworkPolicy"]
class ExpiresAfter(BaseModel):
anchor: Optional... | --- +++ @@ -9,6 +9,11 @@
class ExpiresAfter(BaseModel):
+ """
+ The container will expire after this time period.
+ The anchor is the reference point for the expiration.
+ The minutes is the number of minutes after the anchor before the container expires.
+ """
anchor: Optional[Literal["last_a... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/container_retrieve_response.py |
Generate consistent docstrings | # 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__ = ["ContainerListResponse", "ExpiresAfter", "NetworkPolicy"]
class ExpiresAfter(BaseModel):
anchor: Optional[Lit... | --- +++ @@ -9,6 +9,11 @@
class ExpiresAfter(BaseModel):
+ """
+ The container will expire after this time period.
+ The anchor is the reference point for the expiration.
+ The minutes is the number of minutes after the anchor before the container expires.
+ """
anchor: Optional[Literal["last_a... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/container_list_response.py |
Add well-formatted docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from .._models import BaseModel
__all__ = ["CompletionUsage", "CompletionTokensDetails", "PromptTokensDetails"]
class CompletionTokensDetails(BaseModel):
accepted_prediction_tokens: Optional[int] ... | --- +++ @@ -8,6 +8,7 @@
class CompletionTokensDetails(BaseModel):
+ """Breakdown of tokens used in a completion."""
accepted_prediction_tokens: Optional[int] = None
"""
@@ -31,6 +32,7 @@
class PromptTokensDetails(BaseModel):
+ """Breakdown of tokens used in the prompt."""
audio_tokens: ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/completion_usage.py |
Add docstrings for utility scripts | # 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 .message import Message
from ..._utils import PropertyInfo
from ..._models import BaseModel
from ..responses.response_re... | --- +++ @@ -38,6 +38,7 @@
class ImageGenerationCall(BaseModel):
+ """An image generation request made by the model."""
id: str
"""The unique ID of the image generation call."""
@@ -53,6 +54,7 @@
class LocalShellCallAction(BaseModel):
+ """Execute a shell command on the server."""
comman... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/conversations/conversation_item.py |
Add professional docstrings to my codebase | # 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 .chat_completion_content_part_text_param import ChatCompletionContentPartTex... | --- +++ @@ -13,6 +13,10 @@
class Audio(TypedDict, total=False):
+ """
+ Data about a previous audio response from the model.
+ [Learn more](https://platform.openai.com/docs/guides/audio).
+ """
id: Required[str]
"""Unique identifier for a previous audio response from the model."""
@@ -22,6 +... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_assistant_message_param.py |
Add docstrings to improve readability | # 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 pydantic import Field as FieldInfo
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .eval_api_e... | --- +++ @@ -67,6 +67,7 @@
class DataSourceResponsesSourceResponses(BaseModel):
+ """A EvalResponsesSource object describing a run data source configuration."""
type: Literal["responses"]
"""The type of run data source. Always `responses`."""
@@ -146,6 +147,7 @@
class DataSourceResponsesInputMessa... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/run_cancel_response.py |
Write reusable docstrings | # 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 pydantic import Field as FieldInfo
from .._utils import PropertyInfo
from .._models import BaseModel
from .shared.metad... | --- +++ @@ -28,6 +28,12 @@
class DataSourceConfigLogs(BaseModel):
+ """
+ A LogsDataSourceConfig which specifies the metadata property of your logs query.
+ This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
+ The schema returned by this data source config is used to defined wh... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/eval_retrieve_response.py |
Create simple docstrings for beginners | # 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 pydantic import Field as FieldInfo
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .eval_api_e... | --- +++ @@ -67,6 +67,7 @@
class DataSourceResponsesSourceResponses(BaseModel):
+ """A EvalResponsesSource object describing a run data source configuration."""
type: Literal["responses"]
"""The type of run data source. Always `responses`."""
@@ -146,6 +147,7 @@
class DataSourceResponsesInputMessa... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/run_list_response.py |
Insert docstrings into my code | # 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 pydantic import Field as FieldInfo
from .._utils import PropertyInfo
from .._models import BaseModel
from .shared.metad... | --- +++ @@ -28,6 +28,12 @@
class DataSourceConfigLogs(BaseModel):
+ """
+ A LogsDataSourceConfig which specifies the metadata property of your logs query.
+ This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
+ The schema returned by this data source config is used to defined wh... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/eval_update_response.py |
Add docstrings that explain logic | # 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__ = ["ChatCompletionMessageCustomToolCallParam", "Custom"]
class Custom(TypedDict, total=False):
input: Required[str]
""... | --- +++ @@ -8,6 +8,7 @@
class Custom(TypedDict, total=False):
+ """The custom tool that the model called."""
input: Required[str]
"""The input for the custom tool call generated by the model."""
@@ -17,6 +18,7 @@
class ChatCompletionMessageCustomToolCallParam(TypedDict, total=False):
+ """A ca... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_message_custom_tool_call_param.py |
Write docstrings for utility functions | # 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
from ..completion_usage import CompletionUsage
from .chat_completion_token_logprob import ChatCompletionTokenLogprob
__all__ =... | --- +++ @@ -19,6 +19,10 @@
class ChoiceDeltaFunctionCall(BaseModel):
+ """Deprecated and replaced by `tool_calls`.
+
+ The name and arguments of a function that should be called, as generated by the model.
+ """
arguments: Optional[str] = None
"""
@@ -58,6 +62,7 @@
class ChoiceDelta(BaseMod... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_chunk.py |
Write Python docstrings for this snippet | # 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, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from ..responses.tool_param import Too... | --- +++ @@ -80,6 +80,7 @@
class DataSourceCreateEvalResponsesRunDataSourceSourceResponses(TypedDict, total=False):
+ """A EvalResponsesSource object describing a run data source configuration."""
type: Required[Literal["responses"]]
"""The type of run data source. Always `responses`."""
@@ -162,6 +16... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/run_create_params.py |
Write Python docstrings for this snippet | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import TYPE_CHECKING, Dict, List, Optional
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ...._models import BaseModel
from ..eval_api_error import EvalAPIError
__all__ = ["OutputIte... | --- +++ @@ -12,6 +12,7 @@
class Result(BaseModel):
+ """A single grader result for an evaluation run output item."""
name: str
"""The name of the grader."""
@@ -42,6 +43,7 @@
class SampleInput(BaseModel):
+ """An input message."""
content: str
"""The content of the message."""
@@ -... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/runs/output_item_list_response.py |
Create structured documentation for my script | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["ChatCompletionMessageCustomToolCall", "Custom"]
class Custom(BaseModel):
input: str
"""The input for the custom tool call generated by th... | --- +++ @@ -8,6 +8,7 @@
class Custom(BaseModel):
+ """The custom tool that the model called."""
input: str
"""The input for the custom tool call generated by the model."""
@@ -17,6 +18,7 @@
class ChatCompletionMessageCustomToolCall(BaseModel):
+ """A call to a custom tool created by the model.... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/chat/chat_completion_message_custom_tool_call.py |
Document helper functions with docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal
from ..._models import BaseModel
from .dpo_method import DpoMethod
from ..shared.metadata import Metadata
from .supervised_method import SupervisedMethod... | --- +++ @@ -14,6 +14,9 @@
class Error(BaseModel):
+ """
+ For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.
+ """
code: str
"""A machine-readable error code."""
@@ -29,6 +32,10 @@
class Hyperparameters(BaseModel):
+ """The hyperparam... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/fine_tuning/fine_tuning_job.py |
Create docstrings for all classes and functions | # 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, TypedDict
from ..._types import SequenceNotStr
from .dpo_method_param import DpoMethodParam
from ..sha... | --- +++ @@ -100,6 +100,10 @@
class Hyperparameters(TypedDict, total=False):
+ """
+ The hyperparameters used for the fine-tuning job.
+ This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.
+ """
batch_size: Union[Literal["auto"], int]
"""Nu... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/fine_tuning/job_create_params.py |
Add structured docstrings to improve clarity | # 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__ = ["FineTuningJobCheckpoint", "Metrics"]
class Metrics(BaseModel):
full_valid_loss: Optional[float] = None
full... | --- +++ @@ -9,6 +9,7 @@
class Metrics(BaseModel):
+ """Metrics at the step number during the fine-tuning job."""
full_valid_loss: Optional[float] = None
@@ -26,6 +27,9 @@
class FineTuningJobCheckpoint(BaseModel):
+ """
+ The `fine_tuning.job.checkpoint` object represents a model checkpoint for... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/fine_tuning/jobs/fine_tuning_job_checkpoint.py |
Add docstrings following best practices | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from .grader_inputs_param import GraderInputsParam
fro... | --- +++ @@ -14,6 +14,7 @@
class InputContentOutputText(TypedDict, total=False):
+ """A text output from the model."""
text: Required[str]
"""The text output from the model."""
@@ -23,6 +24,7 @@
class InputContentInputImage(TypedDict, total=False):
+ """An image input block used within EvalItem... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/graders/label_model_grader_param.py |
Generate docstrings with parameter types | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from .._models import BaseModel
__all__ = ["ImageGenCompletedEvent", "Usage", "UsageInputTokensDetails"]
class UsageInputTokensDetails(BaseModel):
image_tokens: int
"""The number of ... | --- +++ @@ -8,6 +8,7 @@
class UsageInputTokensDetails(BaseModel):
+ """The input tokens detailed information for the image generation."""
image_tokens: int
"""The number of image tokens in the input prompt."""
@@ -17,6 +18,9 @@
class Usage(BaseModel):
+ """
+ For the GPT image models only, ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/image_gen_completed_event.py |
Add return value explanations in docstrings | # 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 .grader_inputs_param import GraderInputsParam
from ..shared.reasoning_effort... | --- +++ @@ -21,6 +21,7 @@
class InputContentOutputText(TypedDict, total=False):
+ """A text output from the model."""
text: Required[str]
"""The text output from the model."""
@@ -30,6 +31,7 @@
class InputContentInputImage(TypedDict, total=False):
+ """An image input block used within EvalItem... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/graders/score_model_grader_param.py |
Add docstrings for better understanding | # 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 .grader_inputs import GraderInputs
from ..responses.response_input_text import ResponseInputText
from ..... | --- +++ @@ -12,6 +12,7 @@
class InputContentOutputText(BaseModel):
+ """A text output from the model."""
text: str
"""The text output from the model."""
@@ -21,6 +22,7 @@
class InputContentInputImage(BaseModel):
+ """An image input block used within EvalItem content arrays."""
image_url... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/graders/label_model_grader.py |
Generate docstrings with examples | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from .._models import BaseModel
__all__ = ["ImageEditCompletedEvent", "Usage", "UsageInputTokensDetails"]
class UsageInputTokensDetails(BaseModel):
image_tokens: int
"""The number of... | --- +++ @@ -8,6 +8,7 @@
class UsageInputTokensDetails(BaseModel):
+ """The input tokens detailed information for the image generation."""
image_tokens: int
"""The number of image tokens in the input prompt."""
@@ -17,6 +18,9 @@
class Usage(BaseModel):
+ """
+ For the GPT image models only, ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/image_edit_completed_event.py |
Add detailed docstrings explaining each function | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from .image import Image
from .._models import BaseModel
__all__ = ["ImagesResponse", "Usage", "UsageInputTokensDetails", "UsageOutputTokensDetails"]
class U... | --- +++ @@ -10,6 +10,7 @@
class UsageInputTokensDetails(BaseModel):
+ """The input tokens detailed information for the image generation."""
image_tokens: int
"""The number of image tokens in the input prompt."""
@@ -19,6 +20,7 @@
class UsageOutputTokensDetails(BaseModel):
+ """The output token... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/images_response.py |
Add professional docstrings to my codebase | # 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 pydantic import Field as FieldInfo
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .eval_api_e... | --- +++ @@ -67,6 +67,7 @@
class DataSourceResponsesSourceResponses(BaseModel):
+ """A EvalResponsesSource object describing a run data source configuration."""
type: Literal["responses"]
"""The type of run data source. Always `responses`."""
@@ -146,6 +147,7 @@
class DataSourceResponsesInputMessa... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/run_create_response.py |
Write documentation strings for class attributes | # 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 pydantic import Field as FieldInfo
from .._utils import PropertyInfo
from .._models import BaseModel
from .shared.metad... | --- +++ @@ -28,6 +28,12 @@
class DataSourceConfigLogs(BaseModel):
+ """
+ A LogsDataSourceConfig which specifies the metadata property of your logs query.
+ This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
+ The schema returned by this data source config is used to defined wh... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/eval_list_response.py |
Document all endpoints with docstrings | # 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, TypeAlias, TypedDict
from .._types import SequenceNotStr
from .shared_params.metadata import Met... | --- +++ @@ -65,6 +65,12 @@
class DataSourceConfigCustom(TypedDict, total=False):
+ """
+ A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.
+ This schema is used to define the shape of the data that will be:
+ - Used to define your testing criteria ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/eval_create_params.py |
Generate descriptive docstrings automatically | # 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__ = ["ModerationImageURLInputParam", "ImageURL"]
class ImageURL(TypedDict, total=False):
url: Required[str]
"""Either a ... | --- +++ @@ -8,15 +8,17 @@
class ImageURL(TypedDict, total=False):
+ """Contains either an image URL or a data URL for a base64 encoded image."""
url: Required[str]
"""Either a URL of the image or the base64 encoded image data."""
class ModerationImageURLInputParam(TypedDict, total=False):
+ "... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/moderation_image_url_input_param.py |
Add docstrings with type hints explained | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from .._models import BaseModel
__all__ = ["Moderation", "Categories", "CategoryAppliedInputTypes", "CategoryScores"]
... | --- +++ @@ -11,6 +11,7 @@
class Categories(BaseModel):
+ """A list of the categories, and whether they are flagged or not."""
harassment: bool
"""
@@ -90,6 +91,9 @@
class CategoryAppliedInputTypes(BaseModel):
+ """
+ A list of the categories along with the input type(s) that the score appli... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/moderation.py |
Add inline docstrings for readability | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import TYPE_CHECKING, Dict, List, Optional
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from ...._models import BaseModel
from ..eval_api_error import EvalAPIError
__all__ = ["OutputIte... | --- +++ @@ -12,6 +12,7 @@
class Result(BaseModel):
+ """A single grader result for an evaluation run output item."""
name: str
"""The name of the grader."""
@@ -42,6 +43,7 @@
class SampleInput(BaseModel):
+ """An input message."""
content: str
"""The content of the message."""
@@ -... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/runs/output_item_retrieve_response.py |
Add minimal docstrings for each function | # 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 ..shared.metadata import Metadata
from ..graders.gra... | --- +++ @@ -59,6 +59,7 @@
class SourceStoredCompletions(BaseModel):
+ """A StoredCompletionsRunDataSource configuration describing a set of filters"""
type: Literal["stored_completions"]
"""The type of source. Always `stored_completions`."""
@@ -92,6 +93,7 @@
class InputMessagesTemplateTemplateEv... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/create_eval_completions_run_data_source.py |
Help me add docstrings to my project | # 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 .grader_inputs import GraderInputs
from ..shared.reasoning_effort import ReasoningEffort
from ..response... | --- +++ @@ -20,6 +20,7 @@
class InputContentOutputText(BaseModel):
+ """A text output from the model."""
text: str
"""The text output from the model."""
@@ -29,6 +30,7 @@
class InputContentInputImage(BaseModel):
+ """An image input block used within EvalItem content arrays."""
image_url... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/graders/score_model_grader.py |
Write beginner-friendly docstrings | # 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 pydantic import Field as FieldInfo
from .._utils import PropertyInfo
from .._models import BaseModel
from .shared.metad... | --- +++ @@ -28,6 +28,12 @@
class DataSourceConfigLogs(BaseModel):
+ """
+ A LogsDataSourceConfig which specifies the metadata property of your logs query.
+ This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
+ The schema returned by this data source config is used to defined wh... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/eval_create_response.py |
Add clean documentation to messy code | # 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__ = ["ConversationItemInputAudioTranscriptionFailedEvent", "Error"]
class Error(BaseModel):
code: Optional[str] = None
... | --- +++ @@ -9,6 +9,7 @@
class Error(BaseModel):
+ """Details of the transcription error."""
code: Optional[str] = None
"""Error code, if any."""
@@ -24,6 +25,11 @@
class ConversationItemInputAudioTranscriptionFailedEvent(BaseModel):
+ """
+ Returned when input audio transcription is configu... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/conversation_item_input_audio_transcription_failed_event.py |
Add docstrings explaining edge cases | # 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 pydantic import Field as FieldInfo
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .eval_api_e... | --- +++ @@ -67,6 +67,7 @@
class DataSourceResponsesSourceResponses(BaseModel):
+ """A EvalResponsesSource object describing a run data source configuration."""
type: Literal["responses"]
"""The type of run data source. Always `responses`."""
@@ -146,6 +147,7 @@
class DataSourceResponsesInputMessa... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/run_retrieve_response.py |
Add docstrings to improve collaboration | # 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, TypeAlias, TypedDict
from ..shared_params.metadata import Metadata
from ..shared.reasoning_effor... | --- +++ @@ -59,6 +59,7 @@
class SourceStoredCompletions(TypedDict, total=False):
+ """A StoredCompletionsRunDataSource configuration describing a set of filters"""
type: Required[Literal["stored_completions"]]
"""The type of source. Always `stored_completions`."""
@@ -90,6 +91,7 @@
class InputMes... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/evals/create_eval_completions_run_data_source_param.py |
Provide docstrings following PEP 257 | # 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 .log_prob_properties import LogProbProperties
__all__ = [
"ConversationItemInputAudioTranscriptionC... | --- +++ @@ -16,6 +16,7 @@
class UsageTranscriptTextUsageTokensInputTokenDetails(BaseModel):
+ """Details about the input tokens billed for this request."""
audio_tokens: Optional[int] = None
"""Number of audio tokens billed for this request."""
@@ -25,6 +26,7 @@
class UsageTranscriptTextUsageToke... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/conversation_item_input_audio_transcription_completed_event.py |
Write docstrings for data processing functions | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
__all__ = ["RealtimeAudioInputTurnDetectionParam", "ServerVad", "SemanticVad"]
class Serv... | --- +++ @@ -9,6 +9,9 @@
class ServerVad(TypedDict, total=False):
+ """
+ Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
+ """
type: Required[Literal["server_vad"]]
"""Type of turn detection, `server_vad` to turn on simpl... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_audio_input_turn_detection_param.py |
Add missing documentation to my Python functions | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
__all__ = ["RealtimeAudioInputTurnDetection", "ServerVad", "Semantic... | --- +++ @@ -10,6 +10,9 @@
class ServerVad(BaseModel):
+ """
+ Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
+ """
type: Literal["server_vad"]
"""Type of turn detection, `server_vad` to turn on simple Server VAD."""
@@ -... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_audio_input_turn_detection.py |
Add inline docstrings for readability | # 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__ = ["RealtimeMcpListTools", "Tool"]
class Tool(BaseModel):
input_schema: object
"""The JSON schema describin... | --- +++ @@ -9,6 +9,7 @@
class Tool(BaseModel):
+ """A tool available on an MCP server."""
input_schema: object
"""The JSON schema describing the tool's input."""
@@ -24,6 +25,7 @@
class RealtimeMcpListTools(BaseModel):
+ """A Realtime item listing tools available on an MCP server."""
se... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_mcp_list_tools.py |
Add docstrings to improve readability | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["RealtimeMcpListToolsParam", "Tool"]
class Tool(TypedDict, total=False):
input_sc... | --- +++ @@ -9,6 +9,7 @@
class Tool(TypedDict, total=False):
+ """A tool available on an MCP server."""
input_schema: Required[object]
"""The JSON schema describing the tool's input."""
@@ -24,6 +25,7 @@
class RealtimeMcpListToolsParam(TypedDict, total=False):
+ """A Realtime item listing tools... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_mcp_list_tools_param.py |
Generate descriptive docstrings automatically | # 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 .conversation_item import ConversationItem
from .response_done_event impor... | --- +++ @@ -61,6 +61,10 @@
class ConversationItemRetrieved(BaseModel):
+ """Returned when a conversation item is retrieved with `conversation.item.retrieve`.
+
+ This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise ca... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_server_event.py |
Include argument descriptions in docstrings | # 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 .audio_transcription import AudioTranscription
from ... | --- +++ @@ -40,6 +40,12 @@
class AudioInputNoiseReduction(BaseModel):
+ """Configuration for input audio noise reduction.
+
+ This can be set to `null` to turn off.
+ Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
+ Filtering the audio can improve V... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_session_create_response.py |
Write docstrings describing functionality | # 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 ..._types import SequenceNotStr
__all__ = [
"RealtimeResponseCreateMcpToolP... | --- +++ @@ -19,6 +19,7 @@
class AllowedToolsMcpToolFilter(TypedDict, total=False):
+ """A filter object to specify which tools are allowed."""
read_only: bool
"""Indicates whether or not a tool modifies data or is read-only.
@@ -36,6 +37,7 @@
class RequireApprovalMcpToolApprovalFilterAlways(Typed... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_response_create_mcp_tool_param.py |
Write documentation strings for class attributes | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from .realtime_function_tool_param import ... | --- +++ @@ -22,6 +22,7 @@
class McpAllowedToolsMcpToolFilter(TypedDict, total=False):
+ """A filter object to specify which tools are allowed."""
read_only: bool
"""Indicates whether or not a tool modifies data or is read-only.
@@ -39,6 +40,7 @@
class McpRequireApprovalMcpToolApprovalFilterAlways... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_tools_config_param.py |
Provide docstrings following PEP 257 | # 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__ = ["RealtimeTruncationRetentionRatio", "TokenLimits"]
class TokenLimits(BaseModel):
post_instructions: Optional[int] ... | --- +++ @@ -9,6 +9,10 @@
class TokenLimits(BaseModel):
+ """Optional custom token limits for this truncation strategy.
+
+ If not provided, the model's default token limits will be used.
+ """
post_instructions: Optional[int] = None
"""
@@ -21,6 +25,9 @@
class RealtimeTruncationRetentionRat... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_truncation_retention_ratio.py |
Auto-generate documentation strings for this file | # 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
from .audio_transcription import AudioTranscription
from .noise_reduction_type import NoiseReductionType
from .realtime_audio_f... | --- +++ @@ -13,6 +13,7 @@
class AudioInputNoiseReduction(BaseModel):
+ """Configuration for input audio noise reduction."""
type: Optional[NoiseReductionType] = None
"""Type of noise reduction.
@@ -42,11 +43,13 @@
class Audio(BaseModel):
+ """Configuration for input audio for the session."""
... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_transcription_session_create_response.py |
Document my Python code with docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
__all__ = ["RealtimeTranscriptionSessionAudioInputTurnDetection", "S... | --- +++ @@ -10,6 +10,9 @@
class ServerVad(BaseModel):
+ """
+ Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
+ """
type: Literal["server_vad"]
"""Type of turn detection, `server_vad` to turn on simple Server VAD."""
@@ -... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_transcription_session_audio_input_turn_detection.py |
Create documentation for each function signature | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from ..._models import BaseModel
__all__ = ["RealtimeResponseUsageInputTokenDetails", "CachedTokensDetails"]
class CachedTokensDetails(BaseModel):
audio_tokens: Optional[int] = None
"""The num... | --- +++ @@ -8,6 +8,7 @@
class CachedTokensDetails(BaseModel):
+ """Details about the cached tokens used as input for the Response."""
audio_tokens: Optional[int] = None
"""The number of cached audio tokens used as input for the Response."""
@@ -20,6 +21,10 @@
class RealtimeResponseUsageInputToken... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_response_usage_input_token_details.py |
Add docstrings for utility scripts | # 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 .realtime_function_tool import RealtimeFunctionTool
... | --- +++ @@ -20,6 +20,7 @@
class McpAllowedToolsMcpToolFilter(BaseModel):
+ """A filter object to specify which tools are allowed."""
read_only: Optional[bool] = None
"""Indicates whether or not a tool modifies data or is read-only.
@@ -37,6 +38,7 @@
class McpRequireApprovalMcpToolApprovalFilterAl... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_tools_config_union.py |
Generate docstrings with examples | # 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__ = ["ResponseContentPartAddedEvent", "Part"]
class Part(BaseModel):
audio: Optional[str] = None
"""Base64-encoded ... | --- +++ @@ -9,6 +9,7 @@
class Part(BaseModel):
+ """The content part that was added."""
audio: Optional[str] = None
"""Base64-encoded audio data (if type is "audio")."""
@@ -24,6 +25,10 @@
class ResponseContentPartAddedEvent(BaseModel):
+ """
+ Returned when a new content part is added to a... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/response_content_part_added_event.py |
Add docstrings for internal functions | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
__all__ = [
"ComputerActionParam",
"Click",
... | --- +++ @@ -23,6 +23,7 @@
class Click(TypedDict, total=False):
+ """A click action."""
button: Required[Literal["left", "right", "wheel", "back", "forward"]]
"""Indicates which mouse button was pressed during the click.
@@ -41,6 +42,7 @@
class DoubleClick(TypedDict, total=False):
+ """A double... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/computer_action_param.py |
Generate docstrings with examples | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
__all__ = [
"ComputerAction",
"Click",
"DoubleClick",
"D... | --- +++ @@ -22,6 +22,7 @@
class Click(BaseModel):
+ """A click action."""
button: Literal["left", "right", "wheel", "back", "forward"]
"""Indicates which mouse button was pressed during the click.
@@ -40,6 +41,7 @@
class DoubleClick(BaseModel):
+ """A double click action."""
type: Liter... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/computer_action.py |
Document this script properly | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
__all__ = [
"ComputerActionListParam",
... | --- +++ @@ -24,6 +24,7 @@
class Click(TypedDict, total=False):
+ """A click action."""
button: Required[Literal["left", "right", "wheel", "back", "forward"]]
"""Indicates which mouse button was pressed during the click.
@@ -42,6 +43,7 @@
class DoubleClick(TypedDict, total=False):
+ """A double... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/computer_action_list_param.py |
Provide docstrings following PEP 257 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from ..shared_params.compound_filter import CompoundFi... | --- +++ @@ -15,6 +15,9 @@
class RankingOptionsHybridSearch(TypedDict, total=False):
+ """
+ Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
+ """
embedding_weight: Required[float]
"""The weight of t... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/file_search_tool_param.py |
Add docstrings to make code maintainable | # 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
... | --- +++ @@ -13,6 +13,9 @@
class RankingOptionsHybridSearch(BaseModel):
+ """
+ Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
+ """
embedding_weight: float
"""The weight of the embedding in the rec... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/file_search_tool.py |
Write Python docstrings for this snippet | # 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
__all__ = ["ResponseCodeInterpreterToolCallParam", "Output", "OutputLogs", "Outpu... | --- +++ @@ -9,6 +9,7 @@
class OutputLogs(TypedDict, total=False):
+ """The logs output from the code interpreter."""
logs: Required[str]
"""The logs output from the code interpreter."""
@@ -18,6 +19,7 @@
class OutputImage(TypedDict, total=False):
+ """The image output from the code interpreter... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_code_interpreter_tool_call_param.py |
Add docstrings that explain logic | # 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... | --- +++ @@ -10,6 +10,7 @@
class OutputLogs(BaseModel):
+ """The logs output from the code interpreter."""
logs: str
"""The logs output from the code interpreter."""
@@ -19,6 +20,7 @@
class OutputImage(BaseModel):
+ """The image output from the code interpreter."""
type: Literal["image"]... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_code_interpreter_tool_call.py |
Add detailed documentation for each class | # 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 .tool import Tool
from ..._models import BaseModel
from .response_error import ResponseError
from .response_usage import ResponseUsage
fr... | --- +++ @@ -28,6 +28,7 @@
class IncompleteDetails(BaseModel):
+ """Details about why the response is incomplete."""
reason: Optional[Literal["max_output_tokens", "content_filter"]] = None
"""The reason why the response is incomplete."""
@@ -46,6 +47,10 @@
class Conversation(BaseModel):
+ """Th... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response.py |
Provide docstrings following PEP 257 | # 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 .computer_action_list import ComputerActionList
__all__ =... | --- +++ @@ -25,6 +25,7 @@
class PendingSafetyCheck(BaseModel):
+ """A pending safety check for the computer call."""
id: str
"""The ID of the pending safety check."""
@@ -37,6 +38,7 @@
class ActionClick(BaseModel):
+ """A click action."""
button: Literal["left", "right", "wheel", "back"... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_computer_tool_call.py |
Document all endpoints with docstrings | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
__all__ = [
"ResponseApplyPatchToolCall",
"Operation",
"... | --- +++ @@ -16,6 +16,7 @@
class OperationCreateFile(BaseModel):
+ """Instruction describing how to create a file via the apply_patch tool."""
diff: str
"""Diff to apply."""
@@ -28,6 +29,7 @@
class OperationDeleteFile(BaseModel):
+ """Instruction describing how to delete a file via the apply_pa... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_apply_patch_tool_call.py |
Help me add docstrings to my project | # 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
from .computer_action_list_param import Comp... | --- +++ @@ -26,6 +26,7 @@
class PendingSafetyCheck(TypedDict, total=False):
+ """A pending safety check for the computer call."""
id: Required[str]
"""The ID of the pending safety check."""
@@ -38,6 +39,7 @@
class ActionClick(TypedDict, total=False):
+ """A click action."""
button: Requ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_computer_tool_call_param.py |
Document my Python code with docstrings | # 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, TypeAlias
from ..._models import BaseModel
__all__ = [
"RealtimeResponseCreateMcpTool",
"AllowedTools",
"AllowedToolsMcpToolFilter",
... | --- +++ @@ -17,6 +17,7 @@
class AllowedToolsMcpToolFilter(BaseModel):
+ """A filter object to specify which tools are allowed."""
read_only: Optional[bool] = None
"""Indicates whether or not a tool modifies data or is read-only.
@@ -34,6 +35,7 @@
class RequireApprovalMcpToolApprovalFilterAlways(B... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_response_create_mcp_tool.py |
Write proper docstrings for these functions | # 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__ = [
"ResponseFunctionShellToolCallOutput",
"Ou... | --- +++ @@ -16,12 +16,14 @@
class OutputOutcomeTimeout(BaseModel):
+ """Indicates that the shell call exceeded its configured time limit."""
type: Literal["timeout"]
"""The outcome type. Always `timeout`."""
class OutputOutcomeExit(BaseModel):
+ """Indicates that the shell commands finished a... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_shell_tool_call_output.py |
Fill in missing docstrings in my code | # 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
__all__ = ["ResponseFunctionShellCallOutputContent", "Outcome", "OutcomeTimeou... | --- +++ @@ -10,12 +10,14 @@
class OutcomeTimeout(BaseModel):
+ """Indicates that the shell call exceeded its configured time limit."""
type: Literal["timeout"]
"""The outcome type. Always `timeout`."""
class OutcomeExit(BaseModel):
+ """Indicates that the shell commands finished and returned ... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_shell_call_output_content.py |
Add docstrings with type hints explained | # 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_local_environment import ResponseLocalEnvironmen... | --- +++ @@ -12,6 +12,7 @@
class Action(BaseModel):
+ """The shell commands and limits that describe how to run the tool call."""
commands: List[str]
@@ -28,6 +29,7 @@
class ResponseFunctionShellToolCall(BaseModel):
+ """A tool call that executes one or more shell commands in a managed environment... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_shell_tool_call.py |
Document functions with clear intent | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union
from typing_extensions import Literal, Required, TypeAlias, TypedDict
__all__ = ["ResponseFunctionShellCallOutputContentParam", "Outcome", "OutcomeTimeout", "OutcomeExit"]... | --- +++ @@ -9,12 +9,14 @@
class OutcomeTimeout(TypedDict, total=False):
+ """Indicates that the shell call exceeded its configured time limit."""
type: Required[Literal["timeout"]]
"""The outcome type. Always `timeout`."""
class OutcomeExit(TypedDict, total=False):
+ """Indicates that the she... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_shell_call_output_content_param.py |
Create Google-style docstrings for my code | # 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__ = [
"ResponseFunctionWebSearchP... | --- +++ @@ -18,6 +18,7 @@
class ActionSearchSource(TypedDict, total=False):
+ """A source used in the search."""
type: Required[Literal["url"]]
"""The type of source. Always `url`."""
@@ -27,6 +28,7 @@
class ActionSearch(TypedDict, total=False):
+ """Action type "search" - Performs a web searc... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_web_search_param.py |
Add docstrings to improve collaboration | # 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__ = [
"ResponseFunctionWebSearch",
"Action",
... | --- +++ @@ -17,6 +17,7 @@
class ActionSearchSource(BaseModel):
+ """A source used in the search."""
type: Literal["url"]
"""The type of source. Always `url`."""
@@ -26,6 +27,7 @@
class ActionSearch(BaseModel):
+ """Action type "search" - Performs a web search query."""
query: str
"... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_function_web_search.py |
Can you add docstrings to this Python file? | # 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 .local_environment import LocalEnvironment
from .eas... | --- +++ @@ -55,6 +55,11 @@
class Message(BaseModel):
+ """
+ A message input to the model with a role indicating instruction following
+ hierarchy. Instructions given with the `developer` or `system` role take
+ precedence over instructions given with the `user` role.
+ """
content: ResponseIn... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_input_item.py |
Replace inline comments with docstrings | # 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 .local_environment_param im... | --- +++ @@ -57,6 +57,11 @@
class Message(TypedDict, total=False):
+ """
+ A message input to the model with a role indicating instruction following
+ hierarchy. Instructions given with the `developer` or `system` role take
+ precedence over instructions given with the `user` role.
+ """
conten... | https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_input_param.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.