google-genai 0.6.0__py3-none-any.whl → 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/genai/_api_client.py +74 -82
- google/genai/_api_module.py +24 -0
- google/genai/_automatic_function_calling_util.py +43 -22
- google/genai/_common.py +11 -8
- google/genai/_extra_utils.py +22 -16
- google/genai/_operations.py +365 -0
- google/genai/_replay_api_client.py +7 -2
- google/genai/_test_api_client.py +1 -1
- google/genai/_transformers.py +218 -97
- google/genai/batches.py +194 -155
- google/genai/caches.py +117 -134
- google/genai/chats.py +22 -18
- google/genai/client.py +31 -37
- google/genai/files.py +154 -183
- google/genai/live.py +11 -5
- google/genai/models.py +506 -254
- google/genai/tunings.py +85 -422
- google/genai/types.py +647 -458
- google/genai/version.py +1 -1
- {google_genai-0.6.0.dist-info → google_genai-0.8.0.dist-info}/METADATA +119 -70
- google_genai-0.8.0.dist-info/RECORD +27 -0
- google_genai-0.6.0.dist-info/RECORD +0 -25
- {google_genai-0.6.0.dist-info → google_genai-0.8.0.dist-info}/LICENSE +0 -0
- {google_genai-0.6.0.dist-info → google_genai-0.8.0.dist-info}/WHEEL +0 -0
- {google_genai-0.6.0.dist-info → google_genai-0.8.0.dist-info}/top_level.txt +0 -0
google/genai/types.py
CHANGED
@@ -16,15 +16,32 @@
|
|
16
16
|
# Code generated by the Google Gen AI SDK generator DO NOT EDIT.
|
17
17
|
|
18
18
|
import datetime
|
19
|
+
from enum import Enum, EnumMeta
|
19
20
|
import inspect
|
20
21
|
import json
|
21
22
|
import logging
|
22
|
-
|
23
|
-
import
|
23
|
+
import typing
|
24
|
+
from typing import Any, Callable, GenericAlias, Literal, Optional, Type, TypedDict, Union
|
24
25
|
import pydantic
|
25
26
|
from pydantic import Field
|
26
27
|
from . import _common
|
27
28
|
|
29
|
+
_is_pillow_image_imported = False
|
30
|
+
if typing.TYPE_CHECKING:
|
31
|
+
import PIL.Image
|
32
|
+
|
33
|
+
PIL_Image = PIL.Image.Image
|
34
|
+
_is_pillow_image_imported = True
|
35
|
+
else:
|
36
|
+
PIL_Image: Type = Any
|
37
|
+
try:
|
38
|
+
import PIL.Image
|
39
|
+
|
40
|
+
PIL_Image = PIL.Image.Image
|
41
|
+
_is_pillow_image_imported = True
|
42
|
+
except ImportError:
|
43
|
+
PIL_Image = None
|
44
|
+
|
28
45
|
|
29
46
|
class Outcome(_common.CaseInSensitiveEnum):
|
30
47
|
"""Required. Outcome of the code execution."""
|
@@ -164,7 +181,7 @@ class DeploymentResourcesType(_common.CaseInSensitiveEnum):
|
|
164
181
|
|
165
182
|
|
166
183
|
class JobState(_common.CaseInSensitiveEnum):
|
167
|
-
"""
|
184
|
+
"""Job state."""
|
168
185
|
|
169
186
|
JOB_STATE_UNSPECIFIED = 'JOB_STATE_UNSPECIFIED'
|
170
187
|
JOB_STATE_QUEUED = 'JOB_STATE_QUEUED'
|
@@ -192,14 +209,14 @@ class AdapterSize(_common.CaseInSensitiveEnum):
|
|
192
209
|
|
193
210
|
|
194
211
|
class DynamicRetrievalConfigMode(_common.CaseInSensitiveEnum):
|
195
|
-
"""Config
|
212
|
+
"""Config for the dynamic retrieval config mode."""
|
196
213
|
|
197
214
|
MODE_UNSPECIFIED = 'MODE_UNSPECIFIED'
|
198
215
|
MODE_DYNAMIC = 'MODE_DYNAMIC'
|
199
216
|
|
200
217
|
|
201
218
|
class FunctionCallingConfigMode(_common.CaseInSensitiveEnum):
|
202
|
-
"""Config
|
219
|
+
"""Config for the function calling config mode."""
|
203
220
|
|
204
221
|
MODE_UNSPECIFIED = 'MODE_UNSPECIFIED'
|
205
222
|
AUTO = 'AUTO'
|
@@ -302,7 +319,7 @@ class FileSource(_common.CaseInSensitiveEnum):
|
|
302
319
|
|
303
320
|
|
304
321
|
class Modality(_common.CaseInSensitiveEnum):
|
305
|
-
"""
|
322
|
+
"""Server content modalities."""
|
306
323
|
|
307
324
|
MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED'
|
308
325
|
TEXT = 'TEXT'
|
@@ -494,10 +511,7 @@ FunctionResponseOrDict = Union[FunctionResponse, FunctionResponseDict]
|
|
494
511
|
|
495
512
|
|
496
513
|
class Blob(_common.BaseModel):
|
497
|
-
"""Content blob.
|
498
|
-
|
499
|
-
It's preferred to send as text directly rather than raw bytes.
|
500
|
-
"""
|
514
|
+
"""Content blob."""
|
501
515
|
|
502
516
|
data: Optional[bytes] = Field(
|
503
517
|
default=None, description="""Required. Raw bytes."""
|
@@ -509,10 +523,7 @@ class Blob(_common.BaseModel):
|
|
509
523
|
|
510
524
|
|
511
525
|
class BlobDict(TypedDict, total=False):
|
512
|
-
"""Content blob.
|
513
|
-
|
514
|
-
It's preferred to send as text directly rather than raw bytes.
|
515
|
-
"""
|
526
|
+
"""Content blob."""
|
516
527
|
|
517
528
|
data: Optional[bytes]
|
518
529
|
"""Required. Raw bytes."""
|
@@ -566,16 +577,16 @@ class Part(_common.BaseModel):
|
|
566
577
|
)
|
567
578
|
|
568
579
|
@classmethod
|
569
|
-
def from_uri(cls, file_uri: str, mime_type: str) -> 'Part':
|
580
|
+
def from_uri(cls, *, file_uri: str, mime_type: str) -> 'Part':
|
570
581
|
file_data = FileData(file_uri=file_uri, mime_type=mime_type)
|
571
582
|
return cls(file_data=file_data)
|
572
583
|
|
573
584
|
@classmethod
|
574
|
-
def from_text(cls, text: str) -> 'Part':
|
585
|
+
def from_text(cls, *, text: str) -> 'Part':
|
575
586
|
return cls(text=text)
|
576
587
|
|
577
588
|
@classmethod
|
578
|
-
def from_bytes(cls, data: bytes, mime_type: str) -> 'Part':
|
589
|
+
def from_bytes(cls, *, data: bytes, mime_type: str) -> 'Part':
|
579
590
|
inline_data = Blob(
|
580
591
|
data=data,
|
581
592
|
mime_type=mime_type,
|
@@ -583,31 +594,33 @@ class Part(_common.BaseModel):
|
|
583
594
|
return cls(inline_data=inline_data)
|
584
595
|
|
585
596
|
@classmethod
|
586
|
-
def from_function_call(cls, name: str, args: dict[str, Any]) -> 'Part':
|
597
|
+
def from_function_call(cls, *, name: str, args: dict[str, Any]) -> 'Part':
|
587
598
|
function_call = FunctionCall(name=name, args=args)
|
588
599
|
return cls(function_call=function_call)
|
589
600
|
|
590
601
|
@classmethod
|
591
602
|
def from_function_response(
|
592
|
-
cls, name: str, response: dict[str, Any]
|
603
|
+
cls, *, name: str, response: dict[str, Any]
|
593
604
|
) -> 'Part':
|
594
605
|
function_response = FunctionResponse(name=name, response=response)
|
595
606
|
return cls(function_response=function_response)
|
596
607
|
|
597
608
|
@classmethod
|
598
|
-
def from_video_metadata(cls,
|
609
|
+
def from_video_metadata(cls, *, start_offset: str, end_offset: str) -> 'Part':
|
599
610
|
video_metadata = VideoMetadata(
|
600
611
|
end_offset=end_offset, start_offset=start_offset
|
601
612
|
)
|
602
613
|
return cls(video_metadata=video_metadata)
|
603
614
|
|
604
615
|
@classmethod
|
605
|
-
def from_executable_code(cls, code: str, language: Language) -> 'Part':
|
616
|
+
def from_executable_code(cls, *, code: str, language: Language) -> 'Part':
|
606
617
|
executable_code = ExecutableCode(code=code, language=language)
|
607
618
|
return cls(executable_code=executable_code)
|
608
619
|
|
609
620
|
@classmethod
|
610
|
-
def from_code_execution_result(
|
621
|
+
def from_code_execution_result(
|
622
|
+
cls, *, outcome: Outcome, output: str
|
623
|
+
) -> 'Part':
|
611
624
|
code_execution_result = CodeExecutionResult(outcome=outcome, output=output)
|
612
625
|
return cls(code_execution_result=code_execution_result)
|
613
626
|
|
@@ -683,6 +696,51 @@ class ContentDict(TypedDict, total=False):
|
|
683
696
|
ContentOrDict = Union[Content, ContentDict]
|
684
697
|
|
685
698
|
|
699
|
+
class HttpOptions(_common.BaseModel):
|
700
|
+
"""HTTP options to be used in each of the requests."""
|
701
|
+
|
702
|
+
base_url: Optional[str] = Field(
|
703
|
+
default=None,
|
704
|
+
description="""The base URL for the AI platform service endpoint.""",
|
705
|
+
)
|
706
|
+
api_version: Optional[str] = Field(
|
707
|
+
default=None, description="""Specifies the version of the API to use."""
|
708
|
+
)
|
709
|
+
headers: Optional[dict[str, str]] = Field(
|
710
|
+
default=None,
|
711
|
+
description="""Additional HTTP headers to be sent with the request.""",
|
712
|
+
)
|
713
|
+
timeout: Optional[int] = Field(
|
714
|
+
default=None, description="""Timeout for the request in milliseconds."""
|
715
|
+
)
|
716
|
+
deprecated_response_payload: Optional[dict[str, any]] = Field(
|
717
|
+
default=None,
|
718
|
+
description="""This field is deprecated. If set, the response payload will be returned int the supplied dict.""",
|
719
|
+
)
|
720
|
+
|
721
|
+
|
722
|
+
class HttpOptionsDict(TypedDict, total=False):
|
723
|
+
"""HTTP options to be used in each of the requests."""
|
724
|
+
|
725
|
+
base_url: Optional[str]
|
726
|
+
"""The base URL for the AI platform service endpoint."""
|
727
|
+
|
728
|
+
api_version: Optional[str]
|
729
|
+
"""Specifies the version of the API to use."""
|
730
|
+
|
731
|
+
headers: Optional[dict[str, str]]
|
732
|
+
"""Additional HTTP headers to be sent with the request."""
|
733
|
+
|
734
|
+
timeout: Optional[int]
|
735
|
+
"""Timeout for the request in milliseconds."""
|
736
|
+
|
737
|
+
deprecated_response_payload: Optional[dict[str, any]]
|
738
|
+
"""This field is deprecated. If set, the response payload will be returned int the supplied dict."""
|
739
|
+
|
740
|
+
|
741
|
+
HttpOptionsOrDict = Union[HttpOptions, HttpOptionsDict]
|
742
|
+
|
743
|
+
|
686
744
|
class Schema(_common.BaseModel):
|
687
745
|
"""Schema that defines the format of input and output data.
|
688
746
|
|
@@ -910,88 +968,61 @@ class FunctionDeclaration(_common.BaseModel):
|
|
910
968
|
)
|
911
969
|
|
912
970
|
@classmethod
|
913
|
-
def
|
914
|
-
"""Returns the function variant based on the provided client object."""
|
915
|
-
if client.vertexai:
|
916
|
-
return 'VERTEX_AI'
|
917
|
-
else:
|
918
|
-
return 'GOOGLE_AI'
|
919
|
-
|
920
|
-
@classmethod
|
921
|
-
def from_function_with_options(
|
971
|
+
def from_callable(
|
922
972
|
cls,
|
923
|
-
|
924
|
-
|
973
|
+
*,
|
974
|
+
client,
|
975
|
+
callable: Callable,
|
925
976
|
) -> 'FunctionDeclaration':
|
926
|
-
"""Converts a
|
927
|
-
|
928
|
-
Supported endpoints are: 'GOOGLE_AI', 'VERTEX_AI', or 'DEFAULT'.
|
929
|
-
"""
|
977
|
+
"""Converts a Callable to a FunctionDeclaration based on the client."""
|
930
978
|
from . import _automatic_function_calling_util
|
931
979
|
|
932
|
-
supported_variants = ['GOOGLE_AI', 'VERTEX_AI', 'DEFAULT']
|
933
|
-
if variant not in supported_variants:
|
934
|
-
raise ValueError(
|
935
|
-
f'Unsupported variant: {variant}. Supported variants are:'
|
936
|
-
f' {", ".join(supported_variants)}'
|
937
|
-
)
|
938
|
-
|
939
|
-
# TODO: b/382524014 - Add support for DEFAULT API endpoint.
|
940
|
-
|
941
980
|
parameters_properties = {}
|
942
|
-
for name, param in inspect.signature(
|
981
|
+
for name, param in inspect.signature(callable).parameters.items():
|
943
982
|
if param.kind in (
|
944
983
|
inspect.Parameter.POSITIONAL_OR_KEYWORD,
|
945
984
|
inspect.Parameter.KEYWORD_ONLY,
|
946
985
|
inspect.Parameter.POSITIONAL_ONLY,
|
947
986
|
):
|
948
987
|
schema = _automatic_function_calling_util._parse_schema_from_parameter(
|
949
|
-
|
988
|
+
client, param, callable.__name__
|
950
989
|
)
|
951
990
|
parameters_properties[name] = schema
|
952
991
|
declaration = FunctionDeclaration(
|
953
|
-
name=
|
954
|
-
description=
|
992
|
+
name=callable.__name__,
|
993
|
+
description=callable.__doc__,
|
955
994
|
)
|
956
995
|
if parameters_properties:
|
957
996
|
declaration.parameters = Schema(
|
958
997
|
type='OBJECT',
|
959
998
|
properties=parameters_properties,
|
960
999
|
)
|
961
|
-
if
|
1000
|
+
if client.vertexai:
|
962
1001
|
declaration.parameters.required = (
|
963
1002
|
_automatic_function_calling_util._get_required_fields(
|
964
1003
|
declaration.parameters
|
965
1004
|
)
|
966
1005
|
)
|
967
|
-
if not
|
1006
|
+
if not client.vertexai:
|
968
1007
|
return declaration
|
969
1008
|
|
970
|
-
return_annotation = inspect.signature(
|
1009
|
+
return_annotation = inspect.signature(callable).return_annotation
|
971
1010
|
if return_annotation is inspect._empty:
|
972
1011
|
return declaration
|
973
1012
|
|
974
1013
|
declaration.response = (
|
975
1014
|
_automatic_function_calling_util._parse_schema_from_parameter(
|
976
|
-
|
1015
|
+
client,
|
977
1016
|
inspect.Parameter(
|
978
1017
|
'return_value',
|
979
1018
|
inspect.Parameter.POSITIONAL_OR_KEYWORD,
|
980
1019
|
annotation=return_annotation,
|
981
1020
|
),
|
982
|
-
|
1021
|
+
callable.__name__,
|
983
1022
|
)
|
984
1023
|
)
|
985
1024
|
return declaration
|
986
1025
|
|
987
|
-
@classmethod
|
988
|
-
def from_callable(cls, client, func: Callable) -> 'FunctionDeclaration':
|
989
|
-
"""Converts a function to a FunctionDeclaration."""
|
990
|
-
return cls.from_function_with_options(
|
991
|
-
variant=cls._get_variant(client),
|
992
|
-
func=func,
|
993
|
-
)
|
994
|
-
|
995
1026
|
|
996
1027
|
class FunctionDeclarationDict(TypedDict, total=False):
|
997
1028
|
"""Defines a function that the model can generate JSON inputs for.
|
@@ -1610,8 +1641,10 @@ class FileDict(TypedDict, total=False):
|
|
1610
1641
|
|
1611
1642
|
FileOrDict = Union[File, FileDict]
|
1612
1643
|
|
1613
|
-
|
1614
|
-
PartUnion = Union[File, Part,
|
1644
|
+
if _is_pillow_image_imported:
|
1645
|
+
PartUnion = Union[File, Part, PIL_Image, str]
|
1646
|
+
else:
|
1647
|
+
PartUnion = Union[File, Part, str]
|
1615
1648
|
|
1616
1649
|
|
1617
1650
|
PartUnionDict = Union[PartUnion, PartDict]
|
@@ -1709,12 +1742,15 @@ SpeechConfigUnionDict = Union[SpeechConfigUnion, SpeechConfigDict]
|
|
1709
1742
|
|
1710
1743
|
|
1711
1744
|
class GenerateContentConfig(_common.BaseModel):
|
1712
|
-
"""
|
1745
|
+
"""Optional model configuration parameters.
|
1713
1746
|
|
1714
1747
|
For more information, see `Content generation parameters
|
1715
1748
|
<https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
|
1716
1749
|
"""
|
1717
1750
|
|
1751
|
+
http_options: Optional[HttpOptions] = Field(
|
1752
|
+
default=None, description="""Used to override HTTP request options."""
|
1753
|
+
)
|
1718
1754
|
system_instruction: Optional[ContentUnion] = Field(
|
1719
1755
|
default=None,
|
1720
1756
|
description="""Instructions for the model to steer it toward better performance.
|
@@ -1868,12 +1904,15 @@ class GenerateContentConfig(_common.BaseModel):
|
|
1868
1904
|
|
1869
1905
|
|
1870
1906
|
class GenerateContentConfigDict(TypedDict, total=False):
|
1871
|
-
"""
|
1907
|
+
"""Optional model configuration parameters.
|
1872
1908
|
|
1873
1909
|
For more information, see `Content generation parameters
|
1874
1910
|
<https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
|
1875
1911
|
"""
|
1876
1912
|
|
1913
|
+
http_options: Optional[HttpOptionsDict]
|
1914
|
+
"""Used to override HTTP request options."""
|
1915
|
+
|
1877
1916
|
system_instruction: Optional[ContentUnionDict]
|
1878
1917
|
"""Instructions for the model to steer it toward better performance.
|
1879
1918
|
For example, "Answer as concisely as possible" or "Don't use technical
|
@@ -2012,7 +2051,7 @@ ContentListUnionDict = Union[list[ContentUnionDict], ContentUnionDict]
|
|
2012
2051
|
|
2013
2052
|
|
2014
2053
|
class _GenerateContentParameters(_common.BaseModel):
|
2015
|
-
"""
|
2054
|
+
"""Config for models.generate_content parameters."""
|
2016
2055
|
|
2017
2056
|
model: Optional[str] = Field(
|
2018
2057
|
default=None,
|
@@ -2032,7 +2071,7 @@ class _GenerateContentParameters(_common.BaseModel):
|
|
2032
2071
|
|
2033
2072
|
|
2034
2073
|
class _GenerateContentParametersDict(TypedDict, total=False):
|
2035
|
-
"""
|
2074
|
+
"""Config for models.generate_content parameters."""
|
2036
2075
|
|
2037
2076
|
model: Optional[str]
|
2038
2077
|
"""ID of the model to use. For a list of models, see `Google models
|
@@ -2154,7 +2193,7 @@ CitationOrDict = Union[Citation, CitationDict]
|
|
2154
2193
|
|
2155
2194
|
|
2156
2195
|
class CitationMetadata(_common.BaseModel):
|
2157
|
-
"""
|
2196
|
+
"""Citation information when the model quotes another source."""
|
2158
2197
|
|
2159
2198
|
citations: Optional[list[Citation]] = Field(
|
2160
2199
|
default=None,
|
@@ -2166,7 +2205,7 @@ class CitationMetadata(_common.BaseModel):
|
|
2166
2205
|
|
2167
2206
|
|
2168
2207
|
class CitationMetadataDict(TypedDict, total=False):
|
2169
|
-
"""
|
2208
|
+
"""Citation information when the model quotes another source."""
|
2170
2209
|
|
2171
2210
|
citations: Optional[list[CitationDict]]
|
2172
2211
|
"""Contains citation information when the model directly quotes, at
|
@@ -2559,7 +2598,7 @@ SafetyRatingOrDict = Union[SafetyRating, SafetyRatingDict]
|
|
2559
2598
|
|
2560
2599
|
|
2561
2600
|
class Candidate(_common.BaseModel):
|
2562
|
-
"""
|
2601
|
+
"""A response candidate generated from the model."""
|
2563
2602
|
|
2564
2603
|
content: Optional[Content] = Field(
|
2565
2604
|
default=None,
|
@@ -2607,7 +2646,7 @@ class Candidate(_common.BaseModel):
|
|
2607
2646
|
|
2608
2647
|
|
2609
2648
|
class CandidateDict(TypedDict, total=False):
|
2610
|
-
"""
|
2649
|
+
"""A response candidate generated from the model."""
|
2611
2650
|
|
2612
2651
|
content: Optional[ContentDict]
|
2613
2652
|
"""Contains the multi-part content of the response.
|
@@ -2743,7 +2782,7 @@ class GenerateContentResponse(_common.BaseModel):
|
|
2743
2782
|
default=None, description="""Usage metadata about the response(s)."""
|
2744
2783
|
)
|
2745
2784
|
automatic_function_calling_history: Optional[list[Content]] = None
|
2746
|
-
parsed: Union[pydantic.BaseModel, dict] = Field(
|
2785
|
+
parsed: Union[pydantic.BaseModel, dict, Enum] = Field(
|
2747
2786
|
default=None,
|
2748
2787
|
description="""Parsed response if response_schema is provided. Not available for streaming.""",
|
2749
2788
|
)
|
@@ -2806,7 +2845,7 @@ class GenerateContentResponse(_common.BaseModel):
|
|
2806
2845
|
|
2807
2846
|
@classmethod
|
2808
2847
|
def _from_response(
|
2809
|
-
cls, response: dict[str, object], kwargs: dict[str, object]
|
2848
|
+
cls, *, response: dict[str, object], kwargs: dict[str, object]
|
2810
2849
|
):
|
2811
2850
|
result = super()._from_response(response, kwargs)
|
2812
2851
|
|
@@ -2814,8 +2853,12 @@ class GenerateContentResponse(_common.BaseModel):
|
|
2814
2853
|
response_schema = _common.get_value_by_path(
|
2815
2854
|
kwargs, ['config', 'response_schema']
|
2816
2855
|
)
|
2817
|
-
if
|
2818
|
-
response_schema
|
2856
|
+
if (
|
2857
|
+
inspect.isclass(response_schema)
|
2858
|
+
and not (
|
2859
|
+
isinstance(response_schema, GenericAlias)
|
2860
|
+
) # Needed for Python 3.9 and 3.10
|
2861
|
+
and issubclass(response_schema, pydantic.BaseModel)
|
2819
2862
|
):
|
2820
2863
|
# Pydantic schema.
|
2821
2864
|
try:
|
@@ -2823,27 +2866,36 @@ class GenerateContentResponse(_common.BaseModel):
|
|
2823
2866
|
# may not be a valid json per stream response
|
2824
2867
|
except pydantic.ValidationError:
|
2825
2868
|
pass
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
2869
|
+
except json.decoder.JSONDecodeError:
|
2870
|
+
pass
|
2871
|
+
elif isinstance(response_schema, EnumMeta):
|
2872
|
+
# Enum with "application/json" returns response in double quotes.
|
2873
|
+
enum_value = result.text.replace('"', '')
|
2874
|
+
try:
|
2875
|
+
result.parsed = response_schema(enum_value)
|
2876
|
+
except ValueError:
|
2877
|
+
pass
|
2878
|
+
elif isinstance(response_schema, GenericAlias) or isinstance(
|
2879
|
+
response_schema, type
|
2829
2880
|
):
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
pass
|
2881
|
+
|
2882
|
+
class Placeholder(pydantic.BaseModel):
|
2883
|
+
placeholder: response_schema
|
2884
|
+
|
2885
|
+
try:
|
2886
|
+
parsed = {'placeholder': json.loads(result.text)}
|
2887
|
+
placeholder = Placeholder.model_validate(parsed)
|
2888
|
+
result.parsed = placeholder.placeholder
|
2889
|
+
except json.decoder.JSONDecodeError:
|
2890
|
+
pass
|
2891
|
+
except pydantic.ValidationError:
|
2892
|
+
pass
|
2843
2893
|
|
2844
2894
|
elif isinstance(response_schema, dict) or isinstance(
|
2845
|
-
response_schema,
|
2895
|
+
response_schema, Schema
|
2846
2896
|
):
|
2897
|
+
# With just the Schema, we don't know what pydantic model the user would
|
2898
|
+
# want the result converted to. So just return json.
|
2847
2899
|
# JSON schema.
|
2848
2900
|
try:
|
2849
2901
|
result.parsed = json.loads(result.text)
|
@@ -2877,9 +2929,9 @@ GenerateContentResponseOrDict = Union[
|
|
2877
2929
|
|
2878
2930
|
|
2879
2931
|
class EmbedContentConfig(_common.BaseModel):
|
2880
|
-
"""
|
2932
|
+
"""Optional parameters for the embed_content method."""
|
2881
2933
|
|
2882
|
-
http_options: Optional[
|
2934
|
+
http_options: Optional[HttpOptions] = Field(
|
2883
2935
|
default=None, description="""Used to override HTTP request options."""
|
2884
2936
|
)
|
2885
2937
|
task_type: Optional[str] = Field(
|
@@ -2916,9 +2968,9 @@ class EmbedContentConfig(_common.BaseModel):
|
|
2916
2968
|
|
2917
2969
|
|
2918
2970
|
class EmbedContentConfigDict(TypedDict, total=False):
|
2919
|
-
"""
|
2971
|
+
"""Optional parameters for the embed_content method."""
|
2920
2972
|
|
2921
|
-
http_options: Optional[
|
2973
|
+
http_options: Optional[HttpOptionsDict]
|
2922
2974
|
"""Used to override HTTP request options."""
|
2923
2975
|
|
2924
2976
|
task_type: Optional[str]
|
@@ -3117,10 +3169,10 @@ EmbedContentResponseOrDict = Union[
|
|
3117
3169
|
]
|
3118
3170
|
|
3119
3171
|
|
3120
|
-
class
|
3121
|
-
"""
|
3172
|
+
class GenerateImagesConfig(_common.BaseModel):
|
3173
|
+
"""The config for generating an images."""
|
3122
3174
|
|
3123
|
-
http_options: Optional[
|
3175
|
+
http_options: Optional[HttpOptions] = Field(
|
3124
3176
|
default=None, description="""Used to override HTTP request options."""
|
3125
3177
|
)
|
3126
3178
|
output_gcs_uri: Optional[str] = Field(
|
@@ -3190,20 +3242,25 @@ class GenerateImageConfig(_common.BaseModel):
|
|
3190
3242
|
)
|
3191
3243
|
add_watermark: Optional[bool] = Field(
|
3192
3244
|
default=None,
|
3193
|
-
description="""Whether to add a watermark to the generated
|
3245
|
+
description="""Whether to add a watermark to the generated images.
|
3194
3246
|
""",
|
3195
3247
|
)
|
3196
3248
|
aspect_ratio: Optional[str] = Field(
|
3197
3249
|
default=None,
|
3198
|
-
description="""Aspect ratio of the generated
|
3250
|
+
description="""Aspect ratio of the generated images.
|
3251
|
+
""",
|
3252
|
+
)
|
3253
|
+
enhance_prompt: Optional[bool] = Field(
|
3254
|
+
default=None,
|
3255
|
+
description="""Whether to use the prompt rewriting logic.
|
3199
3256
|
""",
|
3200
3257
|
)
|
3201
3258
|
|
3202
3259
|
|
3203
|
-
class
|
3204
|
-
"""
|
3260
|
+
class GenerateImagesConfigDict(TypedDict, total=False):
|
3261
|
+
"""The config for generating an images."""
|
3205
3262
|
|
3206
|
-
http_options: Optional[
|
3263
|
+
http_options: Optional[HttpOptionsDict]
|
3207
3264
|
"""Used to override HTTP request options."""
|
3208
3265
|
|
3209
3266
|
output_gcs_uri: Optional[str]
|
@@ -3260,19 +3317,25 @@ class GenerateImageConfigDict(TypedDict, total=False):
|
|
3260
3317
|
"""
|
3261
3318
|
|
3262
3319
|
add_watermark: Optional[bool]
|
3263
|
-
"""Whether to add a watermark to the generated
|
3320
|
+
"""Whether to add a watermark to the generated images.
|
3264
3321
|
"""
|
3265
3322
|
|
3266
3323
|
aspect_ratio: Optional[str]
|
3267
|
-
"""Aspect ratio of the generated
|
3324
|
+
"""Aspect ratio of the generated images.
|
3325
|
+
"""
|
3326
|
+
|
3327
|
+
enhance_prompt: Optional[bool]
|
3328
|
+
"""Whether to use the prompt rewriting logic.
|
3268
3329
|
"""
|
3269
3330
|
|
3270
3331
|
|
3271
|
-
|
3332
|
+
GenerateImagesConfigOrDict = Union[
|
3333
|
+
GenerateImagesConfig, GenerateImagesConfigDict
|
3334
|
+
]
|
3272
3335
|
|
3273
3336
|
|
3274
|
-
class
|
3275
|
-
"""
|
3337
|
+
class _GenerateImagesParameters(_common.BaseModel):
|
3338
|
+
"""The parameters for generating images."""
|
3276
3339
|
|
3277
3340
|
model: Optional[str] = Field(
|
3278
3341
|
default=None,
|
@@ -3281,39 +3344,39 @@ class _GenerateImageParameters(_common.BaseModel):
|
|
3281
3344
|
)
|
3282
3345
|
prompt: Optional[str] = Field(
|
3283
3346
|
default=None,
|
3284
|
-
description="""Text prompt that typically describes the
|
3347
|
+
description="""Text prompt that typically describes the images to output.
|
3285
3348
|
""",
|
3286
3349
|
)
|
3287
|
-
config: Optional[
|
3350
|
+
config: Optional[GenerateImagesConfig] = Field(
|
3288
3351
|
default=None,
|
3289
|
-
description="""Configuration for generating
|
3352
|
+
description="""Configuration for generating images.
|
3290
3353
|
""",
|
3291
3354
|
)
|
3292
3355
|
|
3293
3356
|
|
3294
|
-
class
|
3295
|
-
"""
|
3357
|
+
class _GenerateImagesParametersDict(TypedDict, total=False):
|
3358
|
+
"""The parameters for generating images."""
|
3296
3359
|
|
3297
3360
|
model: Optional[str]
|
3298
3361
|
"""ID of the model to use. For a list of models, see `Google models
|
3299
3362
|
<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_."""
|
3300
3363
|
|
3301
3364
|
prompt: Optional[str]
|
3302
|
-
"""Text prompt that typically describes the
|
3365
|
+
"""Text prompt that typically describes the images to output.
|
3303
3366
|
"""
|
3304
3367
|
|
3305
|
-
config: Optional[
|
3306
|
-
"""Configuration for generating
|
3368
|
+
config: Optional[GenerateImagesConfigDict]
|
3369
|
+
"""Configuration for generating images.
|
3307
3370
|
"""
|
3308
3371
|
|
3309
3372
|
|
3310
|
-
|
3311
|
-
|
3373
|
+
_GenerateImagesParametersOrDict = Union[
|
3374
|
+
_GenerateImagesParameters, _GenerateImagesParametersDict
|
3312
3375
|
]
|
3313
3376
|
|
3314
3377
|
|
3315
3378
|
class Image(_common.BaseModel):
|
3316
|
-
"""
|
3379
|
+
"""An image."""
|
3317
3380
|
|
3318
3381
|
gcs_uri: Optional[str] = Field(
|
3319
3382
|
default=None,
|
@@ -3327,13 +3390,16 @@ class Image(_common.BaseModel):
|
|
3327
3390
|
or the ``gcs_uri`` field but not both.
|
3328
3391
|
""",
|
3329
3392
|
)
|
3393
|
+
mime_type: Optional[str] = Field(
|
3394
|
+
default=None, description="""The MIME type of the image."""
|
3395
|
+
)
|
3330
3396
|
|
3331
3397
|
_loaded_image = None
|
3332
3398
|
|
3333
3399
|
"""Image."""
|
3334
3400
|
|
3335
|
-
@
|
3336
|
-
def from_file(location: str) -> 'Image':
|
3401
|
+
@classmethod
|
3402
|
+
def from_file(cls, *, location: str) -> 'Image':
|
3337
3403
|
"""Lazy-loads an image from a local file or Google Cloud Storage.
|
3338
3404
|
|
3339
3405
|
Args:
|
@@ -3359,11 +3425,11 @@ class Image(_common.BaseModel):
|
|
3359
3425
|
location = urllib.parse.urlunparse(parsed_url)
|
3360
3426
|
|
3361
3427
|
if parsed_url.scheme == 'gs':
|
3362
|
-
return
|
3428
|
+
return cls(gcs_uri=location)
|
3363
3429
|
|
3364
3430
|
# Load image from local path
|
3365
3431
|
image_bytes = pathlib.Path(location).read_bytes()
|
3366
|
-
image =
|
3432
|
+
image = cls(image_bytes=image_bytes)
|
3367
3433
|
return image
|
3368
3434
|
|
3369
3435
|
def show(self):
|
@@ -3376,11 +3442,7 @@ class Image(_common.BaseModel):
|
|
3376
3442
|
except ImportError:
|
3377
3443
|
IPython_display = None
|
3378
3444
|
|
3379
|
-
|
3380
|
-
from PIL import Image as PIL_Image
|
3381
|
-
except ImportError:
|
3382
|
-
PIL_Image = None
|
3383
|
-
if PIL_Image and IPython_display:
|
3445
|
+
if IPython_display:
|
3384
3446
|
IPython_display.display(self._pil_image)
|
3385
3447
|
|
3386
3448
|
@property
|
@@ -3395,7 +3457,7 @@ class Image(_common.BaseModel):
|
|
3395
3457
|
if not PIL_Image:
|
3396
3458
|
raise RuntimeError(
|
3397
3459
|
'The PIL module is not available. Please install the Pillow'
|
3398
|
-
' package.'
|
3460
|
+
' package. `pip install pillow`'
|
3399
3461
|
)
|
3400
3462
|
self._loaded_image = PIL_Image.open(io.BytesIO(self.image_bytes))
|
3401
3463
|
return self._loaded_image
|
@@ -3438,7 +3500,7 @@ JOB_STATES_ENDED = JOB_STATES_ENDED_VERTEX + JOB_STATES_ENDED_MLDEV
|
|
3438
3500
|
|
3439
3501
|
|
3440
3502
|
class ImageDict(TypedDict, total=False):
|
3441
|
-
"""
|
3503
|
+
"""An image."""
|
3442
3504
|
|
3443
3505
|
gcs_uri: Optional[str]
|
3444
3506
|
"""The Cloud Storage URI of the image. ``Image`` can contain a value
|
@@ -3450,12 +3512,15 @@ class ImageDict(TypedDict, total=False):
|
|
3450
3512
|
or the ``gcs_uri`` field but not both.
|
3451
3513
|
"""
|
3452
3514
|
|
3515
|
+
mime_type: Optional[str]
|
3516
|
+
"""The MIME type of the image."""
|
3517
|
+
|
3453
3518
|
|
3454
3519
|
ImageOrDict = Union[Image, ImageDict]
|
3455
3520
|
|
3456
3521
|
|
3457
3522
|
class GeneratedImage(_common.BaseModel):
|
3458
|
-
"""
|
3523
|
+
"""An output image."""
|
3459
3524
|
|
3460
3525
|
image: Optional[Image] = Field(
|
3461
3526
|
default=None,
|
@@ -3468,10 +3533,16 @@ class GeneratedImage(_common.BaseModel):
|
|
3468
3533
|
response.
|
3469
3534
|
""",
|
3470
3535
|
)
|
3536
|
+
enhanced_prompt: Optional[str] = Field(
|
3537
|
+
default=None,
|
3538
|
+
description="""The rewritten prompt used for the image generation if the prompt
|
3539
|
+
enhancer is enabled.
|
3540
|
+
""",
|
3541
|
+
)
|
3471
3542
|
|
3472
3543
|
|
3473
3544
|
class GeneratedImageDict(TypedDict, total=False):
|
3474
|
-
"""
|
3545
|
+
"""An output image."""
|
3475
3546
|
|
3476
3547
|
image: Optional[ImageDict]
|
3477
3548
|
"""The output image data.
|
@@ -3482,12 +3553,17 @@ class GeneratedImageDict(TypedDict, total=False):
|
|
3482
3553
|
response.
|
3483
3554
|
"""
|
3484
3555
|
|
3556
|
+
enhanced_prompt: Optional[str]
|
3557
|
+
"""The rewritten prompt used for the image generation if the prompt
|
3558
|
+
enhancer is enabled.
|
3559
|
+
"""
|
3560
|
+
|
3485
3561
|
|
3486
3562
|
GeneratedImageOrDict = Union[GeneratedImage, GeneratedImageDict]
|
3487
3563
|
|
3488
3564
|
|
3489
|
-
class
|
3490
|
-
"""
|
3565
|
+
class GenerateImagesResponse(_common.BaseModel):
|
3566
|
+
"""The output images response."""
|
3491
3567
|
|
3492
3568
|
generated_images: Optional[list[GeneratedImage]] = Field(
|
3493
3569
|
default=None,
|
@@ -3496,16 +3572,16 @@ class GenerateImageResponse(_common.BaseModel):
|
|
3496
3572
|
)
|
3497
3573
|
|
3498
3574
|
|
3499
|
-
class
|
3500
|
-
"""
|
3575
|
+
class GenerateImagesResponseDict(TypedDict, total=False):
|
3576
|
+
"""The output images response."""
|
3501
3577
|
|
3502
3578
|
generated_images: Optional[list[GeneratedImageDict]]
|
3503
3579
|
"""List of generated images.
|
3504
3580
|
"""
|
3505
3581
|
|
3506
3582
|
|
3507
|
-
|
3508
|
-
|
3583
|
+
GenerateImagesResponseOrDict = Union[
|
3584
|
+
GenerateImagesResponse, GenerateImagesResponseDict
|
3509
3585
|
]
|
3510
3586
|
|
3511
3587
|
|
@@ -3690,7 +3766,7 @@ _ReferenceImageAPIOrDict = Union[_ReferenceImageAPI, _ReferenceImageAPIDict]
|
|
3690
3766
|
class EditImageConfig(_common.BaseModel):
|
3691
3767
|
"""Configuration for editing an image."""
|
3692
3768
|
|
3693
|
-
http_options: Optional[
|
3769
|
+
http_options: Optional[HttpOptions] = Field(
|
3694
3770
|
default=None, description="""Used to override HTTP request options."""
|
3695
3771
|
)
|
3696
3772
|
output_gcs_uri: Optional[str] = Field(
|
@@ -3767,7 +3843,7 @@ class EditImageConfig(_common.BaseModel):
|
|
3767
3843
|
class EditImageConfigDict(TypedDict, total=False):
|
3768
3844
|
"""Configuration for editing an image."""
|
3769
3845
|
|
3770
|
-
http_options: Optional[
|
3846
|
+
http_options: Optional[HttpOptionsDict]
|
3771
3847
|
"""Used to override HTTP request options."""
|
3772
3848
|
|
3773
3849
|
output_gcs_uri: Optional[str]
|
@@ -3894,7 +3970,7 @@ class _UpscaleImageAPIConfig(_common.BaseModel):
|
|
3894
3970
|
to be modifiable or exposed to users in the SDK method.
|
3895
3971
|
"""
|
3896
3972
|
|
3897
|
-
http_options: Optional[
|
3973
|
+
http_options: Optional[HttpOptions] = Field(
|
3898
3974
|
default=None, description="""Used to override HTTP request options."""
|
3899
3975
|
)
|
3900
3976
|
include_rai_reason: Optional[bool] = Field(
|
@@ -3922,7 +3998,7 @@ class _UpscaleImageAPIConfigDict(TypedDict, total=False):
|
|
3922
3998
|
to be modifiable or exposed to users in the SDK method.
|
3923
3999
|
"""
|
3924
4000
|
|
3925
|
-
http_options: Optional[
|
4001
|
+
http_options: Optional[HttpOptionsDict]
|
3926
4002
|
"""Used to override HTTP request options."""
|
3927
4003
|
|
3928
4004
|
include_rai_reason: Optional[bool]
|
@@ -4005,9 +4081,30 @@ UpscaleImageResponseOrDict = Union[
|
|
4005
4081
|
]
|
4006
4082
|
|
4007
4083
|
|
4084
|
+
class GetModelConfig(_common.BaseModel):
|
4085
|
+
"""Optional parameters for models.get method."""
|
4086
|
+
|
4087
|
+
http_options: Optional[HttpOptions] = Field(
|
4088
|
+
default=None, description="""Used to override HTTP request options."""
|
4089
|
+
)
|
4090
|
+
|
4091
|
+
|
4092
|
+
class GetModelConfigDict(TypedDict, total=False):
|
4093
|
+
"""Optional parameters for models.get method."""
|
4094
|
+
|
4095
|
+
http_options: Optional[HttpOptionsDict]
|
4096
|
+
"""Used to override HTTP request options."""
|
4097
|
+
|
4098
|
+
|
4099
|
+
GetModelConfigOrDict = Union[GetModelConfig, GetModelConfigDict]
|
4100
|
+
|
4101
|
+
|
4008
4102
|
class _GetModelParameters(_common.BaseModel):
|
4009
4103
|
|
4010
4104
|
model: Optional[str] = Field(default=None, description="""""")
|
4105
|
+
config: Optional[GetModelConfig] = Field(
|
4106
|
+
default=None, description="""Optional parameters for the request."""
|
4107
|
+
)
|
4011
4108
|
|
4012
4109
|
|
4013
4110
|
class _GetModelParametersDict(TypedDict, total=False):
|
@@ -4015,6 +4112,9 @@ class _GetModelParametersDict(TypedDict, total=False):
|
|
4015
4112
|
model: Optional[str]
|
4016
4113
|
""""""
|
4017
4114
|
|
4115
|
+
config: Optional[GetModelConfigDict]
|
4116
|
+
"""Optional parameters for the request."""
|
4117
|
+
|
4018
4118
|
|
4019
4119
|
_GetModelParametersOrDict = Union[_GetModelParameters, _GetModelParametersDict]
|
4020
4120
|
|
@@ -4166,7 +4266,7 @@ ModelOrDict = Union[Model, ModelDict]
|
|
4166
4266
|
|
4167
4267
|
class ListModelsConfig(_common.BaseModel):
|
4168
4268
|
|
4169
|
-
http_options: Optional[
|
4269
|
+
http_options: Optional[HttpOptions] = Field(
|
4170
4270
|
default=None, description="""Used to override HTTP request options."""
|
4171
4271
|
)
|
4172
4272
|
page_size: Optional[int] = Field(default=None, description="""""")
|
@@ -4180,7 +4280,7 @@ class ListModelsConfig(_common.BaseModel):
|
|
4180
4280
|
|
4181
4281
|
class ListModelsConfigDict(TypedDict, total=False):
|
4182
4282
|
|
4183
|
-
http_options: Optional[
|
4283
|
+
http_options: Optional[HttpOptionsDict]
|
4184
4284
|
"""Used to override HTTP request options."""
|
4185
4285
|
|
4186
4286
|
page_size: Optional[int]
|
@@ -4235,12 +4335,18 @@ ListModelsResponseOrDict = Union[ListModelsResponse, ListModelsResponseDict]
|
|
4235
4335
|
|
4236
4336
|
class UpdateModelConfig(_common.BaseModel):
|
4237
4337
|
|
4338
|
+
http_options: Optional[HttpOptions] = Field(
|
4339
|
+
default=None, description="""Used to override HTTP request options."""
|
4340
|
+
)
|
4238
4341
|
display_name: Optional[str] = Field(default=None, description="""""")
|
4239
4342
|
description: Optional[str] = Field(default=None, description="""""")
|
4240
4343
|
|
4241
4344
|
|
4242
4345
|
class UpdateModelConfigDict(TypedDict, total=False):
|
4243
4346
|
|
4347
|
+
http_options: Optional[HttpOptionsDict]
|
4348
|
+
"""Used to override HTTP request options."""
|
4349
|
+
|
4244
4350
|
display_name: Optional[str]
|
4245
4351
|
""""""
|
4246
4352
|
|
@@ -4271,9 +4377,28 @@ _UpdateModelParametersOrDict = Union[
|
|
4271
4377
|
]
|
4272
4378
|
|
4273
4379
|
|
4380
|
+
class DeleteModelConfig(_common.BaseModel):
|
4381
|
+
|
4382
|
+
http_options: Optional[HttpOptions] = Field(
|
4383
|
+
default=None, description="""Used to override HTTP request options."""
|
4384
|
+
)
|
4385
|
+
|
4386
|
+
|
4387
|
+
class DeleteModelConfigDict(TypedDict, total=False):
|
4388
|
+
|
4389
|
+
http_options: Optional[HttpOptionsDict]
|
4390
|
+
"""Used to override HTTP request options."""
|
4391
|
+
|
4392
|
+
|
4393
|
+
DeleteModelConfigOrDict = Union[DeleteModelConfig, DeleteModelConfigDict]
|
4394
|
+
|
4395
|
+
|
4274
4396
|
class _DeleteModelParameters(_common.BaseModel):
|
4275
4397
|
|
4276
4398
|
model: Optional[str] = Field(default=None, description="""""")
|
4399
|
+
config: Optional[DeleteModelConfig] = Field(
|
4400
|
+
default=None, description="""Optional parameters for the request."""
|
4401
|
+
)
|
4277
4402
|
|
4278
4403
|
|
4279
4404
|
class _DeleteModelParametersDict(TypedDict, total=False):
|
@@ -4281,6 +4406,9 @@ class _DeleteModelParametersDict(TypedDict, total=False):
|
|
4281
4406
|
model: Optional[str]
|
4282
4407
|
""""""
|
4283
4408
|
|
4409
|
+
config: Optional[DeleteModelConfigDict]
|
4410
|
+
"""Optional parameters for the request."""
|
4411
|
+
|
4284
4412
|
|
4285
4413
|
_DeleteModelParametersOrDict = Union[
|
4286
4414
|
_DeleteModelParameters, _DeleteModelParametersDict
|
@@ -4412,7 +4540,7 @@ GenerationConfigOrDict = Union[GenerationConfig, GenerationConfigDict]
|
|
4412
4540
|
class CountTokensConfig(_common.BaseModel):
|
4413
4541
|
"""Config for the count_tokens method."""
|
4414
4542
|
|
4415
|
-
http_options: Optional[
|
4543
|
+
http_options: Optional[HttpOptions] = Field(
|
4416
4544
|
default=None, description="""Used to override HTTP request options."""
|
4417
4545
|
)
|
4418
4546
|
system_instruction: Optional[ContentUnion] = Field(
|
@@ -4437,7 +4565,7 @@ class CountTokensConfig(_common.BaseModel):
|
|
4437
4565
|
class CountTokensConfigDict(TypedDict, total=False):
|
4438
4566
|
"""Config for the count_tokens method."""
|
4439
4567
|
|
4440
|
-
http_options: Optional[
|
4568
|
+
http_options: Optional[HttpOptionsDict]
|
4441
4569
|
"""Used to override HTTP request options."""
|
4442
4570
|
|
4443
4571
|
system_instruction: Optional[ContentUnionDict]
|
@@ -4521,7 +4649,7 @@ CountTokensResponseOrDict = Union[CountTokensResponse, CountTokensResponseDict]
|
|
4521
4649
|
class ComputeTokensConfig(_common.BaseModel):
|
4522
4650
|
"""Optional parameters for computing tokens."""
|
4523
4651
|
|
4524
|
-
http_options: Optional[
|
4652
|
+
http_options: Optional[HttpOptions] = Field(
|
4525
4653
|
default=None, description="""Used to override HTTP request options."""
|
4526
4654
|
)
|
4527
4655
|
|
@@ -4529,7 +4657,7 @@ class ComputeTokensConfig(_common.BaseModel):
|
|
4529
4657
|
class ComputeTokensConfigDict(TypedDict, total=False):
|
4530
4658
|
"""Optional parameters for computing tokens."""
|
4531
4659
|
|
4532
|
-
http_options: Optional[
|
4660
|
+
http_options: Optional[HttpOptionsDict]
|
4533
4661
|
"""Used to override HTTP request options."""
|
4534
4662
|
|
4535
4663
|
|
@@ -4629,7 +4757,7 @@ ComputeTokensResponseOrDict = Union[
|
|
4629
4757
|
class GetTuningJobConfig(_common.BaseModel):
|
4630
4758
|
"""Optional parameters for tunings.get method."""
|
4631
4759
|
|
4632
|
-
http_options: Optional[
|
4760
|
+
http_options: Optional[HttpOptions] = Field(
|
4633
4761
|
default=None, description="""Used to override HTTP request options."""
|
4634
4762
|
)
|
4635
4763
|
|
@@ -4637,7 +4765,7 @@ class GetTuningJobConfig(_common.BaseModel):
|
|
4637
4765
|
class GetTuningJobConfigDict(TypedDict, total=False):
|
4638
4766
|
"""Optional parameters for tunings.get method."""
|
4639
4767
|
|
4640
|
-
http_options: Optional[
|
4768
|
+
http_options: Optional[HttpOptionsDict]
|
4641
4769
|
"""Used to override HTTP request options."""
|
4642
4770
|
|
4643
4771
|
|
@@ -5256,6 +5384,41 @@ class EncryptionSpecDict(TypedDict, total=False):
|
|
5256
5384
|
EncryptionSpecOrDict = Union[EncryptionSpec, EncryptionSpecDict]
|
5257
5385
|
|
5258
5386
|
|
5387
|
+
class PartnerModelTuningSpec(_common.BaseModel):
|
5388
|
+
"""Tuning spec for Partner models."""
|
5389
|
+
|
5390
|
+
hyper_parameters: Optional[dict[str, Any]] = Field(
|
5391
|
+
default=None,
|
5392
|
+
description="""Hyperparameters for tuning. The accepted hyper_parameters and their valid range of values will differ depending on the base model.""",
|
5393
|
+
)
|
5394
|
+
training_dataset_uri: Optional[str] = Field(
|
5395
|
+
default=None,
|
5396
|
+
description="""Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5397
|
+
)
|
5398
|
+
validation_dataset_uri: Optional[str] = Field(
|
5399
|
+
default=None,
|
5400
|
+
description="""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5401
|
+
)
|
5402
|
+
|
5403
|
+
|
5404
|
+
class PartnerModelTuningSpecDict(TypedDict, total=False):
|
5405
|
+
"""Tuning spec for Partner models."""
|
5406
|
+
|
5407
|
+
hyper_parameters: Optional[dict[str, Any]]
|
5408
|
+
"""Hyperparameters for tuning. The accepted hyper_parameters and their valid range of values will differ depending on the base model."""
|
5409
|
+
|
5410
|
+
training_dataset_uri: Optional[str]
|
5411
|
+
"""Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5412
|
+
|
5413
|
+
validation_dataset_uri: Optional[str]
|
5414
|
+
"""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5415
|
+
|
5416
|
+
|
5417
|
+
PartnerModelTuningSpecOrDict = Union[
|
5418
|
+
PartnerModelTuningSpec, PartnerModelTuningSpecDict
|
5419
|
+
]
|
5420
|
+
|
5421
|
+
|
5259
5422
|
class DistillationHyperParameters(_common.BaseModel):
|
5260
5423
|
"""Hyperparameters for Distillation."""
|
5261
5424
|
|
@@ -5351,41 +5514,6 @@ class DistillationSpecDict(TypedDict, total=False):
|
|
5351
5514
|
DistillationSpecOrDict = Union[DistillationSpec, DistillationSpecDict]
|
5352
5515
|
|
5353
5516
|
|
5354
|
-
class PartnerModelTuningSpec(_common.BaseModel):
|
5355
|
-
"""Tuning spec for Partner models."""
|
5356
|
-
|
5357
|
-
hyper_parameters: Optional[dict[str, Any]] = Field(
|
5358
|
-
default=None,
|
5359
|
-
description="""Hyperparameters for tuning. The accepted hyper_parameters and their valid range of values will differ depending on the base model.""",
|
5360
|
-
)
|
5361
|
-
training_dataset_uri: Optional[str] = Field(
|
5362
|
-
default=None,
|
5363
|
-
description="""Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5364
|
-
)
|
5365
|
-
validation_dataset_uri: Optional[str] = Field(
|
5366
|
-
default=None,
|
5367
|
-
description="""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5368
|
-
)
|
5369
|
-
|
5370
|
-
|
5371
|
-
class PartnerModelTuningSpecDict(TypedDict, total=False):
|
5372
|
-
"""Tuning spec for Partner models."""
|
5373
|
-
|
5374
|
-
hyper_parameters: Optional[dict[str, Any]]
|
5375
|
-
"""Hyperparameters for tuning. The accepted hyper_parameters and their valid range of values will differ depending on the base model."""
|
5376
|
-
|
5377
|
-
training_dataset_uri: Optional[str]
|
5378
|
-
"""Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5379
|
-
|
5380
|
-
validation_dataset_uri: Optional[str]
|
5381
|
-
"""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5382
|
-
|
5383
|
-
|
5384
|
-
PartnerModelTuningSpecOrDict = Union[
|
5385
|
-
PartnerModelTuningSpec, PartnerModelTuningSpecDict
|
5386
|
-
]
|
5387
|
-
|
5388
|
-
|
5389
5517
|
class TuningJob(_common.BaseModel):
|
5390
5518
|
"""A tuning job."""
|
5391
5519
|
|
@@ -5427,7 +5555,7 @@ class TuningJob(_common.BaseModel):
|
|
5427
5555
|
)
|
5428
5556
|
tuned_model: Optional[TunedModel] = Field(
|
5429
5557
|
default=None,
|
5430
|
-
description="""Output only. The tuned model resources
|
5558
|
+
description="""Output only. The tuned model resources associated with this TuningJob.""",
|
5431
5559
|
)
|
5432
5560
|
supervised_tuning_spec: Optional[SupervisedTuningSpec] = Field(
|
5433
5561
|
default=None, description="""Tuning Spec for Supervised Fine Tuning."""
|
@@ -5440,16 +5568,12 @@ class TuningJob(_common.BaseModel):
|
|
5440
5568
|
default=None,
|
5441
5569
|
description="""Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.""",
|
5442
5570
|
)
|
5443
|
-
distillation_spec: Optional[DistillationSpec] = Field(
|
5444
|
-
default=None, description="""Tuning Spec for Distillation."""
|
5445
|
-
)
|
5446
5571
|
partner_model_tuning_spec: Optional[PartnerModelTuningSpec] = Field(
|
5447
5572
|
default=None,
|
5448
5573
|
description="""Tuning Spec for open sourced and third party Partner models.""",
|
5449
5574
|
)
|
5450
|
-
|
5451
|
-
default=None,
|
5452
|
-
description="""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.""",
|
5575
|
+
distillation_spec: Optional[DistillationSpec] = Field(
|
5576
|
+
default=None, description="""Tuning Spec for Distillation."""
|
5453
5577
|
)
|
5454
5578
|
experiment: Optional[str] = Field(
|
5455
5579
|
default=None,
|
@@ -5459,6 +5583,10 @@ class TuningJob(_common.BaseModel):
|
|
5459
5583
|
default=None,
|
5460
5584
|
description="""Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.""",
|
5461
5585
|
)
|
5586
|
+
pipeline_job: Optional[str] = Field(
|
5587
|
+
default=None,
|
5588
|
+
description="""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.""",
|
5589
|
+
)
|
5462
5590
|
tuned_model_display_name: Optional[str] = Field(
|
5463
5591
|
default=None,
|
5464
5592
|
description="""Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters.""",
|
@@ -5506,7 +5634,7 @@ class TuningJobDict(TypedDict, total=False):
|
|
5506
5634
|
"""The base model that is being tuned, e.g., "gemini-1.0-pro-002". ."""
|
5507
5635
|
|
5508
5636
|
tuned_model: Optional[TunedModelDict]
|
5509
|
-
"""Output only. The tuned model resources
|
5637
|
+
"""Output only. The tuned model resources associated with this TuningJob."""
|
5510
5638
|
|
5511
5639
|
supervised_tuning_spec: Optional[SupervisedTuningSpecDict]
|
5512
5640
|
"""Tuning Spec for Supervised Fine Tuning."""
|
@@ -5517,14 +5645,11 @@ class TuningJobDict(TypedDict, total=False):
|
|
5517
5645
|
encryption_spec: Optional[EncryptionSpecDict]
|
5518
5646
|
"""Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key."""
|
5519
5647
|
|
5520
|
-
distillation_spec: Optional[DistillationSpecDict]
|
5521
|
-
"""Tuning Spec for Distillation."""
|
5522
|
-
|
5523
5648
|
partner_model_tuning_spec: Optional[PartnerModelTuningSpecDict]
|
5524
5649
|
"""Tuning Spec for open sourced and third party Partner models."""
|
5525
5650
|
|
5526
|
-
|
5527
|
-
"""
|
5651
|
+
distillation_spec: Optional[DistillationSpecDict]
|
5652
|
+
"""Tuning Spec for Distillation."""
|
5528
5653
|
|
5529
5654
|
experiment: Optional[str]
|
5530
5655
|
"""Output only. The Experiment associated with this TuningJob."""
|
@@ -5532,6 +5657,9 @@ class TuningJobDict(TypedDict, total=False):
|
|
5532
5657
|
labels: Optional[dict[str, str]]
|
5533
5658
|
"""Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels."""
|
5534
5659
|
|
5660
|
+
pipeline_job: Optional[str]
|
5661
|
+
"""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`."""
|
5662
|
+
|
5535
5663
|
tuned_model_display_name: Optional[str]
|
5536
5664
|
"""Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters."""
|
5537
5665
|
|
@@ -5542,6 +5670,9 @@ TuningJobOrDict = Union[TuningJob, TuningJobDict]
|
|
5542
5670
|
class ListTuningJobsConfig(_common.BaseModel):
|
5543
5671
|
"""Configuration for the list tuning jobs method."""
|
5544
5672
|
|
5673
|
+
http_options: Optional[HttpOptions] = Field(
|
5674
|
+
default=None, description="""Used to override HTTP request options."""
|
5675
|
+
)
|
5545
5676
|
page_size: Optional[int] = Field(default=None, description="""""")
|
5546
5677
|
page_token: Optional[str] = Field(default=None, description="""""")
|
5547
5678
|
filter: Optional[str] = Field(default=None, description="""""")
|
@@ -5550,6 +5681,9 @@ class ListTuningJobsConfig(_common.BaseModel):
|
|
5550
5681
|
class ListTuningJobsConfigDict(TypedDict, total=False):
|
5551
5682
|
"""Configuration for the list tuning jobs method."""
|
5552
5683
|
|
5684
|
+
http_options: Optional[HttpOptionsDict]
|
5685
|
+
"""Used to override HTTP request options."""
|
5686
|
+
|
5553
5687
|
page_size: Optional[int]
|
5554
5688
|
""""""
|
5555
5689
|
|
@@ -5635,7 +5769,7 @@ TuningExampleOrDict = Union[TuningExample, TuningExampleDict]
|
|
5635
5769
|
|
5636
5770
|
|
5637
5771
|
class TuningDataset(_common.BaseModel):
|
5638
|
-
"""Supervised
|
5772
|
+
"""Supervised fine-tuning training dataset."""
|
5639
5773
|
|
5640
5774
|
gcs_uri: Optional[str] = Field(
|
5641
5775
|
default=None,
|
@@ -5648,7 +5782,7 @@ class TuningDataset(_common.BaseModel):
|
|
5648
5782
|
|
5649
5783
|
|
5650
5784
|
class TuningDatasetDict(TypedDict, total=False):
|
5651
|
-
"""Supervised
|
5785
|
+
"""Supervised fine-tuning training dataset."""
|
5652
5786
|
|
5653
5787
|
gcs_uri: Optional[str]
|
5654
5788
|
"""GCS URI of the file containing training dataset in JSONL format."""
|
@@ -5682,7 +5816,7 @@ TuningValidationDatasetOrDict = Union[
|
|
5682
5816
|
class CreateTuningJobConfig(_common.BaseModel):
|
5683
5817
|
"""Supervised fine-tuning job creation request - optional fields."""
|
5684
5818
|
|
5685
|
-
http_options: Optional[
|
5819
|
+
http_options: Optional[HttpOptions] = Field(
|
5686
5820
|
default=None, description="""Used to override HTTP request options."""
|
5687
5821
|
)
|
5688
5822
|
validation_dataset: Optional[TuningValidationDataset] = Field(
|
@@ -5720,7 +5854,7 @@ class CreateTuningJobConfig(_common.BaseModel):
|
|
5720
5854
|
class CreateTuningJobConfigDict(TypedDict, total=False):
|
5721
5855
|
"""Supervised fine-tuning job creation request - optional fields."""
|
5722
5856
|
|
5723
|
-
http_options: Optional[
|
5857
|
+
http_options: Optional[HttpOptionsDict]
|
5724
5858
|
"""Used to override HTTP request options."""
|
5725
5859
|
|
5726
5860
|
validation_dataset: Optional[TuningValidationDatasetDict]
|
@@ -5805,152 +5939,10 @@ TuningJobOrOperationOrDict = Union[
|
|
5805
5939
|
]
|
5806
5940
|
|
5807
5941
|
|
5808
|
-
class DistillationDataset(_common.BaseModel):
|
5809
|
-
"""Training dataset."""
|
5810
|
-
|
5811
|
-
gcs_uri: Optional[str] = Field(
|
5812
|
-
default=None,
|
5813
|
-
description="""GCS URI of the file containing training dataset in JSONL format.""",
|
5814
|
-
)
|
5815
|
-
|
5816
|
-
|
5817
|
-
class DistillationDatasetDict(TypedDict, total=False):
|
5818
|
-
"""Training dataset."""
|
5819
|
-
|
5820
|
-
gcs_uri: Optional[str]
|
5821
|
-
"""GCS URI of the file containing training dataset in JSONL format."""
|
5822
|
-
|
5823
|
-
|
5824
|
-
DistillationDatasetOrDict = Union[DistillationDataset, DistillationDatasetDict]
|
5825
|
-
|
5826
|
-
|
5827
|
-
class DistillationValidationDataset(_common.BaseModel):
|
5828
|
-
"""Validation dataset."""
|
5829
|
-
|
5830
|
-
gcs_uri: Optional[str] = Field(
|
5831
|
-
default=None,
|
5832
|
-
description="""GCS URI of the file containing validation dataset in JSONL format.""",
|
5833
|
-
)
|
5834
|
-
|
5835
|
-
|
5836
|
-
class DistillationValidationDatasetDict(TypedDict, total=False):
|
5837
|
-
"""Validation dataset."""
|
5838
|
-
|
5839
|
-
gcs_uri: Optional[str]
|
5840
|
-
"""GCS URI of the file containing validation dataset in JSONL format."""
|
5841
|
-
|
5842
|
-
|
5843
|
-
DistillationValidationDatasetOrDict = Union[
|
5844
|
-
DistillationValidationDataset, DistillationValidationDatasetDict
|
5845
|
-
]
|
5846
|
-
|
5847
|
-
|
5848
|
-
class CreateDistillationJobConfig(_common.BaseModel):
|
5849
|
-
"""Distillation job creation request - optional fields."""
|
5850
|
-
|
5851
|
-
http_options: Optional[dict[str, Any]] = Field(
|
5852
|
-
default=None, description="""Used to override HTTP request options."""
|
5853
|
-
)
|
5854
|
-
validation_dataset: Optional[DistillationValidationDataset] = Field(
|
5855
|
-
default=None,
|
5856
|
-
description="""Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5857
|
-
)
|
5858
|
-
tuned_model_display_name: Optional[str] = Field(
|
5859
|
-
default=None,
|
5860
|
-
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.""",
|
5861
|
-
)
|
5862
|
-
epoch_count: Optional[int] = Field(
|
5863
|
-
default=None,
|
5864
|
-
description="""Number of complete passes the model makes over the entire training dataset during training.""",
|
5865
|
-
)
|
5866
|
-
learning_rate_multiplier: Optional[float] = Field(
|
5867
|
-
default=None,
|
5868
|
-
description="""Multiplier for adjusting the default learning rate.""",
|
5869
|
-
)
|
5870
|
-
adapter_size: Optional[AdapterSize] = Field(
|
5871
|
-
default=None, description="""Adapter size for tuning."""
|
5872
|
-
)
|
5873
|
-
pipeline_root_directory: Optional[str] = Field(
|
5874
|
-
default=None,
|
5875
|
-
description="""The resource name of the PipelineJob associated with the TuningJob. Format:`projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.""",
|
5876
|
-
)
|
5877
|
-
|
5878
|
-
|
5879
|
-
class CreateDistillationJobConfigDict(TypedDict, total=False):
|
5880
|
-
"""Distillation job creation request - optional fields."""
|
5881
|
-
|
5882
|
-
http_options: Optional[dict[str, Any]]
|
5883
|
-
"""Used to override HTTP request options."""
|
5884
|
-
|
5885
|
-
validation_dataset: Optional[DistillationValidationDatasetDict]
|
5886
|
-
"""Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5887
|
-
|
5888
|
-
tuned_model_display_name: Optional[str]
|
5889
|
-
"""The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters."""
|
5890
|
-
|
5891
|
-
epoch_count: Optional[int]
|
5892
|
-
"""Number of complete passes the model makes over the entire training dataset during training."""
|
5893
|
-
|
5894
|
-
learning_rate_multiplier: Optional[float]
|
5895
|
-
"""Multiplier for adjusting the default learning rate."""
|
5896
|
-
|
5897
|
-
adapter_size: Optional[AdapterSize]
|
5898
|
-
"""Adapter size for tuning."""
|
5899
|
-
|
5900
|
-
pipeline_root_directory: Optional[str]
|
5901
|
-
"""The resource name of the PipelineJob associated with the TuningJob. Format:`projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`."""
|
5902
|
-
|
5903
|
-
|
5904
|
-
CreateDistillationJobConfigOrDict = Union[
|
5905
|
-
CreateDistillationJobConfig, CreateDistillationJobConfigDict
|
5906
|
-
]
|
5907
|
-
|
5908
|
-
|
5909
|
-
class _CreateDistillationJobParameters(_common.BaseModel):
|
5910
|
-
"""Distillation job creation parameters - optional fields."""
|
5911
|
-
|
5912
|
-
student_model: Optional[str] = Field(
|
5913
|
-
default=None,
|
5914
|
-
description="""The student model that is being tuned, e.g. ``google/gemma-2b-1.1-it``.""",
|
5915
|
-
)
|
5916
|
-
teacher_model: Optional[str] = Field(
|
5917
|
-
default=None,
|
5918
|
-
description="""The teacher model that is being distilled from, e.g. ``gemini-1.0-pro-002``.""",
|
5919
|
-
)
|
5920
|
-
training_dataset: Optional[DistillationDataset] = Field(
|
5921
|
-
default=None,
|
5922
|
-
description="""Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
5923
|
-
)
|
5924
|
-
config: Optional[CreateDistillationJobConfig] = Field(
|
5925
|
-
default=None, description="""Configuration for the distillation job."""
|
5926
|
-
)
|
5927
|
-
|
5928
|
-
|
5929
|
-
class _CreateDistillationJobParametersDict(TypedDict, total=False):
|
5930
|
-
"""Distillation job creation parameters - optional fields."""
|
5931
|
-
|
5932
|
-
student_model: Optional[str]
|
5933
|
-
"""The student model that is being tuned, e.g. ``google/gemma-2b-1.1-it``."""
|
5934
|
-
|
5935
|
-
teacher_model: Optional[str]
|
5936
|
-
"""The teacher model that is being distilled from, e.g. ``gemini-1.0-pro-002``."""
|
5937
|
-
|
5938
|
-
training_dataset: Optional[DistillationDatasetDict]
|
5939
|
-
"""Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
|
5940
|
-
|
5941
|
-
config: Optional[CreateDistillationJobConfigDict]
|
5942
|
-
"""Configuration for the distillation job."""
|
5943
|
-
|
5944
|
-
|
5945
|
-
_CreateDistillationJobParametersOrDict = Union[
|
5946
|
-
_CreateDistillationJobParameters, _CreateDistillationJobParametersDict
|
5947
|
-
]
|
5948
|
-
|
5949
|
-
|
5950
5942
|
class CreateCachedContentConfig(_common.BaseModel):
|
5951
|
-
"""
|
5943
|
+
"""Optional configuration for cached content creation."""
|
5952
5944
|
|
5953
|
-
http_options: Optional[
|
5945
|
+
http_options: Optional[HttpOptions] = Field(
|
5954
5946
|
default=None, description="""Used to override HTTP request options."""
|
5955
5947
|
)
|
5956
5948
|
ttl: Optional[str] = Field(
|
@@ -5989,9 +5981,9 @@ class CreateCachedContentConfig(_common.BaseModel):
|
|
5989
5981
|
|
5990
5982
|
|
5991
5983
|
class CreateCachedContentConfigDict(TypedDict, total=False):
|
5992
|
-
"""
|
5984
|
+
"""Optional configuration for cached content creation."""
|
5993
5985
|
|
5994
|
-
http_options: Optional[
|
5986
|
+
http_options: Optional[HttpOptionsDict]
|
5995
5987
|
"""Used to override HTTP request options."""
|
5996
5988
|
|
5997
5989
|
ttl: Optional[str]
|
@@ -6117,7 +6109,7 @@ class CachedContent(_common.BaseModel):
|
|
6117
6109
|
description="""The name of the publisher model to use for cached content.""",
|
6118
6110
|
)
|
6119
6111
|
create_time: Optional[datetime.datetime] = Field(
|
6120
|
-
default=None, description="""
|
6112
|
+
default=None, description="""Creation time of the cache entry."""
|
6121
6113
|
)
|
6122
6114
|
update_time: Optional[datetime.datetime] = Field(
|
6123
6115
|
default=None,
|
@@ -6145,7 +6137,7 @@ class CachedContentDict(TypedDict, total=False):
|
|
6145
6137
|
"""The name of the publisher model to use for cached content."""
|
6146
6138
|
|
6147
6139
|
create_time: Optional[datetime.datetime]
|
6148
|
-
"""
|
6140
|
+
"""Creation time of the cache entry."""
|
6149
6141
|
|
6150
6142
|
update_time: Optional[datetime.datetime]
|
6151
6143
|
"""When the cache entry was last updated in UTC time."""
|
@@ -6163,7 +6155,7 @@ CachedContentOrDict = Union[CachedContent, CachedContentDict]
|
|
6163
6155
|
class GetCachedContentConfig(_common.BaseModel):
|
6164
6156
|
"""Optional parameters for caches.get method."""
|
6165
6157
|
|
6166
|
-
http_options: Optional[
|
6158
|
+
http_options: Optional[HttpOptions] = Field(
|
6167
6159
|
default=None, description="""Used to override HTTP request options."""
|
6168
6160
|
)
|
6169
6161
|
|
@@ -6171,7 +6163,7 @@ class GetCachedContentConfig(_common.BaseModel):
|
|
6171
6163
|
class GetCachedContentConfigDict(TypedDict, total=False):
|
6172
6164
|
"""Optional parameters for caches.get method."""
|
6173
6165
|
|
6174
|
-
http_options: Optional[
|
6166
|
+
http_options: Optional[HttpOptionsDict]
|
6175
6167
|
"""Used to override HTTP request options."""
|
6176
6168
|
|
6177
6169
|
|
@@ -6215,7 +6207,7 @@ _GetCachedContentParametersOrDict = Union[
|
|
6215
6207
|
class DeleteCachedContentConfig(_common.BaseModel):
|
6216
6208
|
"""Optional parameters for caches.delete method."""
|
6217
6209
|
|
6218
|
-
http_options: Optional[
|
6210
|
+
http_options: Optional[HttpOptions] = Field(
|
6219
6211
|
default=None, description="""Used to override HTTP request options."""
|
6220
6212
|
)
|
6221
6213
|
|
@@ -6223,7 +6215,7 @@ class DeleteCachedContentConfig(_common.BaseModel):
|
|
6223
6215
|
class DeleteCachedContentConfigDict(TypedDict, total=False):
|
6224
6216
|
"""Optional parameters for caches.delete method."""
|
6225
6217
|
|
6226
|
-
http_options: Optional[
|
6218
|
+
http_options: Optional[HttpOptionsDict]
|
6227
6219
|
"""Used to override HTTP request options."""
|
6228
6220
|
|
6229
6221
|
|
@@ -6284,7 +6276,7 @@ DeleteCachedContentResponseOrDict = Union[
|
|
6284
6276
|
class UpdateCachedContentConfig(_common.BaseModel):
|
6285
6277
|
"""Optional parameters for caches.update method."""
|
6286
6278
|
|
6287
|
-
http_options: Optional[
|
6279
|
+
http_options: Optional[HttpOptions] = Field(
|
6288
6280
|
default=None, description="""Used to override HTTP request options."""
|
6289
6281
|
)
|
6290
6282
|
ttl: Optional[str] = Field(
|
@@ -6300,7 +6292,7 @@ class UpdateCachedContentConfig(_common.BaseModel):
|
|
6300
6292
|
class UpdateCachedContentConfigDict(TypedDict, total=False):
|
6301
6293
|
"""Optional parameters for caches.update method."""
|
6302
6294
|
|
6303
|
-
http_options: Optional[
|
6295
|
+
http_options: Optional[HttpOptionsDict]
|
6304
6296
|
"""Used to override HTTP request options."""
|
6305
6297
|
|
6306
6298
|
ttl: Optional[str]
|
@@ -6348,6 +6340,9 @@ _UpdateCachedContentParametersOrDict = Union[
|
|
6348
6340
|
class ListCachedContentsConfig(_common.BaseModel):
|
6349
6341
|
"""Config for caches.list method."""
|
6350
6342
|
|
6343
|
+
http_options: Optional[HttpOptions] = Field(
|
6344
|
+
default=None, description="""Used to override HTTP request options."""
|
6345
|
+
)
|
6351
6346
|
page_size: Optional[int] = Field(default=None, description="""""")
|
6352
6347
|
page_token: Optional[str] = Field(default=None, description="""""")
|
6353
6348
|
|
@@ -6355,6 +6350,9 @@ class ListCachedContentsConfig(_common.BaseModel):
|
|
6355
6350
|
class ListCachedContentsConfigDict(TypedDict, total=False):
|
6356
6351
|
"""Config for caches.list method."""
|
6357
6352
|
|
6353
|
+
http_options: Optional[HttpOptionsDict]
|
6354
|
+
"""Used to override HTTP request options."""
|
6355
|
+
|
6358
6356
|
page_size: Optional[int]
|
6359
6357
|
""""""
|
6360
6358
|
|
@@ -6418,7 +6416,7 @@ ListCachedContentsResponseOrDict = Union[
|
|
6418
6416
|
class ListFilesConfig(_common.BaseModel):
|
6419
6417
|
"""Used to override the default configuration."""
|
6420
6418
|
|
6421
|
-
http_options: Optional[
|
6419
|
+
http_options: Optional[HttpOptions] = Field(
|
6422
6420
|
default=None, description="""Used to override HTTP request options."""
|
6423
6421
|
)
|
6424
6422
|
page_size: Optional[int] = Field(default=None, description="""""")
|
@@ -6428,7 +6426,7 @@ class ListFilesConfig(_common.BaseModel):
|
|
6428
6426
|
class ListFilesConfigDict(TypedDict, total=False):
|
6429
6427
|
"""Used to override the default configuration."""
|
6430
6428
|
|
6431
|
-
http_options: Optional[
|
6429
|
+
http_options: Optional[HttpOptionsDict]
|
6432
6430
|
"""Used to override HTTP request options."""
|
6433
6431
|
|
6434
6432
|
page_size: Optional[int]
|
@@ -6489,7 +6487,7 @@ ListFilesResponseOrDict = Union[ListFilesResponse, ListFilesResponseDict]
|
|
6489
6487
|
class CreateFileConfig(_common.BaseModel):
|
6490
6488
|
"""Used to override the default configuration."""
|
6491
6489
|
|
6492
|
-
http_options: Optional[
|
6490
|
+
http_options: Optional[HttpOptions] = Field(
|
6493
6491
|
default=None, description="""Used to override HTTP request options."""
|
6494
6492
|
)
|
6495
6493
|
|
@@ -6497,7 +6495,7 @@ class CreateFileConfig(_common.BaseModel):
|
|
6497
6495
|
class CreateFileConfigDict(TypedDict, total=False):
|
6498
6496
|
"""Used to override the default configuration."""
|
6499
6497
|
|
6500
|
-
http_options: Optional[
|
6498
|
+
http_options: Optional[HttpOptionsDict]
|
6501
6499
|
"""Used to override HTTP request options."""
|
6502
6500
|
|
6503
6501
|
|
@@ -6560,7 +6558,7 @@ CreateFileResponseOrDict = Union[CreateFileResponse, CreateFileResponseDict]
|
|
6560
6558
|
class GetFileConfig(_common.BaseModel):
|
6561
6559
|
"""Used to override the default configuration."""
|
6562
6560
|
|
6563
|
-
http_options: Optional[
|
6561
|
+
http_options: Optional[HttpOptions] = Field(
|
6564
6562
|
default=None, description="""Used to override HTTP request options."""
|
6565
6563
|
)
|
6566
6564
|
|
@@ -6568,7 +6566,7 @@ class GetFileConfig(_common.BaseModel):
|
|
6568
6566
|
class GetFileConfigDict(TypedDict, total=False):
|
6569
6567
|
"""Used to override the default configuration."""
|
6570
6568
|
|
6571
|
-
http_options: Optional[
|
6569
|
+
http_options: Optional[HttpOptionsDict]
|
6572
6570
|
"""Used to override HTTP request options."""
|
6573
6571
|
|
6574
6572
|
|
@@ -6604,7 +6602,7 @@ _GetFileParametersOrDict = Union[_GetFileParameters, _GetFileParametersDict]
|
|
6604
6602
|
class DeleteFileConfig(_common.BaseModel):
|
6605
6603
|
"""Used to override the default configuration."""
|
6606
6604
|
|
6607
|
-
http_options: Optional[
|
6605
|
+
http_options: Optional[HttpOptions] = Field(
|
6608
6606
|
default=None, description="""Used to override HTTP request options."""
|
6609
6607
|
)
|
6610
6608
|
|
@@ -6612,7 +6610,7 @@ class DeleteFileConfig(_common.BaseModel):
|
|
6612
6610
|
class DeleteFileConfigDict(TypedDict, total=False):
|
6613
6611
|
"""Used to override the default configuration."""
|
6614
6612
|
|
6615
|
-
http_options: Optional[
|
6613
|
+
http_options: Optional[HttpOptionsDict]
|
6616
6614
|
"""Used to override HTTP request options."""
|
6617
6615
|
|
6618
6616
|
|
@@ -6663,7 +6661,7 @@ DeleteFileResponseOrDict = Union[DeleteFileResponse, DeleteFileResponseDict]
|
|
6663
6661
|
|
6664
6662
|
|
6665
6663
|
class BatchJobSource(_common.BaseModel):
|
6666
|
-
"""Config
|
6664
|
+
"""Config for `src` parameter."""
|
6667
6665
|
|
6668
6666
|
format: Optional[str] = Field(
|
6669
6667
|
default=None,
|
@@ -6684,7 +6682,7 @@ class BatchJobSource(_common.BaseModel):
|
|
6684
6682
|
|
6685
6683
|
|
6686
6684
|
class BatchJobSourceDict(TypedDict, total=False):
|
6687
|
-
"""Config
|
6685
|
+
"""Config for `src` parameter."""
|
6688
6686
|
|
6689
6687
|
format: Optional[str]
|
6690
6688
|
"""Storage format of the input files. Must be one of:
|
@@ -6704,7 +6702,7 @@ BatchJobSourceOrDict = Union[BatchJobSource, BatchJobSourceDict]
|
|
6704
6702
|
|
6705
6703
|
|
6706
6704
|
class BatchJobDestination(_common.BaseModel):
|
6707
|
-
"""Config
|
6705
|
+
"""Config for `des` parameter."""
|
6708
6706
|
|
6709
6707
|
format: Optional[str] = Field(
|
6710
6708
|
default=None,
|
@@ -6725,7 +6723,7 @@ class BatchJobDestination(_common.BaseModel):
|
|
6725
6723
|
|
6726
6724
|
|
6727
6725
|
class BatchJobDestinationDict(TypedDict, total=False):
|
6728
|
-
"""Config
|
6726
|
+
"""Config for `des` parameter."""
|
6729
6727
|
|
6730
6728
|
format: Optional[str]
|
6731
6729
|
"""Storage format of the output files. Must be one of:
|
@@ -6745,9 +6743,9 @@ BatchJobDestinationOrDict = Union[BatchJobDestination, BatchJobDestinationDict]
|
|
6745
6743
|
|
6746
6744
|
|
6747
6745
|
class CreateBatchJobConfig(_common.BaseModel):
|
6748
|
-
"""Config
|
6746
|
+
"""Config for optional parameters."""
|
6749
6747
|
|
6750
|
-
http_options: Optional[
|
6748
|
+
http_options: Optional[HttpOptions] = Field(
|
6751
6749
|
default=None, description="""Used to override HTTP request options."""
|
6752
6750
|
)
|
6753
6751
|
display_name: Optional[str] = Field(
|
@@ -6764,9 +6762,9 @@ class CreateBatchJobConfig(_common.BaseModel):
|
|
6764
6762
|
|
6765
6763
|
|
6766
6764
|
class CreateBatchJobConfigDict(TypedDict, total=False):
|
6767
|
-
"""Config
|
6765
|
+
"""Config for optional parameters."""
|
6768
6766
|
|
6769
|
-
http_options: Optional[
|
6767
|
+
http_options: Optional[HttpOptionsDict]
|
6770
6768
|
"""Used to override HTTP request options."""
|
6771
6769
|
|
6772
6770
|
display_name: Optional[str]
|
@@ -6785,7 +6783,7 @@ CreateBatchJobConfigOrDict = Union[
|
|
6785
6783
|
|
6786
6784
|
|
6787
6785
|
class _CreateBatchJobParameters(_common.BaseModel):
|
6788
|
-
"""Config
|
6786
|
+
"""Config for batches.create parameters."""
|
6789
6787
|
|
6790
6788
|
model: Optional[str] = Field(
|
6791
6789
|
default=None,
|
@@ -6806,7 +6804,7 @@ class _CreateBatchJobParameters(_common.BaseModel):
|
|
6806
6804
|
|
6807
6805
|
|
6808
6806
|
class _CreateBatchJobParametersDict(TypedDict, total=False):
|
6809
|
-
"""Config
|
6807
|
+
"""Config for batches.create parameters."""
|
6810
6808
|
|
6811
6809
|
model: Optional[str]
|
6812
6810
|
"""The name of the model to produces the predictions via the BatchJob.
|
@@ -6828,7 +6826,7 @@ _CreateBatchJobParametersOrDict = Union[
|
|
6828
6826
|
|
6829
6827
|
|
6830
6828
|
class JobError(_common.BaseModel):
|
6831
|
-
"""
|
6829
|
+
"""Job error."""
|
6832
6830
|
|
6833
6831
|
details: Optional[list[str]] = Field(
|
6834
6832
|
default=None,
|
@@ -6842,7 +6840,7 @@ class JobError(_common.BaseModel):
|
|
6842
6840
|
|
6843
6841
|
|
6844
6842
|
class JobErrorDict(TypedDict, total=False):
|
6845
|
-
"""
|
6843
|
+
"""Job error."""
|
6846
6844
|
|
6847
6845
|
details: Optional[list[str]]
|
6848
6846
|
"""A list of messages that carry the error details. There is a common set of message types for APIs to use."""
|
@@ -6858,7 +6856,7 @@ JobErrorOrDict = Union[JobError, JobErrorDict]
|
|
6858
6856
|
|
6859
6857
|
|
6860
6858
|
class BatchJob(_common.BaseModel):
|
6861
|
-
"""Config
|
6859
|
+
"""Config for batches.create return value."""
|
6862
6860
|
|
6863
6861
|
name: Optional[str] = Field(
|
6864
6862
|
default=None, description="""Output only. Resource name of the Job."""
|
@@ -6908,7 +6906,7 @@ class BatchJob(_common.BaseModel):
|
|
6908
6906
|
|
6909
6907
|
|
6910
6908
|
class BatchJobDict(TypedDict, total=False):
|
6911
|
-
"""Config
|
6909
|
+
"""Config for batches.create return value."""
|
6912
6910
|
|
6913
6911
|
name: Optional[str]
|
6914
6912
|
"""Output only. Resource name of the Job."""
|
@@ -6953,7 +6951,7 @@ BatchJobOrDict = Union[BatchJob, BatchJobDict]
|
|
6953
6951
|
class GetBatchJobConfig(_common.BaseModel):
|
6954
6952
|
"""Optional parameters."""
|
6955
6953
|
|
6956
|
-
http_options: Optional[
|
6954
|
+
http_options: Optional[HttpOptions] = Field(
|
6957
6955
|
default=None, description="""Used to override HTTP request options."""
|
6958
6956
|
)
|
6959
6957
|
|
@@ -6961,7 +6959,7 @@ class GetBatchJobConfig(_common.BaseModel):
|
|
6961
6959
|
class GetBatchJobConfigDict(TypedDict, total=False):
|
6962
6960
|
"""Optional parameters."""
|
6963
6961
|
|
6964
|
-
http_options: Optional[
|
6962
|
+
http_options: Optional[HttpOptionsDict]
|
6965
6963
|
"""Used to override HTTP request options."""
|
6966
6964
|
|
6967
6965
|
|
@@ -6969,7 +6967,7 @@ GetBatchJobConfigOrDict = Union[GetBatchJobConfig, GetBatchJobConfigDict]
|
|
6969
6967
|
|
6970
6968
|
|
6971
6969
|
class _GetBatchJobParameters(_common.BaseModel):
|
6972
|
-
"""Config
|
6970
|
+
"""Config for batches.get parameters."""
|
6973
6971
|
|
6974
6972
|
name: Optional[str] = Field(
|
6975
6973
|
default=None,
|
@@ -6984,7 +6982,7 @@ class _GetBatchJobParameters(_common.BaseModel):
|
|
6984
6982
|
|
6985
6983
|
|
6986
6984
|
class _GetBatchJobParametersDict(TypedDict, total=False):
|
6987
|
-
"""Config
|
6985
|
+
"""Config for batches.get parameters."""
|
6988
6986
|
|
6989
6987
|
name: Optional[str]
|
6990
6988
|
"""A fully-qualified BatchJob resource name or ID.
|
@@ -7004,7 +7002,7 @@ _GetBatchJobParametersOrDict = Union[
|
|
7004
7002
|
class CancelBatchJobConfig(_common.BaseModel):
|
7005
7003
|
"""Optional parameters."""
|
7006
7004
|
|
7007
|
-
http_options: Optional[
|
7005
|
+
http_options: Optional[HttpOptions] = Field(
|
7008
7006
|
default=None, description="""Used to override HTTP request options."""
|
7009
7007
|
)
|
7010
7008
|
|
@@ -7012,7 +7010,7 @@ class CancelBatchJobConfig(_common.BaseModel):
|
|
7012
7010
|
class CancelBatchJobConfigDict(TypedDict, total=False):
|
7013
7011
|
"""Optional parameters."""
|
7014
7012
|
|
7015
|
-
http_options: Optional[
|
7013
|
+
http_options: Optional[HttpOptionsDict]
|
7016
7014
|
"""Used to override HTTP request options."""
|
7017
7015
|
|
7018
7016
|
|
@@ -7022,7 +7020,7 @@ CancelBatchJobConfigOrDict = Union[
|
|
7022
7020
|
|
7023
7021
|
|
7024
7022
|
class _CancelBatchJobParameters(_common.BaseModel):
|
7025
|
-
"""Config
|
7023
|
+
"""Config for batches.cancel parameters."""
|
7026
7024
|
|
7027
7025
|
name: Optional[str] = Field(
|
7028
7026
|
default=None,
|
@@ -7037,7 +7035,7 @@ class _CancelBatchJobParameters(_common.BaseModel):
|
|
7037
7035
|
|
7038
7036
|
|
7039
7037
|
class _CancelBatchJobParametersDict(TypedDict, total=False):
|
7040
|
-
"""Config
|
7038
|
+
"""Config for batches.cancel parameters."""
|
7041
7039
|
|
7042
7040
|
name: Optional[str]
|
7043
7041
|
"""A fully-qualified BatchJob resource name or ID.
|
@@ -7054,10 +7052,10 @@ _CancelBatchJobParametersOrDict = Union[
|
|
7054
7052
|
]
|
7055
7053
|
|
7056
7054
|
|
7057
|
-
class
|
7058
|
-
"""Config
|
7055
|
+
class ListBatchJobsConfig(_common.BaseModel):
|
7056
|
+
"""Config for optional parameters."""
|
7059
7057
|
|
7060
|
-
http_options: Optional[
|
7058
|
+
http_options: Optional[HttpOptions] = Field(
|
7061
7059
|
default=None, description="""Used to override HTTP request options."""
|
7062
7060
|
)
|
7063
7061
|
page_size: Optional[int] = Field(default=None, description="""""")
|
@@ -7065,10 +7063,10 @@ class ListBatchJobConfig(_common.BaseModel):
|
|
7065
7063
|
filter: Optional[str] = Field(default=None, description="""""")
|
7066
7064
|
|
7067
7065
|
|
7068
|
-
class
|
7069
|
-
"""Config
|
7066
|
+
class ListBatchJobsConfigDict(TypedDict, total=False):
|
7067
|
+
"""Config for optional parameters."""
|
7070
7068
|
|
7071
|
-
http_options: Optional[
|
7069
|
+
http_options: Optional[HttpOptionsDict]
|
7072
7070
|
"""Used to override HTTP request options."""
|
7073
7071
|
|
7074
7072
|
page_size: Optional[int]
|
@@ -7081,36 +7079,38 @@ class ListBatchJobConfigDict(TypedDict, total=False):
|
|
7081
7079
|
""""""
|
7082
7080
|
|
7083
7081
|
|
7084
|
-
|
7082
|
+
ListBatchJobsConfigOrDict = Union[ListBatchJobsConfig, ListBatchJobsConfigDict]
|
7085
7083
|
|
7086
7084
|
|
7087
|
-
class
|
7088
|
-
"""Config
|
7085
|
+
class _ListBatchJobsParameters(_common.BaseModel):
|
7086
|
+
"""Config for batches.list parameters."""
|
7089
7087
|
|
7090
|
-
config: Optional[
|
7088
|
+
config: Optional[ListBatchJobsConfig] = Field(
|
7089
|
+
default=None, description=""""""
|
7090
|
+
)
|
7091
7091
|
|
7092
7092
|
|
7093
|
-
class
|
7094
|
-
"""Config
|
7093
|
+
class _ListBatchJobsParametersDict(TypedDict, total=False):
|
7094
|
+
"""Config for batches.list parameters."""
|
7095
7095
|
|
7096
|
-
config: Optional[
|
7096
|
+
config: Optional[ListBatchJobsConfigDict]
|
7097
7097
|
""""""
|
7098
7098
|
|
7099
7099
|
|
7100
|
-
|
7101
|
-
|
7100
|
+
_ListBatchJobsParametersOrDict = Union[
|
7101
|
+
_ListBatchJobsParameters, _ListBatchJobsParametersDict
|
7102
7102
|
]
|
7103
7103
|
|
7104
7104
|
|
7105
|
-
class
|
7106
|
-
"""Config
|
7105
|
+
class ListBatchJobsResponse(_common.BaseModel):
|
7106
|
+
"""Config for batches.list return value."""
|
7107
7107
|
|
7108
7108
|
next_page_token: Optional[str] = Field(default=None, description="""""")
|
7109
7109
|
batch_jobs: Optional[list[BatchJob]] = Field(default=None, description="""""")
|
7110
7110
|
|
7111
7111
|
|
7112
|
-
class
|
7113
|
-
"""Config
|
7112
|
+
class ListBatchJobsResponseDict(TypedDict, total=False):
|
7113
|
+
"""Config for batches.list return value."""
|
7114
7114
|
|
7115
7115
|
next_page_token: Optional[str]
|
7116
7116
|
""""""
|
@@ -7119,13 +7119,33 @@ class ListBatchJobResponseDict(TypedDict, total=False):
|
|
7119
7119
|
""""""
|
7120
7120
|
|
7121
7121
|
|
7122
|
-
|
7123
|
-
|
7122
|
+
ListBatchJobsResponseOrDict = Union[
|
7123
|
+
ListBatchJobsResponse, ListBatchJobsResponseDict
|
7124
|
+
]
|
7125
|
+
|
7126
|
+
|
7127
|
+
class DeleteBatchJobConfig(_common.BaseModel):
|
7128
|
+
"""Optional parameters for models.get method."""
|
7129
|
+
|
7130
|
+
http_options: Optional[HttpOptions] = Field(
|
7131
|
+
default=None, description="""Used to override HTTP request options."""
|
7132
|
+
)
|
7133
|
+
|
7134
|
+
|
7135
|
+
class DeleteBatchJobConfigDict(TypedDict, total=False):
|
7136
|
+
"""Optional parameters for models.get method."""
|
7137
|
+
|
7138
|
+
http_options: Optional[HttpOptionsDict]
|
7139
|
+
"""Used to override HTTP request options."""
|
7140
|
+
|
7141
|
+
|
7142
|
+
DeleteBatchJobConfigOrDict = Union[
|
7143
|
+
DeleteBatchJobConfig, DeleteBatchJobConfigDict
|
7124
7144
|
]
|
7125
7145
|
|
7126
7146
|
|
7127
7147
|
class _DeleteBatchJobParameters(_common.BaseModel):
|
7128
|
-
"""Config
|
7148
|
+
"""Config for batches.delete parameters."""
|
7129
7149
|
|
7130
7150
|
name: Optional[str] = Field(
|
7131
7151
|
default=None,
|
@@ -7134,10 +7154,13 @@ class _DeleteBatchJobParameters(_common.BaseModel):
|
|
7134
7154
|
or "456" when project and location are initialized in the client.
|
7135
7155
|
""",
|
7136
7156
|
)
|
7157
|
+
config: Optional[DeleteBatchJobConfig] = Field(
|
7158
|
+
default=None, description="""Optional parameters for the request."""
|
7159
|
+
)
|
7137
7160
|
|
7138
7161
|
|
7139
7162
|
class _DeleteBatchJobParametersDict(TypedDict, total=False):
|
7140
|
-
"""Config
|
7163
|
+
"""Config for batches.delete parameters."""
|
7141
7164
|
|
7142
7165
|
name: Optional[str]
|
7143
7166
|
"""A fully-qualified BatchJob resource name or ID.
|
@@ -7145,6 +7168,9 @@ class _DeleteBatchJobParametersDict(TypedDict, total=False):
|
|
7145
7168
|
or "456" when project and location are initialized in the client.
|
7146
7169
|
"""
|
7147
7170
|
|
7171
|
+
config: Optional[DeleteBatchJobConfigDict]
|
7172
|
+
"""Optional parameters for the request."""
|
7173
|
+
|
7148
7174
|
|
7149
7175
|
_DeleteBatchJobParametersOrDict = Union[
|
7150
7176
|
_DeleteBatchJobParameters, _DeleteBatchJobParametersDict
|
@@ -7152,7 +7178,7 @@ _DeleteBatchJobParametersOrDict = Union[
|
|
7152
7178
|
|
7153
7179
|
|
7154
7180
|
class DeleteResourceJob(_common.BaseModel):
|
7155
|
-
"""
|
7181
|
+
"""The return value of delete operation."""
|
7156
7182
|
|
7157
7183
|
name: Optional[str] = Field(default=None, description="""""")
|
7158
7184
|
done: Optional[bool] = Field(default=None, description="""""")
|
@@ -7160,7 +7186,7 @@ class DeleteResourceJob(_common.BaseModel):
|
|
7160
7186
|
|
7161
7187
|
|
7162
7188
|
class DeleteResourceJobDict(TypedDict, total=False):
|
7163
|
-
"""
|
7189
|
+
"""The return value of delete operation."""
|
7164
7190
|
|
7165
7191
|
name: Optional[str]
|
7166
7192
|
""""""
|
@@ -7175,6 +7201,147 @@ class DeleteResourceJobDict(TypedDict, total=False):
|
|
7175
7201
|
DeleteResourceJobOrDict = Union[DeleteResourceJob, DeleteResourceJobDict]
|
7176
7202
|
|
7177
7203
|
|
7204
|
+
class GetOperationConfig(_common.BaseModel):
|
7205
|
+
|
7206
|
+
http_options: Optional[HttpOptions] = Field(
|
7207
|
+
default=None, description="""Used to override HTTP request options."""
|
7208
|
+
)
|
7209
|
+
|
7210
|
+
|
7211
|
+
class GetOperationConfigDict(TypedDict, total=False):
|
7212
|
+
|
7213
|
+
http_options: Optional[HttpOptionsDict]
|
7214
|
+
"""Used to override HTTP request options."""
|
7215
|
+
|
7216
|
+
|
7217
|
+
GetOperationConfigOrDict = Union[GetOperationConfig, GetOperationConfigDict]
|
7218
|
+
|
7219
|
+
|
7220
|
+
class _GetOperationParameters(_common.BaseModel):
|
7221
|
+
"""Parameters for the GET method."""
|
7222
|
+
|
7223
|
+
operation_name: Optional[str] = Field(
|
7224
|
+
default=None,
|
7225
|
+
description="""The server-assigned name for the operation.""",
|
7226
|
+
)
|
7227
|
+
config: Optional[GetOperationConfig] = Field(
|
7228
|
+
default=None,
|
7229
|
+
description="""Used to override the default configuration.""",
|
7230
|
+
)
|
7231
|
+
|
7232
|
+
|
7233
|
+
class _GetOperationParametersDict(TypedDict, total=False):
|
7234
|
+
"""Parameters for the GET method."""
|
7235
|
+
|
7236
|
+
operation_name: Optional[str]
|
7237
|
+
"""The server-assigned name for the operation."""
|
7238
|
+
|
7239
|
+
config: Optional[GetOperationConfigDict]
|
7240
|
+
"""Used to override the default configuration."""
|
7241
|
+
|
7242
|
+
|
7243
|
+
_GetOperationParametersOrDict = Union[
|
7244
|
+
_GetOperationParameters, _GetOperationParametersDict
|
7245
|
+
]
|
7246
|
+
|
7247
|
+
|
7248
|
+
class Operation(_common.BaseModel):
|
7249
|
+
"""A long-running operation."""
|
7250
|
+
|
7251
|
+
name: Optional[str] = Field(
|
7252
|
+
default=None,
|
7253
|
+
description="""The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.""",
|
7254
|
+
)
|
7255
|
+
metadata: Optional[dict[str, Any]] = Field(
|
7256
|
+
default=None,
|
7257
|
+
description="""Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.""",
|
7258
|
+
)
|
7259
|
+
done: Optional[bool] = Field(
|
7260
|
+
default=None,
|
7261
|
+
description="""If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.""",
|
7262
|
+
)
|
7263
|
+
error: Optional[dict[str, Any]] = Field(
|
7264
|
+
default=None,
|
7265
|
+
description="""The error result of the operation in case of failure or cancellation.""",
|
7266
|
+
)
|
7267
|
+
response: Optional[dict[str, Any]] = Field(
|
7268
|
+
default=None,
|
7269
|
+
description="""The normal response of the operation in case of success.""",
|
7270
|
+
)
|
7271
|
+
|
7272
|
+
|
7273
|
+
class OperationDict(TypedDict, total=False):
|
7274
|
+
"""A long-running operation."""
|
7275
|
+
|
7276
|
+
name: Optional[str]
|
7277
|
+
"""The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`."""
|
7278
|
+
|
7279
|
+
metadata: Optional[dict[str, Any]]
|
7280
|
+
"""Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any."""
|
7281
|
+
|
7282
|
+
done: Optional[bool]
|
7283
|
+
"""If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available."""
|
7284
|
+
|
7285
|
+
error: Optional[dict[str, Any]]
|
7286
|
+
"""The error result of the operation in case of failure or cancellation."""
|
7287
|
+
|
7288
|
+
response: Optional[dict[str, Any]]
|
7289
|
+
"""The normal response of the operation in case of success."""
|
7290
|
+
|
7291
|
+
|
7292
|
+
OperationOrDict = Union[Operation, OperationDict]
|
7293
|
+
|
7294
|
+
|
7295
|
+
class FetchPredictOperationConfig(_common.BaseModel):
|
7296
|
+
|
7297
|
+
http_options: Optional[HttpOptions] = Field(
|
7298
|
+
default=None, description="""Used to override HTTP request options."""
|
7299
|
+
)
|
7300
|
+
|
7301
|
+
|
7302
|
+
class FetchPredictOperationConfigDict(TypedDict, total=False):
|
7303
|
+
|
7304
|
+
http_options: Optional[HttpOptionsDict]
|
7305
|
+
"""Used to override HTTP request options."""
|
7306
|
+
|
7307
|
+
|
7308
|
+
FetchPredictOperationConfigOrDict = Union[
|
7309
|
+
FetchPredictOperationConfig, FetchPredictOperationConfigDict
|
7310
|
+
]
|
7311
|
+
|
7312
|
+
|
7313
|
+
class _FetchPredictOperationParameters(_common.BaseModel):
|
7314
|
+
"""Parameters for the fetchPredictOperation method."""
|
7315
|
+
|
7316
|
+
operation_name: Optional[str] = Field(
|
7317
|
+
default=None,
|
7318
|
+
description="""The server-assigned name for the operation.""",
|
7319
|
+
)
|
7320
|
+
resource_name: Optional[str] = Field(default=None, description="""""")
|
7321
|
+
config: Optional[FetchPredictOperationConfig] = Field(
|
7322
|
+
default=None,
|
7323
|
+
description="""Used to override the default configuration.""",
|
7324
|
+
)
|
7325
|
+
|
7326
|
+
|
7327
|
+
class _FetchPredictOperationParametersDict(TypedDict, total=False):
|
7328
|
+
"""Parameters for the fetchPredictOperation method."""
|
7329
|
+
|
7330
|
+
operation_name: Optional[str]
|
7331
|
+
"""The server-assigned name for the operation."""
|
7332
|
+
|
7333
|
+
resource_name: Optional[str]
|
7334
|
+
""""""
|
7335
|
+
|
7336
|
+
config: Optional[FetchPredictOperationConfigDict]
|
7337
|
+
"""Used to override the default configuration."""
|
7338
|
+
|
7339
|
+
|
7340
|
+
_FetchPredictOperationParametersOrDict = Union[
|
7341
|
+
_FetchPredictOperationParameters, _FetchPredictOperationParametersDict
|
7342
|
+
]
|
7343
|
+
|
7344
|
+
|
7178
7345
|
class TestTableItem(_common.BaseModel):
|
7179
7346
|
|
7180
7347
|
name: Optional[str] = Field(
|
@@ -7369,7 +7536,7 @@ ReplayFileOrDict = Union[ReplayFile, ReplayFileDict]
|
|
7369
7536
|
class UploadFileConfig(_common.BaseModel):
|
7370
7537
|
"""Used to override the default configuration."""
|
7371
7538
|
|
7372
|
-
http_options: Optional[
|
7539
|
+
http_options: Optional[HttpOptions] = Field(
|
7373
7540
|
default=None, description="""Used to override HTTP request options."""
|
7374
7541
|
)
|
7375
7542
|
name: Optional[str] = Field(
|
@@ -7388,7 +7555,7 @@ class UploadFileConfig(_common.BaseModel):
|
|
7388
7555
|
class UploadFileConfigDict(TypedDict, total=False):
|
7389
7556
|
"""Used to override the default configuration."""
|
7390
7557
|
|
7391
|
-
http_options: Optional[
|
7558
|
+
http_options: Optional[HttpOptionsDict]
|
7392
7559
|
"""Used to override HTTP request options."""
|
7393
7560
|
|
7394
7561
|
name: Optional[str]
|
@@ -7407,7 +7574,7 @@ UploadFileConfigOrDict = Union[UploadFileConfig, UploadFileConfigDict]
|
|
7407
7574
|
class DownloadFileConfig(_common.BaseModel):
|
7408
7575
|
"""Used to override the default configuration."""
|
7409
7576
|
|
7410
|
-
http_options: Optional[
|
7577
|
+
http_options: Optional[HttpOptions] = Field(
|
7411
7578
|
default=None, description="""Used to override HTTP request options."""
|
7412
7579
|
)
|
7413
7580
|
|
@@ -7415,7 +7582,7 @@ class DownloadFileConfig(_common.BaseModel):
|
|
7415
7582
|
class DownloadFileConfigDict(TypedDict, total=False):
|
7416
7583
|
"""Used to override the default configuration."""
|
7417
7584
|
|
7418
|
-
http_options: Optional[
|
7585
|
+
http_options: Optional[HttpOptionsDict]
|
7419
7586
|
"""Used to override HTTP request options."""
|
7420
7587
|
|
7421
7588
|
|
@@ -7430,7 +7597,7 @@ class UpscaleImageConfig(_common.BaseModel):
|
|
7430
7597
|
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_.
|
7431
7598
|
"""
|
7432
7599
|
|
7433
|
-
http_options: Optional[
|
7600
|
+
http_options: Optional[HttpOptions] = Field(
|
7434
7601
|
default=None, description="""Used to override HTTP request options."""
|
7435
7602
|
)
|
7436
7603
|
include_rai_reason: Optional[bool] = Field(
|
@@ -7457,7 +7624,7 @@ class UpscaleImageConfigDict(TypedDict, total=False):
|
|
7457
7624
|
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_.
|
7458
7625
|
"""
|
7459
7626
|
|
7460
|
-
http_options: Optional[
|
7627
|
+
http_options: Optional[HttpOptionsDict]
|
7461
7628
|
"""Used to override HTTP request options."""
|
7462
7629
|
|
7463
7630
|
include_rai_reason: Optional[bool]
|
@@ -7515,7 +7682,7 @@ UpscaleImageParametersOrDict = Union[
|
|
7515
7682
|
|
7516
7683
|
|
7517
7684
|
class RawReferenceImage(_common.BaseModel):
|
7518
|
-
"""
|
7685
|
+
"""A raw reference image.
|
7519
7686
|
|
7520
7687
|
A raw reference image represents the base image to edit, provided by the user.
|
7521
7688
|
It can optionally be provided in addition to a mask reference image or
|
@@ -7546,7 +7713,7 @@ class RawReferenceImage(_common.BaseModel):
|
|
7546
7713
|
|
7547
7714
|
|
7548
7715
|
class RawReferenceImageDict(TypedDict, total=False):
|
7549
|
-
"""
|
7716
|
+
"""A raw reference image.
|
7550
7717
|
|
7551
7718
|
A raw reference image represents the base image to edit, provided by the user.
|
7552
7719
|
It can optionally be provided in addition to a mask reference image or
|
@@ -7567,7 +7734,7 @@ RawReferenceImageOrDict = Union[RawReferenceImage, RawReferenceImageDict]
|
|
7567
7734
|
|
7568
7735
|
|
7569
7736
|
class MaskReferenceImage(_common.BaseModel):
|
7570
|
-
"""
|
7737
|
+
"""A mask reference image.
|
7571
7738
|
|
7572
7739
|
This encapsulates either a mask image provided by the user and configs for
|
7573
7740
|
the user provided mask, or only config parameters for the model to generate
|
@@ -7612,7 +7779,7 @@ class MaskReferenceImage(_common.BaseModel):
|
|
7612
7779
|
|
7613
7780
|
|
7614
7781
|
class MaskReferenceImageDict(TypedDict, total=False):
|
7615
|
-
"""
|
7782
|
+
"""A mask reference image.
|
7616
7783
|
|
7617
7784
|
This encapsulates either a mask image provided by the user and configs for
|
7618
7785
|
the user provided mask, or only config parameters for the model to generate
|
@@ -7640,7 +7807,7 @@ MaskReferenceImageOrDict = Union[MaskReferenceImage, MaskReferenceImageDict]
|
|
7640
7807
|
|
7641
7808
|
|
7642
7809
|
class ControlReferenceImage(_common.BaseModel):
|
7643
|
-
"""
|
7810
|
+
"""A control reference image.
|
7644
7811
|
|
7645
7812
|
The image of the control reference image is either a control image provided
|
7646
7813
|
by the user, or a regular image which the backend will use to generate a
|
@@ -7685,7 +7852,7 @@ class ControlReferenceImage(_common.BaseModel):
|
|
7685
7852
|
|
7686
7853
|
|
7687
7854
|
class ControlReferenceImageDict(TypedDict, total=False):
|
7688
|
-
"""
|
7855
|
+
"""A control reference image.
|
7689
7856
|
|
7690
7857
|
The image of the control reference image is either a control image provided
|
7691
7858
|
by the user, or a regular image which the backend will use to generate a
|
@@ -7715,7 +7882,7 @@ ControlReferenceImageOrDict = Union[
|
|
7715
7882
|
|
7716
7883
|
|
7717
7884
|
class StyleReferenceImage(_common.BaseModel):
|
7718
|
-
"""
|
7885
|
+
"""A style reference image.
|
7719
7886
|
|
7720
7887
|
This encapsulates a style reference image provided by the user, and
|
7721
7888
|
additionally optional config parameters for the style reference image.
|
@@ -7758,7 +7925,7 @@ class StyleReferenceImage(_common.BaseModel):
|
|
7758
7925
|
|
7759
7926
|
|
7760
7927
|
class StyleReferenceImageDict(TypedDict, total=False):
|
7761
|
-
"""
|
7928
|
+
"""A style reference image.
|
7762
7929
|
|
7763
7930
|
This encapsulates a style reference image provided by the user, and
|
7764
7931
|
additionally optional config parameters for the style reference image.
|
@@ -7784,7 +7951,7 @@ StyleReferenceImageOrDict = Union[StyleReferenceImage, StyleReferenceImageDict]
|
|
7784
7951
|
|
7785
7952
|
|
7786
7953
|
class SubjectReferenceImage(_common.BaseModel):
|
7787
|
-
"""
|
7954
|
+
"""A subject reference image.
|
7788
7955
|
|
7789
7956
|
This encapsulates a subject reference image provided by the user, and
|
7790
7957
|
additionally optional config parameters for the subject reference image.
|
@@ -7827,7 +7994,7 @@ class SubjectReferenceImage(_common.BaseModel):
|
|
7827
7994
|
|
7828
7995
|
|
7829
7996
|
class SubjectReferenceImageDict(TypedDict, total=False):
|
7830
|
-
"""
|
7997
|
+
"""A subject reference image.
|
7831
7998
|
|
7832
7999
|
This encapsulates a subject reference image provided by the user, and
|
7833
8000
|
additionally optional config parameters for the subject reference image.
|
@@ -7888,7 +8055,7 @@ class LiveServerContent(_common.BaseModel):
|
|
7888
8055
|
)
|
7889
8056
|
interrupted: Optional[bool] = Field(
|
7890
8057
|
default=None,
|
7891
|
-
description="""If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue.
|
8058
|
+
description="""If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue.""",
|
7892
8059
|
)
|
7893
8060
|
|
7894
8061
|
|
@@ -7906,7 +8073,7 @@ class LiveServerContentDict(TypedDict, total=False):
|
|
7906
8073
|
"""If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn."""
|
7907
8074
|
|
7908
8075
|
interrupted: Optional[bool]
|
7909
|
-
"""If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue.
|
8076
|
+
"""If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue."""
|
7910
8077
|
|
7911
8078
|
|
7912
8079
|
LiveServerContentOrDict = Union[LiveServerContent, LiveServerContentDict]
|
@@ -8046,7 +8213,17 @@ class LiveClientSetup(_common.BaseModel):
|
|
8046
8213
|
)
|
8047
8214
|
generation_config: Optional[GenerationConfig] = Field(
|
8048
8215
|
default=None,
|
8049
|
-
description="""The generation configuration for the session.
|
8216
|
+
description="""The generation configuration for the session.
|
8217
|
+
|
8218
|
+
The following fields are supported:
|
8219
|
+
- `response_logprobs`
|
8220
|
+
- `response_mime_type`
|
8221
|
+
- `logprobs`
|
8222
|
+
- `response_schema`
|
8223
|
+
- `stop_sequence`
|
8224
|
+
- `routing_config`
|
8225
|
+
- `audio_timestamp`
|
8226
|
+
""",
|
8050
8227
|
)
|
8051
8228
|
system_instruction: Optional[Content] = Field(
|
8052
8229
|
default=None,
|
@@ -8074,7 +8251,17 @@ class LiveClientSetupDict(TypedDict, total=False):
|
|
8074
8251
|
"""
|
8075
8252
|
|
8076
8253
|
generation_config: Optional[GenerationConfigDict]
|
8077
|
-
"""The generation configuration for the session.
|
8254
|
+
"""The generation configuration for the session.
|
8255
|
+
|
8256
|
+
The following fields are supported:
|
8257
|
+
- `response_logprobs`
|
8258
|
+
- `response_mime_type`
|
8259
|
+
- `logprobs`
|
8260
|
+
- `response_schema`
|
8261
|
+
- `stop_sequence`
|
8262
|
+
- `routing_config`
|
8263
|
+
- `audio_timestamp`
|
8264
|
+
"""
|
8078
8265
|
|
8079
8266
|
system_instruction: Optional[ContentDict]
|
8080
8267
|
"""The user provided system instructions for the model.
|
@@ -8106,7 +8293,7 @@ class LiveClientContent(_common.BaseModel):
|
|
8106
8293
|
description="""The content appended to the current conversation with the model.
|
8107
8294
|
|
8108
8295
|
For single-turn queries, this is a single instance. For multi-turn
|
8109
|
-
queries, this is a repeated field that contains conversation history
|
8296
|
+
queries, this is a repeated field that contains conversation history and
|
8110
8297
|
latest request.
|
8111
8298
|
""",
|
8112
8299
|
)
|
@@ -8131,7 +8318,7 @@ class LiveClientContentDict(TypedDict, total=False):
|
|
8131
8318
|
"""The content appended to the current conversation with the model.
|
8132
8319
|
|
8133
8320
|
For single-turn queries, this is a single instance. For multi-turn
|
8134
|
-
queries, this is a repeated field that contains conversation history
|
8321
|
+
queries, this is a repeated field that contains conversation history and
|
8135
8322
|
latest request.
|
8136
8323
|
"""
|
8137
8324
|
|
@@ -8148,16 +8335,17 @@ class LiveClientRealtimeInput(_common.BaseModel):
|
|
8148
8335
|
"""User input that is sent in real time.
|
8149
8336
|
|
8150
8337
|
This is different from `ClientContentUpdate` in a few ways:
|
8151
|
-
|
8152
|
-
|
8153
|
-
|
8154
|
-
|
8155
|
-
|
8156
|
-
|
8157
|
-
|
8158
|
-
|
8159
|
-
|
8160
|
-
|
8338
|
+
|
8339
|
+
- Can be sent continuously without interruption to model generation.
|
8340
|
+
- If there is a need to mix data interleaved across the
|
8341
|
+
`ClientContentUpdate` and the `RealtimeUpdate`, server attempts to
|
8342
|
+
optimize for best response, but there are no guarantees.
|
8343
|
+
- End of turn is not explicitly specified, but is rather derived from user
|
8344
|
+
activity (for example, end of speech).
|
8345
|
+
- Even before the end of turn, the data is processed incrementally
|
8346
|
+
to optimize for a fast start of the response from the model.
|
8347
|
+
- Is always assumed to be the user's input (cannot be used to populate
|
8348
|
+
conversation history).
|
8161
8349
|
"""
|
8162
8350
|
|
8163
8351
|
media_chunks: Optional[list[Blob]] = Field(
|
@@ -8169,16 +8357,17 @@ class LiveClientRealtimeInputDict(TypedDict, total=False):
|
|
8169
8357
|
"""User input that is sent in real time.
|
8170
8358
|
|
8171
8359
|
This is different from `ClientContentUpdate` in a few ways:
|
8172
|
-
|
8173
|
-
|
8174
|
-
|
8175
|
-
|
8176
|
-
|
8177
|
-
|
8178
|
-
|
8179
|
-
|
8180
|
-
|
8181
|
-
|
8360
|
+
|
8361
|
+
- Can be sent continuously without interruption to model generation.
|
8362
|
+
- If there is a need to mix data interleaved across the
|
8363
|
+
`ClientContentUpdate` and the `RealtimeUpdate`, server attempts to
|
8364
|
+
optimize for best response, but there are no guarantees.
|
8365
|
+
- End of turn is not explicitly specified, but is rather derived from user
|
8366
|
+
activity (for example, end of speech).
|
8367
|
+
- Even before the end of turn, the data is processed incrementally
|
8368
|
+
to optimize for a fast start of the response from the model.
|
8369
|
+
- Is always assumed to be the user's input (cannot be used to populate
|
8370
|
+
conversation history).
|
8182
8371
|
"""
|
8183
8372
|
|
8184
8373
|
media_chunks: Optional[list[BlobDict]]
|
@@ -8268,7 +8457,7 @@ LiveClientMessageOrDict = Union[LiveClientMessage, LiveClientMessageDict]
|
|
8268
8457
|
|
8269
8458
|
|
8270
8459
|
class LiveConnectConfig(_common.BaseModel):
|
8271
|
-
"""
|
8460
|
+
"""Session config for the API connection."""
|
8272
8461
|
|
8273
8462
|
generation_config: Optional[GenerationConfig] = Field(
|
8274
8463
|
default=None,
|
@@ -8302,7 +8491,7 @@ class LiveConnectConfig(_common.BaseModel):
|
|
8302
8491
|
|
8303
8492
|
|
8304
8493
|
class LiveConnectConfigDict(TypedDict, total=False):
|
8305
|
-
"""
|
8494
|
+
"""Session config for the API connection."""
|
8306
8495
|
|
8307
8496
|
generation_config: Optional[GenerationConfigDict]
|
8308
8497
|
"""The generation configuration for the session."""
|