From ed7f3560df6bfc01fac4f7d247d23d45ce0d73f1 Mon Sep 17 00:00:00 2001
From: Sasha Sobran vertexai (bool) – Indicates whether the client should use the Vertex AI
-API endpoints. Defaults to False (uses Gemini Developer API
-endpoints). Applies to the Vertex AI API only.SubmodulesParameters:
api_key (str) –
The API key to use for authentication. Applies to the Gemini Developer API only.
credentials (google.auth.credentials.Credentials) –
The credentials to -use for authentication when calling the Vertex AI APIs. Credentials -can be obtained from environment variables and default credentials. -For more information, see Set up Application Default Credentials. +
credentials (google.auth.credentials.Credentials) –
The credentials to use +for authentication when calling the Vertex AI APIs. Credentials can be +obtained from environment variables and default credentials. For more +information, see Set up Application Default Credentials. Applies to the Vertex AI API only.
project (str) –
The Google Cloud project ID to
-use for quota. Can be obtained from environment variables (for
-example, GOOGLE_CLOUD_PROJECT
). Applies to the Vertex AI API only.
GOOGLE_CLOUD_PROJECT
). Applies to the Vertex AI API only.
location (str) –
The location
-to send API requests to (for example, us-central1
). Can be
-obtained from environment variables. Applies to the Vertex AI API
-only.
us-central1
). Can be obtained
+from environment variables. Applies to the Vertex AI API only.
debug_config (DebugConfig) – Config settings that control network -behavior of the client. This is typically used when running test code.
http_options (Union[HttpOptions, HttpOptionsDict]) – Http options to use for the client. Response_payload can’t be -set when passing to the client constructor.
debug_config (DebugConfig) – Config settings that control network behavior +of the client. This is typically used when running test code.
http_options (Union[HttpOptions, HttpOptionsDict]) – Http options to use +for the client. The field deprecated_response_payload should not be set +in http_options.
Cancels a batch job.
+Only available for batch jobs that are running or pending.
+None
name (str) –
A fully-qualified BatchJob resource name or ID. +Example: “projects/…/locations/…/batchPredictionJobs/123456789” or
+++ +”123456789” when project and location are initialized in the client.
+
Usage:
+client.batches.cancel(name='123456789')
+
Deletes a batch job.
AsyncPager
[BatchJob
]
config (ListBatchJobConfig) – Optional configuration for the list request.
+config (ListBatchJobsConfig) – Optional configuration for the list request.
A Pager object that contains one page of batch jobs. When iterating over @@ -676,11 +690,25 @@
Cancels a batch job.
+Only available for batch jobs that are running or pending.
+None
name (str) –
A fully-qualified BatchJob resource name or ID. +Example: “projects/…/locations/…/batchPredictionJobs/123456789” or
+++ +”123456789” when project and location are initialized in the client.
+
Usage:
+client.batches.cancel(name='123456789')
+
Deletes a batch job.
Pager
[BatchJob
]
config (ListBatchJobConfig) – Optional configuration for the list request.
+config (ListBatchJobsConfig) – Optional configuration for the list request.
A Pager object that contains one page of batch jobs. When iterating over @@ -1015,11 +1043,14 @@
Sends the conversation history with the additional message and yields the model’s response in chunks.
message – The message to send to the model.
+Awaitable
[AsyncIterator
[GenerateContentResponse
]]
The model’s response in chunks.
+message – The message to send to the model.
+The model’s response in chunks.
Usage:
@@ -1397,16 +1428,17 @@Live client.
+Live client. The live module is experimental.
Bases: BaseModule
AsyncLive.
+AsyncLive. The live module is experimental.
Connect to the live server.
+The live module is experimental.
Usage:
client = genai.Client(api_key=API_KEY)
config = {}
@@ -1429,7 +1461,7 @@ Submodules
class genai.live.AsyncSession(api_client, websocket)¶
Bases: object
-AsyncSession.
+AsyncSession. The live module is experimental.
-
async close()¶
@@ -1443,6 +1475,7 @@ Submodules
- Return type:
AsyncIterator
[LiveServerMessage
]
@@ -1494,6 +1527,7 @@ Submodules
- Return type:
AsyncIterator
[LiveServerMessage
]
@@ -1591,7 +1625,7 @@ Submodules
-
-async delete(*, model)¶
+async delete(*, model, config=None)¶
- Return type:
-
@@ -1720,32 +1754,32 @@
Submodulesasync generate_content_stream(*, model, contents, config=None)¶
- Return type:
-AsyncIterator
[GenerateContentResponse
]
+Awaitable
[AsyncIterator
[GenerateContentResponse
]]
--
-async generate_image(*, model, prompt, config=None)¶
-Generates an image based on a text description and configuration.
+-
+async generate_images(*, model, prompt, config=None)¶
+Generates images based on a text description and configuration.
- Return type:
--
+
-
- Parameters:
model (str) – The model to use.
-prompt (str) – A text description of the image to generate.
-config (GenerateImageConfig) – Configuration for generation.
+prompt (str) – A text description of the images to generate.
+config (GenerateImagesConfig) – Configuration for generation.
Usage:
-response = client.models.generate_image(
+response = client.models.generate_images(
model='imagen-3.0-generate-001',
prompt='Man with a dog',
- config=types.GenerateImageConfig(
+ config=types.GenerateImagesConfig(
number_of_images= 1,
include_rai_reason= True,
)
@@ -1758,7 +1792,7 @@ Submodules
-
-async get(*, model)¶
+async get(*, model, config=None)¶
- Return type:
-
@@ -1902,7 +1936,7 @@
Submodules
-
-delete(*, model)¶
+delete(*, model, config=None)¶
- Return type:
-
@@ -1995,6 +2029,29 @@
Submodules
generate_content(*, model, contents, config=None)¶
Makes an API request to generate content using a model.
+For the model parameter, supported format for Vertex AI API includes:
+:rtype: GenerateContentResponse
+
+the Gemini model ID, for example: ‘gemini-1.5-flash-002’
+the full resource name starts with ‘projects/’, for example:
+‘projects/my-project-id/locations/us-central1/publishers/google/models/gemini-1.5-flash-002’
+the partial resource name with ‘publishers/’, for example:
+‘publishers/google/models/gemini-1.5-flash-002’ or
+‘publishers/meta/models/llama-3.1-405b-instruct-maas’
+/ separated publisher and model name, for example:
+‘google/gemini-1.5-flash-002’ or ‘meta/llama-3.1-405b-instruct-maas’
+
+For the model parameter, supported format for Gemini API includes:
+- the Gemini model ID, for example: ‘gemini-1.5-flash-002’
+- the model name starts with ‘models/’, for example:
+
+‘models/gemini-1.5-flash-002’
+
+
+if you would like to use a tuned model, the model name starts with
+‘tunedModels/’, for example:
+‘tunedModels/1234567890123456789’
+
Some models support multimodal input and output.
Usage:
from google.genai import types
@@ -2028,11 +2085,6 @@ Submodules# scones.
-
-- Return type:
--
-
-
@@ -2046,26 +2098,26 @@ Submodules
--
-generate_image(*, model, prompt, config=None)¶
-Generates an image based on a text description and configuration.
+-
+generate_images(*, model, prompt, config=None)¶
+Generates images based on a text description and configuration.
- Return type:
--
+
-
- Parameters:
model (str) – The model to use.
-prompt (str) – A text description of the image to generate.
-config (GenerateImageConfig) – Configuration for generation.
+prompt (str) – A text description of the images to generate.
+config (GenerateImagesConfig) – Configuration for generation.
Usage:
-response = client.models.generate_image(
+response = client.models.generate_images(
model='imagen-3.0-generate-001',
prompt='Man with a dog',
- config=types.GenerateImageConfig(
+ config=types.GenerateImagesConfig(
number_of_images= 1,
include_rai_reason= True,
)
@@ -2078,7 +2130,7 @@ Submodules
-
-get(*, model)¶
+get(*, model, config=None)¶
- Return type:
-
@@ -2164,28 +2216,6 @@
Submodules
class genai.tunings.AsyncTunings(api_client_)¶
Bases: BaseModule
-
--
-async distill(*, student_model, teacher_model, training_dataset, config=None)¶
-Creates a distillation job.
-
-- Return type:
--
-
-- Parameters:
-
-student_model – The name of the model to tune.
-teacher_model – The name of the model to distill from.
-training_dataset – The training dataset to use.
-config – The configuration to use for the distillation job.
-
-
-- Returns:
-A TuningJob object.
-
-
-
-
-
async get(*, name, config=None)¶
@@ -2222,28 +2252,6 @@ Submodules
class genai.tunings.Tunings(api_client_)¶
Bases: BaseModule
-
--
-distill(*, student_model, teacher_model, training_dataset, config=None)¶
-Creates a distillation job.
-
-- Return type:
--
-
-- Parameters:
-
-student_model – The name of the model to tune.
-teacher_model – The name of the model to distill from.
-training_dataset – The training dataset to use.
-config – The configuration to use for the distillation job.
-
-
-- Returns:
-A TuningJob object.
-
-
-
-
-
get(*, name, config=None)¶
@@ -2451,7 +2459,7 @@ Submodules
pydantic model genai.types.BatchJob¶
Bases: BaseModel
-Config class for batches.create return value.
+Config for batches.create return value.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -2459,7 +2467,7 @@ Submodules
Show JSON schema {
"title": "BatchJob",
- "description": "Config class for batches.create return value.",
+ "description": "Config for batches.create return value.",
"type": "object",
"properties": {
"name": {
@@ -2609,7 +2617,7 @@ Submodules "$defs": {
"BatchJobDestination": {
"additionalProperties": false,
- "description": "Config class for `des` parameter.",
+ "description": "Config for `des` parameter.",
"properties": {
"format": {
"anyOf": [
@@ -2656,7 +2664,7 @@ Submodules },
"BatchJobSource": {
"additionalProperties": false,
- "description": "Config class for `src` parameter.",
+ "description": "Config for `src` parameter.",
"properties": {
"format": {
"anyOf": [
@@ -2706,7 +2714,7 @@ Submodules },
"JobError": {
"additionalProperties": false,
- "description": "Config class for the job error.",
+ "description": "Job error.",
"properties": {
"details": {
"anyOf": [
@@ -2755,7 +2763,7 @@ Submodules "type": "object"
},
"JobState": {
- "description": "Config class for the job state.",
+ "description": "Job state.",
"enum": [
"JOB_STATE_UNSPECIFIED",
"JOB_STATE_QUEUED",
@@ -2867,7 +2875,7 @@ Submodules
pydantic model genai.types.BatchJobDestination¶
Bases: BaseModel
-Config class for des parameter.
+Config for des parameter.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -2875,7 +2883,7 @@ Submodules
Show JSON schema {
"title": "BatchJobDestination",
- "description": "Config class for `des` parameter.",
+ "description": "Config for `des` parameter.",
"type": "object",
"properties": {
"format": {
@@ -2956,7 +2964,7 @@ Submodules
class genai.types.BatchJobDestinationDict¶
Bases: TypedDict
-Config class for des parameter.
+Config for des parameter.
-
bigquery_uri:
Optional
[str
]¶
@@ -2982,7 +2990,7 @@ Submodules
class genai.types.BatchJobDict¶
Bases: TypedDict
-Config class for batches.create return value.
+Config for batches.create return value.
-
create_time:
Optional
[datetime
]¶
@@ -3060,7 +3068,7 @@ Submodules
pydantic model genai.types.BatchJobSource¶
Bases: BaseModel
-Config class for src parameter.
+Config for src parameter.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -3068,7 +3076,7 @@ Submodules
Show JSON schema {
"title": "BatchJobSource",
- "description": "Config class for `src` parameter.",
+ "description": "Config for `src` parameter.",
"type": "object",
"properties": {
"format": {
@@ -3152,7 +3160,7 @@ Submodules
class genai.types.BatchJobSourceDict¶
Bases: TypedDict
-Config class for src parameter.
+Config for src parameter.
-
bigquery_uri:
Optional
[str
]¶
@@ -3179,7 +3187,6 @@ Submodulespydantic model genai.types.Blob¶
Bases: BaseModel
Content blob.
-It’s preferred to send as text directly rather than raw bytes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -3187,7 +3194,7 @@ Submodules
Show JSON schema {
"title": "Blob",
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"type": "object",
"properties": {
"data": {
@@ -3249,7 +3256,6 @@ Submodulesclass genai.types.BlobDict¶
Bases: TypedDict
Content blob.
-It’s preferred to send as text directly rather than raw bytes.
-
data:
Optional
[bytes
]¶
@@ -3361,7 +3367,7 @@ Submodules }
],
"default": null,
- "description": "Creatation time of the cache entry.",
+ "description": "Creation time of the cache entry.",
"title": "Createtime"
},
"updateTime": {
@@ -3500,7 +3506,7 @@ Submodules
-
field create_time:
Optional
[datetime
] = None (alias 'createTime')¶
-Creatation time of the cache entry.
+Creation time of the cache entry.
@@ -3549,7 +3555,7 @@ Submodules
-
create_time:
Optional
[datetime
]¶
-Creatation time of the cache entry.
+Creation time of the cache entry.
@@ -3773,15 +3779,102 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
}
},
"additionalProperties": false
@@ -3791,13 +3884,13 @@ Submodules
- Fields:
-
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -3810,7 +3903,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -3820,7 +3913,7 @@ Submodules
pydantic model genai.types.Candidate¶
Bases: BaseModel
-Class containing a response candidate generated from the model.
+A response candidate generated from the model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -3828,7 +3921,7 @@ Submodules
Show JSON schema {
"title": "Candidate",
- "description": "Class containing a response candidate generated from the model.",
+ "description": "A response candidate generated from the model.",
"type": "object",
"properties": {
"content": {
@@ -3963,7 +4056,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -4083,7 +4176,7 @@ Submodules },
"CitationMetadata": {
"additionalProperties": false,
- "description": "Class for citation information when the model quotes another source.",
+ "description": "Citation information when the model quotes another source.",
"properties": {
"citations": {
"anyOf": [
@@ -5267,7 +5360,7 @@ Submodules
class genai.types.CandidateDict¶
Bases: TypedDict
-Class containing a response candidate generated from the model.
+A response candidate generated from the model.
-
avg_logprobs:
Optional
[float
]¶
@@ -5573,7 +5666,7 @@ Submodules
pydantic model genai.types.CitationMetadata¶
Bases: BaseModel
-Class for citation information when the model quotes another source.
+Citation information when the model quotes another source.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -5581,7 +5674,7 @@ Submodules
Show JSON schema {
"title": "CitationMetadata",
- "description": "Class for citation information when the model quotes another source.",
+ "description": "Citation information when the model quotes another source.",
"type": "object",
"properties": {
"citations": {
@@ -5760,7 +5853,7 @@ Submodules
class genai.types.CitationMetadataDict¶
Bases: TypedDict
-Class for citation information when the model quotes another source.
+Citation information when the model quotes another source.
-
citations:
Optional
[list
[CitationDict
]]¶
@@ -5890,15 +5983,102 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
}
},
"additionalProperties": false
@@ -5908,13 +6088,13 @@ Submodules
- Fields:
-
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -5927,7 +6107,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -6101,7 +6281,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -6869,7 +7049,7 @@ Submodules
pydantic model genai.types.ControlReferenceImage¶
Bases: BaseModel
-Class that represents a Control reference image.
+A control reference image.
The image of the control reference image is either a control image provided
by the user, or a regular image which the backend will use to generate a
control image of. In the case of the latter, the
@@ -6883,7 +7063,7 @@
Submodules
Show JSON schema {
"title": "ControlReferenceImage",
- "description": "Class that represents a Control reference image.\n\nThe image of the control reference image is either a control image provided\nby the user, or a regular image which the backend will use to generate a\ncontrol image of. In the case of the latter, the\nenable_control_image_computation field in the config should be set to True.\n\nA control image is an image that represents a sketch image of areas for the\nmodel to fill in based on the prompt.",
+ "description": "A control reference image.\n\nThe image of the control reference image is either a control image provided\nby the user, or a regular image which the backend will use to generate a\ncontrol image of. In the case of the latter, the\nenable_control_image_computation field in the config should be set to True.\n\nA control image is an image that represents a sketch image of areas for the\nmodel to fill in based on the prompt.",
"type": "object",
"properties": {
"referenceImage": {
@@ -6996,7 +7176,7 @@ Submodules },
"Image": {
"additionalProperties": false,
- "description": "Class that represents an image.",
+ "description": "An image.",
"properties": {
"gcsUri": {
"anyOf": [
@@ -7024,6 +7204,19 @@ Submodules "default": null,
"description": "The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n ",
"title": "Imagebytes"
+ },
+ "mimeType": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The MIME type of the image.",
+ "title": "Mimetype"
}
},
"title": "Image",
@@ -7081,7 +7274,7 @@ Submodules
class genai.types.ControlReferenceImageDict¶
Bases: TypedDict
-Class that represents a Control reference image.
+A control reference image.
The image of the control reference image is either a control image provided
by the user, or a regular image which the backend will use to generate a
control image of. In the case of the latter, the
@@ -7159,15 +7352,14 @@
Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
},
"systemInstruction": {
"anyOf": [
@@ -7239,7 +7431,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -7376,7 +7568,7 @@ Submodules "type": "object"
},
"DynamicRetrievalConfigMode": {
- "description": "Config class for the dynamic retrieval config mode.",
+ "description": "Config for the dynamic retrieval config mode.",
"enum": [
"MODE_UNSPECIFIED",
"MODE_DYNAMIC"
@@ -8175,6 +8367,92 @@ Submodules "title": "GoogleSearchRetrieval",
"type": "object"
},
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ },
"Language": {
"description": "Required. Programming language of the `code`.",
"enum": [
@@ -8900,7 +9178,7 @@ SubmodulesFields:
-
+
@@ -8915,7 +9193,7 @@ Submodules
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -8948,7 +9226,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -9058,7 +9336,7 @@ Submodules
pydantic model genai.types.CreateBatchJobConfig¶
Bases: BaseModel
-Config class for optional parameters.
+Config for optional parameters.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -9066,21 +9344,20 @@ Submodules
Show JSON schema {
"title": "CreateBatchJobConfig",
- "description": "Config class for optional parameters.",
+ "description": "Config for optional parameters.",
"type": "object",
"properties": {
"httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
},
"displayName": {
"anyOf": [
@@ -9109,6 +9386,94 @@ Submodules "title": "Dest"
}
},
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ }
+ },
"additionalProperties": false
}
@@ -9118,7 +9483,7 @@ Submodules
-
+
@@ -9137,7 +9502,7 @@ Submodules
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -9147,7 +9512,7 @@ Submodules
class genai.types.CreateBatchJobConfigDict¶
Bases: TypedDict
-Config class for optional parameters.
+Config for optional parameters.
-
dest:
Optional
[str
]¶
@@ -9163,7 +9528,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -9173,7 +9538,7 @@ Submodules
pydantic model genai.types.CreateCachedContentConfig¶
Bases: BaseModel
-Class for configuring optional cached content creation parameters.
+Optional configuration for cached content creation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -9181,21 +9546,20 @@ Submodules
Show JSON schema {
"title": "CreateCachedContentConfig",
- "description": "Class for configuring optional cached content creation parameters.",
+ "description": "Optional configuration for cached content creation.",
"type": "object",
"properties": {
"httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
},
"ttl": {
"anyOf": [
@@ -9380,7 +9744,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -9517,7 +9881,7 @@ Submodules "type": "object"
},
"DynamicRetrievalConfigMode": {
- "description": "Config class for the dynamic retrieval config mode.",
+ "description": "Config for the dynamic retrieval config mode.",
"enum": [
"MODE_UNSPECIFIED",
"MODE_DYNAMIC"
@@ -9937,7 +10301,7 @@ Submodules "type": "object"
},
"FunctionCallingConfigMode": {
- "description": "Config class for the function calling config mode.",
+ "description": "Config for the function calling config mode.",
"enum": [
"MODE_UNSPECIFIED",
"AUTO",
@@ -10079,6 +10443,92 @@ Submodules "title": "GoogleSearchRetrieval",
"type": "object"
},
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ },
"Language": {
"description": "Required. Programming language of the `code`.",
"enum": [
@@ -10826,7 +11276,7 @@ Submodulescontents (list[genai.types.Content | list[genai.types.File | genai.types.Part | PIL.Image.Image | str] | genai.types.File | genai.types.Part | PIL.Image.Image | str] | genai.types.Content | list[genai.types.File | genai.types.Part | PIL.Image.Image | str] | genai.types.File | genai.types.Part | PIL.Image.Image | str | None)
-
+
@@ -10854,7 +11304,7 @@ Submodules
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -10888,7 +11338,7 @@ Submodules
class genai.types.CreateCachedContentConfigDict¶
Bases: TypedDict
-Class for configuring optional cached content creation parameters.
+Optional configuration for cached content creation.
-
contents:
Union
[list
[Union
[Content
, list
[Union
[File
, Part
, Image
, str
]], File
, Part
, Image
, str
, ContentDict
]], Content
, list
[Union
[File
, Part
, Image
, str
]], File
, Part
, Image
, str
, ContentDict
, None
]¶
@@ -10909,7 +11359,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -10945,44 +11395,219 @@ Submodules
--
-pydantic model genai.types.CreateDistillationJobConfig¶
+-
+pydantic model genai.types.CreateFileConfig¶
Bases: BaseModel
-Distillation job creation request - optional fields.
+Used to override the default configuration.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{
- "title": "CreateDistillationJobConfig",
- "description": "Distillation job creation request - optional fields.",
+ "title": "CreateFileConfig",
+ "description": "Used to override the default configuration.",
"type": "object",
"properties": {
"httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ }
+ },
+ "additionalProperties": false
+}
+
+
+
+- Fields:
+-
+
+
+
+-
+field http_options:
Optional
[HttpOptions
] = None (alias 'httpOptions')¶
+Used to override HTTP request options.
+
+
+
+
+
+-
+class genai.types.CreateFileConfigDict¶
+Bases: TypedDict
+Used to override the default configuration.
+
+-
+http_options:
Optional
[HttpOptionsDict
]¶
+Used to override HTTP request options.
+
+
+
+
+
+-
+pydantic model genai.types.CreateFileResponse¶
+Bases: BaseModel
+Response for the create file method.
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+Show JSON schema
{
+ "title": "CreateFileResponse",
+ "description": "Response for the create file method.",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+}
+
+
+
+
+
+-
+class genai.types.CreateFileResponseDict¶
+Bases: TypedDict
+Response for the create file method.
+
+
+
+-
+pydantic model genai.types.CreateTuningJobConfig¶
+Bases: BaseModel
+Supervised fine-tuning job creation request - optional fields.
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+Show JSON schema
{
+ "title": "CreateTuningJobConfig",
+ "description": "Supervised fine-tuning job creation request - optional fields.",
+ "type": "object",
+ "properties": {
+ "httpOptions": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HttpOptions"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Used to override HTTP request options."
},
"validationDataset": {
"anyOf": [
{
- "$ref": "#/$defs/DistillationValidationDataset"
+ "$ref": "#/$defs/TuningValidationDataset"
},
{
"type": "null"
}
],
"default": null,
- "description": "Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."
+ "description": "Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."
},
"tunedModelDisplayName": {
"anyOf": [
@@ -10996,364 +11621,19 @@ Submodules "default": null,
"description": "The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.",
"title": "Tunedmodeldisplayname"
- },
- "epochCount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Number of complete passes the model makes over the entire training dataset during training.",
- "title": "Epochcount"
- },
- "learningRateMultiplier": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Multiplier for adjusting the default learning rate.",
- "title": "Learningratemultiplier"
- },
- "adapterSize": {
- "anyOf": [
- {
- "$ref": "#/$defs/AdapterSize"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Adapter size for tuning."
- },
- "pipelineRootDirectory": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The resource name of the PipelineJob associated with the TuningJob. Format:`projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.",
- "title": "Pipelinerootdirectory"
- }
- },
- "$defs": {
- "AdapterSize": {
- "description": "Optional. Adapter size for tuning.",
- "enum": [
- "ADAPTER_SIZE_UNSPECIFIED",
- "ADAPTER_SIZE_ONE",
- "ADAPTER_SIZE_FOUR",
- "ADAPTER_SIZE_EIGHT",
- "ADAPTER_SIZE_SIXTEEN",
- "ADAPTER_SIZE_THIRTY_TWO"
- ],
- "title": "AdapterSize",
- "type": "string"
- },
- "DistillationValidationDataset": {
- "additionalProperties": false,
- "description": "Validation dataset.",
- "properties": {
- "gcsUri": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "GCS URI of the file containing validation dataset in JSONL format.",
- "title": "Gcsuri"
- }
- },
- "title": "DistillationValidationDataset",
- "type": "object"
- }
- },
- "additionalProperties": false
-}
-
-
-
-- Fields:
--
-
-
-
--
-field adapter_size:
Optional
[AdapterSize
] = None (alias 'adapterSize')¶
-Adapter size for tuning.
-
-
-
--
-field epoch_count:
Optional
[int
] = None (alias 'epochCount')¶
-Number of complete passes the model makes over the entire training dataset during training.
-
-
-
--
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
-Used to override HTTP request options.
-
-
-
--
-field learning_rate_multiplier:
Optional
[float
] = None (alias 'learningRateMultiplier')¶
-Multiplier for adjusting the default learning rate.
-
-
-
--
-field pipeline_root_directory:
Optional
[str
] = None (alias 'pipelineRootDirectory')¶
-The resource name of the PipelineJob associated with the TuningJob. Format:projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}.
-
-
-
--
-field tuned_model_display_name:
Optional
[str
] = None (alias 'tunedModelDisplayName')¶
-The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.
-
-
-
--
-field validation_dataset:
Optional
[DistillationValidationDataset
] = None (alias 'validationDataset')¶
-Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
-
-
-
-
--
-class genai.types.CreateDistillationJobConfigDict¶
-Bases: TypedDict
-Distillation job creation request - optional fields.
-
--
-adapter_size:
Optional
[AdapterSize
]¶
-Adapter size for tuning.
-
-
-
--
-epoch_count:
Optional
[int
]¶
-Number of complete passes the model makes over the entire training dataset during training.
-
-
-
--
-http_options:
Optional
[dict
[str
, Any
]]¶
-Used to override HTTP request options.
-
-
-
--
-learning_rate_multiplier:
Optional
[float
]¶
-Multiplier for adjusting the default learning rate.
-
-
-
--
-pipeline_root_directory:
Optional
[str
]¶
-projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}.
-
-- Type:
-The resource name of the PipelineJob associated with the TuningJob. Format
-
-
-
-
-
--
-tuned_model_display_name:
Optional
[str
]¶
-The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.
-
-
-
--
-validation_dataset:
Optional
[DistillationValidationDatasetDict
]¶
-Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
-
-
-
-
--
-pydantic model genai.types.CreateFileConfig¶
-Bases: BaseModel
-Used to override the default configuration.
-Create a new model by parsing and validating input data from keyword arguments.
-Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
-validated to form a valid model.
-self is explicitly positional-only to allow self as a field name.
-
-Show JSON schema
{
- "title": "CreateFileConfig",
- "description": "Used to override the default configuration.",
- "type": "object",
- "properties": {
- "httpOptions": {
- "anyOf": [
- {
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
- }
- },
- "additionalProperties": false
-}
-
-
-
-- Fields:
--
-
-
-
--
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
-Used to override HTTP request options.
-
-
-
-
-
--
-class genai.types.CreateFileConfigDict¶
-Bases: TypedDict
-Used to override the default configuration.
-
--
-http_options:
Optional
[dict
[str
, Any
]]¶
-Used to override HTTP request options.
-
-
-
-
-
--
-pydantic model genai.types.CreateFileResponse¶
-Bases: BaseModel
-Response for the create file method.
-Create a new model by parsing and validating input data from keyword arguments.
-Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
-validated to form a valid model.
-self is explicitly positional-only to allow self as a field name.
-
-Show JSON schema
{
- "title": "CreateFileResponse",
- "description": "Response for the create file method.",
- "type": "object",
- "properties": {},
- "additionalProperties": false
-}
-
-
-
-
-
--
-class genai.types.CreateFileResponseDict¶
-Bases: TypedDict
-Response for the create file method.
-
-
-
--
-pydantic model genai.types.CreateTuningJobConfig¶
-Bases: BaseModel
-Supervised fine-tuning job creation request - optional fields.
-Create a new model by parsing and validating input data from keyword arguments.
-Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
-validated to form a valid model.
-self is explicitly positional-only to allow self as a field name.
-
-Show JSON schema
{
- "title": "CreateTuningJobConfig",
- "description": "Supervised fine-tuning job creation request - optional fields.",
- "type": "object",
- "properties": {
- "httpOptions": {
- "anyOf": [
- {
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
- },
- "validationDataset": {
- "anyOf": [
- {
- "$ref": "#/$defs/TuningValidationDataset"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."
- },
- "tunedModelDisplayName": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.",
- "title": "Tunedmodeldisplayname"
- },
- "description": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The description of the TuningJob",
- "title": "Description"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The description of the TuningJob",
+ "title": "Description"
},
"epochCount": {
"anyOf": [
@@ -11434,6 +11714,92 @@ Submodules "title": "AdapterSize",
"type": "string"
},
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ },
"TuningValidationDataset": {
"additionalProperties": false,
"properties": {
@@ -11466,7 +11832,7 @@ Submodulesbatch_size (int | None)
-
+
@@ -11500,7 +11866,7 @@ Submodules
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -11561,7 +11927,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -12122,7 +12488,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -12844,6 +13210,154 @@ Submodules
+-
+pydantic model genai.types.DeleteBatchJobConfig¶
+Bases: BaseModel
+Optional parameters for models.get method.
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+Show JSON schema
{
+ "title": "DeleteBatchJobConfig",
+ "description": "Optional parameters for models.get method.",
+ "type": "object",
+ "properties": {
+ "httpOptions": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HttpOptions"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ }
+ },
+ "additionalProperties": false
+}
+
+
+
+- Fields:
+-
+
+
+
+-
+field http_options:
Optional
[HttpOptions
] = None (alias 'httpOptions')¶
+Used to override HTTP request options.
+
+
+
+
+
+-
+class genai.types.DeleteBatchJobConfigDict¶
+Bases: TypedDict
+Optional parameters for models.get method.
+
+-
+http_options:
Optional
[HttpOptionsDict
]¶
+Used to override HTTP request options.
+
+
+
+
-
pydantic model genai.types.DeleteCachedContentConfig¶
@@ -12862,15 +13376,102 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
}
},
"additionalProperties": false
@@ -12880,13 +13481,13 @@ Submodules
- Fields:
-
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -12899,7 +13500,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -12951,15 +13552,102 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
}
},
"additionalProperties": false
@@ -12969,13 +13657,13 @@ Submodules
- Fields:
-
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -12988,7 +13676,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -13022,6 +13710,151 @@ Submodules
+-
+pydantic model genai.types.DeleteModelConfig¶
+Bases: BaseModel
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+Show JSON schema
{
+ "title": "DeleteModelConfig",
+ "type": "object",
+ "properties": {
+ "httpOptions": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HttpOptions"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ }
+ },
+ "additionalProperties": false
+}
+
+
+
+- Fields:
+-
+
+
+
+-
+field http_options:
Optional
[HttpOptions
] = None (alias 'httpOptions')¶
+Used to override HTTP request options.
+
+
+
+
+
+-
+class genai.types.DeleteModelConfigDict¶
+Bases: TypedDict
+
+-
+http_options:
Optional
[HttpOptionsDict
]¶
+Used to override HTTP request options.
+
+
+
+
-
pydantic model genai.types.DeleteModelResponse¶
@@ -13051,7 +13884,7 @@ Submodules
pydantic model genai.types.DeleteResourceJob¶
Bases: BaseModel
-Config class for the return value of delete operation.
+The return value of delete operation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -13059,7 +13892,7 @@ Submodules
Show JSON schema
{
"title": "DeleteResourceJob",
- "description": "Config class for the return value of delete operation.",
+ "description": "The return value of delete operation.",
"type": "object",
"properties": {
"name": {
@@ -13104,7 +13937,7 @@ Submodules "$defs": {
"JobError": {
"additionalProperties": false,
- "description": "Config class for the job error.",
+ "description": "Job error.",
"properties": {
"details": {
"anyOf": [
@@ -13187,7 +14020,7 @@ Submodules
class genai.types.DeleteResourceJobDict¶
Bases: TypedDict
-Config class for the return value of delete operation.
+The return value of delete operation.
-
done:
Optional
[bool
]¶
@@ -13262,7 +14095,7 @@ Submodules "$defs": {
"Blob": {
"additionalProperties": false,
- "description": "Content blob.\n\nIt's preferred to send as text directly rather than raw bytes.",
+ "description": "Content blob.",
"properties": {
"data": {
"anyOf": [
@@ -14005,67 +14838,6 @@ Submodules
--
-pydantic model genai.types.DistillationDataset¶
-Bases: BaseModel
-Training dataset.
-Create a new model by parsing and validating input data from keyword arguments.
-Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
-validated to form a valid model.
-self is explicitly positional-only to allow self as a field name.
-
-Show JSON schema
{
- "title": "DistillationDataset",
- "description": "Training dataset.",
- "type": "object",
- "properties": {
- "gcsUri": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "GCS URI of the file containing training dataset in JSONL format.",
- "title": "Gcsuri"
- }
- },
- "additionalProperties": false
-}
-
-
-
-- Fields:
--
-
-
-
--
-field gcs_uri:
Optional
[str
] = None (alias 'gcsUri')¶
-GCS URI of the file containing training dataset in JSONL format.
-
-
-
-
-
--
-class genai.types.DistillationDatasetDict¶
-Bases: TypedDict
-Training dataset.
-
--
-gcs_uri:
Optional
[str
]¶
-GCS URI of the file containing training dataset in JSONL format.
-
-
-
-
-
pydantic model genai.types.DistillationHyperParameters¶
@@ -14475,67 +15247,6 @@ Submodules
--
-pydantic model genai.types.DistillationValidationDataset¶
-Bases: BaseModel
-Validation dataset.
-Create a new model by parsing and validating input data from keyword arguments.
-Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
-validated to form a valid model.
-self is explicitly positional-only to allow self as a field name.
-
-Show JSON schema
{
- "title": "DistillationValidationDataset",
- "description": "Validation dataset.",
- "type": "object",
- "properties": {
- "gcsUri": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "GCS URI of the file containing validation dataset in JSONL format.",
- "title": "Gcsuri"
- }
- },
- "additionalProperties": false
-}
-
-
-
-- Fields:
--
-
-
-
--
-field gcs_uri:
Optional
[str
] = None (alias 'gcsUri')¶
-GCS URI of the file containing validation dataset in JSONL format.
-
-
-
-
-
--
-class genai.types.DistillationValidationDatasetDict¶
-Bases: TypedDict
-Validation dataset.
-
--
-gcs_uri:
Optional
[str
]¶
-GCS URI of the file containing validation dataset in JSONL format.
-
-
-
-
-
pydantic model genai.types.DownloadFileConfig¶
@@ -14554,15 +15265,102 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
+ }
+ },
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
}
},
"additionalProperties": false
@@ -14572,13 +15370,13 @@ Submodules
- Fields:
-
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -14591,7 +15389,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -14640,7 +15438,7 @@ Submodules },
"$defs": {
"DynamicRetrievalConfigMode": {
- "description": "Config class for the dynamic retrieval config mode.",
+ "description": "Config for the dynamic retrieval config mode.",
"enum": [
"MODE_UNSPECIFIED",
"MODE_DYNAMIC"
@@ -14698,7 +15496,7 @@ Submodules
class genai.types.DynamicRetrievalConfigMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases: CaseInSensitiveEnum
-Config class for the dynamic retrieval config mode.
+Config for the dynamic retrieval config mode.
-
MODE_DYNAMIC = 'MODE_DYNAMIC'¶
@@ -14729,15 +15527,14 @@ Submodules "httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
},
"outputGcsUri": {
"anyOf": [
@@ -14921,6 +15718,92 @@ Submodules "title": "EditMode",
"type": "string"
},
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ },
"ImagePromptLanguage": {
"description": "Enum that specifies the language of the text in the prompt.",
"enum": [
@@ -14964,7 +15847,7 @@ Submodules
-
+
@@ -14995,7 +15878,7 @@ Submodules
-
-field http_options:
Optional
[dict
[str
, Any
]] = None (alias 'httpOptions')¶
+field http_options: Optional
[HttpOptions
] = None (alias 'httpOptions')¶
Used to override HTTP request options.
@@ -15091,7 +15974,7 @@ Submodules
-
-http_options:
Optional
[dict
[str
, Any
]]¶
+http_options: Optional
[HttpOptionsDict
]¶
Used to override HTTP request options.
@@ -15201,7 +16084,7 @@ Submodules "$defs": {
"GeneratedImage": {
"additionalProperties": false,
- "description": "Class that represents an output image.",
+ "description": "An output image.",
"properties": {
"image": {
"anyOf": [
@@ -15234,7 +16117,7 @@ Submodules },
"Image": {
"additionalProperties": false,
- "description": "Class that represents an image.",
+ "description": "An image.",
"properties": {
"gcsUri": {
"anyOf": [
@@ -15262,6 +16145,19 @@ Submodules "default": null,
"description": "The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n ",
"title": "Imagebytes"
+ },
+ "mimeType": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The MIME type of the image.",
+ "title": "Mimetype"
}
},
"title": "Image",
@@ -15351,7 +16247,7 @@ Submodules
pydantic model genai.types.EmbedContentConfig¶
Bases: BaseModel
-Class for configuring optional parameters for the embed_content method.
+Optional parameters for the embed_content method.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
@@ -15359,21 +16255,20 @@ Submodules
Show JSON schema
{
"title": "EmbedContentConfig",
- "description": "Class for configuring optional parameters for the embed_content method.",
+ "description": "Optional parameters for the embed_content method.",
"type": "object",
"properties": {
"httpOptions": {
"anyOf": [
{
- "type": "object"
+ "$ref": "#/$defs/HttpOptions"
},
{
"type": "null"
}
],
"default": null,
- "description": "Used to override HTTP request options.",
- "title": "Httpoptions"
+ "description": "Used to override HTTP request options."
},
"taskType": {
"anyOf": [
@@ -15441,6 +16336,94 @@ Submodules "title": "Autotruncate"
}
},
+ "$defs": {
+ "HttpOptions": {
+ "additionalProperties": false,
+ "description": "HTTP options to be used in each of the requests.",
+ "properties": {
+ "baseUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The base URL for the AI platform service endpoint.",
+ "title": "Baseurl"
+ },
+ "apiVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Specifies the version of the API to use.",
+ "title": "Apiversion"
+ },
+ "headers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Additional HTTP headers to be sent with the request.",
+ "title": "Headers"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Timeout for the request in milliseconds.",
+ "title": "Timeout"
+ },
+ "deprecatedResponsePayload": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "maxItems": 1,
+ "minItems": 1,
+ "prefixItems": [
+ {
+ "title": "Iterable"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This field is deprecated. If set, the response payload will be returned int the supplied dict.",
+ "title": "Deprecatedresponsepayload"
+ }
+ },
+ "title": "HttpOptions",
+ "type": "object"
+ }
+ },
"additionalProperties": false
}
@@ -15449,7 +16432,7 @@ SubmodulesFields: