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
4 changes: 2 additions & 2 deletions google/genai/batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ def create(
.. code-block:: python

batch_job = client.batches.create(
model="gemini-2.0-flash-001",
model="gemini-flash-latest",
src="gs://path/to/input/data",
)
print(batch_job.state)
Expand Down Expand Up @@ -2916,7 +2916,7 @@ async def create(
.. code-block:: python

batch_job = await client.aio.batches.create(
model="gemini-2.0-flash-001",
model="gemini-flash-latest",
src="gs://path/to/input/data",
)
"""
Expand Down
62 changes: 31 additions & 31 deletions google/genai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5748,7 +5748,7 @@ def count_tokens(
.. code-block:: python

response = client.models.count_tokens(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='What is your name?',
)
print(response)
Expand Down Expand Up @@ -5859,7 +5859,7 @@ def compute_tokens(
.. code-block:: python

response = client.models.compute_tokens(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='What is your name?',
)
print(response)
Expand Down Expand Up @@ -6119,18 +6119,18 @@ def generate_content(

For the `model` parameter, supported formats for Gemini Enterprise Agent
Platform API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The full resource name starts with 'projects/', for example:
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-flash-latest'
- The partial resource name with 'publishers/', for example:
'publishers/google/models/gemini-2.0-flash' or
'publishers/google/models/gemini-flash-latest' or
- `/` separated publisher and model name, for example:
'google/gemini-2.0-flash'
'google/gemini-flash-latest'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The model name starts with 'models/', for example:
'models/gemini-2.0-flash'
'models/gemini-flash-latest'
- For tuned models, the model name starts with 'tunedModels/',
for example:
'tunedModels/1234567890123456789'
Expand All @@ -6151,7 +6151,7 @@ def generate_content(
)

response = client.models.generate_content(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='''What is a good name for a flower shop that specializes in
selling bouquets of dried flowers?'''
)
Expand All @@ -6162,7 +6162,7 @@ def generate_content(
# * Timeless Petals

response = client.models.generate_content(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents=[
types.Part.from_text(text='What is shown in this image?'),
types.Part.from_uri(file_uri='gs://generativeai-downloads/images/scones.jpg',
Expand Down Expand Up @@ -6290,18 +6290,18 @@ def generate_content_stream(

For the `model` parameter, supported formats for Gemini Enterprise Agent
Platform API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The full resource name starts with 'projects/', for example:
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-flash-latest'
- The partial resource name with 'publishers/', for example:
'publishers/google/models/gemini-2.0-flash' or
'publishers/google/models/gemini-flash-latest' or
- `/` separated publisher and model name, for example:
'google/gemini-2.0-flash'
'google/gemini-flash-latest'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The model name starts with 'models/', for example:
'models/gemini-2.0-flash'
'models/gemini-flash-latest'
- For tuned models, the model name starts with 'tunedModels/',
for example:
'tunedModels/1234567890123456789'
Expand All @@ -6322,7 +6322,7 @@ def generate_content_stream(
)

for chunk in client.models.generate_content_stream(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='''What is a good name for a flower shop that specializes in
selling bouquets of dried flowers?'''
):
Expand All @@ -6333,7 +6333,7 @@ def generate_content_stream(
# * Timeless Petals

for chunk in client.models.generate_content_stream(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents=[
types.Part.from_text('What is shown in this image?'),
types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
Expand Down Expand Up @@ -6798,7 +6798,7 @@ def list(

response=client.models.list(config={'page_size': 5, 'query_base': True})
print(response.page)
# [Model(name='publishers/google/models/gemini-2.0-flash-exp' ...
# [Model(name='publishers/google/models/gemini-flash-latest' ...
"""

config = (
Expand Down Expand Up @@ -7971,7 +7971,7 @@ async def count_tokens(
.. code-block:: python

response = await client.aio.models.count_tokens(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='What is your name?',
)
print(response)
Expand Down Expand Up @@ -8081,7 +8081,7 @@ async def compute_tokens(
.. code-block:: python

response = await client.aio.models.compute_tokens(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='What is your name?',
)
print(response)
Expand Down Expand Up @@ -8285,7 +8285,7 @@ async def generate_content(
)

response = await client.aio.models.generate_content(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='User input: I like bagels. Answer:',
config=types.GenerateContentConfig(
system_instruction=
Expand Down Expand Up @@ -8487,18 +8487,18 @@ async def generate_content_stream(

For the `model` parameter, supported formats for Gemini Enterprise Agent
Platform API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The full resource name starts with 'projects/', for example:
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-flash-latest'
- The partial resource name with 'publishers/', for example:
'publishers/google/models/gemini-2.0-flash' or
'publishers/google/models/gemini-flash-latest' or
- `/` separated publisher and model name, for example:
'google/gemini-2.0-flash'
'google/gemini-flash-latest'

For the `model` parameter, supported formats for Gemini API include:
- The Gemini model ID, for example: 'gemini-2.0-flash'
- The Gemini model ID, for example: 'gemini-flash-latest'
- The model name starts with 'models/', for example:
'models/gemini-2.0-flash'
'models/gemini-flash-latest'
- For tuned models, the model name starts with 'tunedModels/',
for example:
'tunedModels/1234567890123456789'
Expand All @@ -8519,7 +8519,7 @@ async def generate_content_stream(
)

async for chunk in await client.aio.models.generate_content_stream(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents='''What is a good name for a flower shop that specializes in
selling bouquets of dried flowers?'''
):
Expand All @@ -8530,7 +8530,7 @@ async def generate_content_stream(
# * Timeless Petals

async for chunk in await client.aio.models.generate_content_stream(
model='gemini-2.0-flash',
model='gemini-flash-latest',
contents=[
types.Part.from_text('What is shown in this image?'),
types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
Expand Down Expand Up @@ -8837,7 +8837,7 @@ async def list(
config={'page_size': 5, 'query_base': True}
)
print(response.page)
# [Model(name='publishers/google/models/gemini-2.0-flash-exp' ...
# [Model(name='publishers/google/models/gemini-flash-latest' ...
"""

config = (
Expand Down
12 changes: 6 additions & 6 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16278,7 +16278,7 @@ class _CreateTuningJobParametersPrivate(_common.BaseModel):

base_model: Optional[str] = Field(
default=None,
description="""The base model that is being tuned, e.g., "gemini-2.5-flash".""",
description="""The base model that is being tuned, e.g., "gemini-flash-latest".""",
)
pre_tuned_model: Optional[PreTunedModel] = Field(
default=None, description="""The PreTunedModel that is being tuned."""
Expand All @@ -16296,7 +16296,7 @@ class _CreateTuningJobParametersPrivateDict(TypedDict, total=False):
"""Fine-tuning job creation parameters - optional fields."""

base_model: Optional[str]
"""The base model that is being tuned, e.g., "gemini-2.5-flash"."""
"""The base model that is being tuned, e.g., "gemini-flash-latest"."""

pre_tuned_model: Optional[PreTunedModelDict]
"""The PreTunedModel that is being tuned."""
Expand Down Expand Up @@ -16638,7 +16638,7 @@ class _CreateCachedContentParameters(_common.BaseModel):

model: Optional[str] = Field(
default=None,
description="""ID of the model to use. Example: gemini-2.0-flash""",
description="""ID of the model to use. Example: gemini-flash-latest""",
)
config: Optional[CreateCachedContentConfig] = Field(
default=None,
Expand All @@ -16651,7 +16651,7 @@ class _CreateCachedContentParametersDict(TypedDict, total=False):
"""Parameters for caches.create method."""

model: Optional[str]
"""ID of the model to use. Example: gemini-2.0-flash"""
"""ID of the model to use. Example: gemini-flash-latest"""

config: Optional[CreateCachedContentConfigDict]
"""Configuration that contains optional parameters.
Expand Down Expand Up @@ -22709,7 +22709,7 @@ class CreateTuningJobParameters(_common.BaseModel):

base_model: Optional[str] = Field(
default=None,
description="""The base model that is being tuned, e.g., "gemini-2.5-flash".""",
description="""The base model that is being tuned, e.g., "gemini-flash-latest".""",
)
training_dataset: Optional[TuningDataset] = Field(
default=None,
Expand All @@ -22724,7 +22724,7 @@ class CreateTuningJobParametersDict(TypedDict, total=False):
"""Fine-tuning job creation parameters - optional fields."""

base_model: Optional[str]
"""The base model that is being tuned, e.g., "gemini-2.5-flash"."""
"""The base model that is being tuned, e.g., "gemini-flash-latest"."""

training_dataset: Optional[TuningDatasetDict]
"""Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
Expand Down
Loading