Skip to content
Merged
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
14 changes: 12 additions & 2 deletions google/genai/_gaos/types/interactions/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ class FunctionParam(TypedDict):
name: NotRequired[str]
r"""The name of the function."""
parameters: NotRequired[Any]
r"""The JSON Schema for the function's parameters."""
r"""The JSON Schema for the function's parameters.
Supports a subset of JSON Schema. `minLength`, `maxLength`,
`minProperties`, `maxProperties`, `uniqueItems`, `contains`,
`minContains`, and `maxContains` are ignored and not enforced.
"""
type: Literal["function"]


Expand All @@ -49,7 +54,12 @@ class Function(BaseModel):
r"""The name of the function."""

parameters: Optional[Any] = None
r"""The JSON Schema for the function's parameters."""
r"""The JSON Schema for the function's parameters.
Supports a subset of JSON Schema. `minLength`, `maxLength`,
`minProperties`, `maxProperties`, `uniqueItems`, `contains`,
`minContains`, and `maxContains` are ignored and not enforced.
"""

type: Annotated[
Annotated[Literal["function"], AfterValidator(validate_const("function"))],
Expand Down
14 changes: 14 additions & 0 deletions google/genai/_gaos/types/interactions/textresponseformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ class TextResponseFormatParam(TypedDict):
schema_: NotRequired[Dict[str, Any]]
r"""The JSON schema that the output should conform to. Only applicable when
mime_type is application/json.
Supports a subset of JSON Schema. `minLength`, `maxLength`,
`minProperties`, `maxProperties`, `uniqueItems`, `contains`,
`minContains`, and `maxContains` are ignored and not enforced; validate
these in your application. `minItems` and `maxItems` are enforced. Schemas
that are too complex to enforce (for example, large `maxItems` on nested
arrays) return a 400 INVALID_ARGUMENT error.
"""
type: Literal["text"]

Expand All @@ -58,6 +65,13 @@ class TextResponseFormat(BaseModel):
schema_: Annotated[Optional[Dict[str, Any]], pydantic.Field(alias="schema")] = None
r"""The JSON schema that the output should conform to. Only applicable when
mime_type is application/json.
Supports a subset of JSON Schema. `minLength`, `maxLength`,
`minProperties`, `maxProperties`, `uniqueItems`, `contains`,
`minContains`, and `maxContains` are ignored and not enforced; validate
these in your application. `minItems` and `maxItems` are enforced. Schemas
that are too complex to enforce (for example, large `maxItems` on nested
arrays) return a 400 INVALID_ARGUMENT error.
"""

type: Annotated[
Expand Down
Loading