Skip to content
Open
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 @@ -19,11 +19,14 @@
class ActionSearchSource(BaseModel):
"""A source used in the search."""

type: Literal["url"]
"""The type of source. Always `url`."""
type: Literal["url", "api"]
"""The type of source. `url` for a web page, `api` for a built-in OpenAI data source."""

url: str
"""The URL of the source."""
url: Optional[str] = None
"""The URL of the source. Present when type is `url`."""

name: Optional[str] = None
"""The name of the built-in data source (e.g. `oai-weather`). Present when type is `api`."""


class ActionSearch(BaseModel):
Expand Down