Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/openai/types/responses/response_function_web_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@


class ActionSearchSource(BaseModel):
type: Literal["url"]
"""The type of source. Always `url`."""
type: Literal["url", "api"]
"""The type of source. Can be 'url' for web sources or 'api' for specialized OpenAI APIs."""

url: str
"""The URL of the source."""
url: Optional[str] = None
"""The URL of the source (present when type='url')."""

name: Optional[str] = None
"""The name/identifier of the specialized API (e.g., 'oai-weather', 'oai-sports', 'oai-finance')."""


class ActionSearch(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@


class ActionSearchSource(TypedDict, total=False):
type: Required[Literal["url"]]
"""The type of source. Always `url`."""
type: Required[Literal["url", "api"]]
"""The type of source. Can be 'url' for web sources or 'api' for specialized OpenAI APIs."""

url: Required[str]
"""The URL of the source."""
url: str
"""The URL of the source (present when type='url')."""

name: str
"""The name/identifier of the specialized API (e.g., 'oai-weather', 'oai-sports', 'oai-finance')."""


class ActionSearch(TypedDict, total=False):
Expand Down