You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -303,21 +303,6 @@ class DynamicRetrievalConfigMode(_common.CaseInSensitiveEnum):
303
303
"""Run retrieval only when system decides it is necessary."""
304
304
305
305
306
-
class FunctionCallingConfigMode(_common.CaseInSensitiveEnum):
307
-
"""Function calling mode."""
308
-
309
-
MODE_UNSPECIFIED = 'MODE_UNSPECIFIED'
310
-
"""Unspecified function calling mode. This value should not be used."""
311
-
AUTO = 'AUTO'
312
-
"""Default model behavior, model decides to predict either function calls or natural language response."""
313
-
ANY = 'ANY'
314
-
"""Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations"."""
315
-
NONE = 'NONE'
316
-
"""Model will not predict any function calls. Model behavior is same as when not passing any function declarations."""
317
-
VALIDATED = 'VALIDATED'
318
-
"""Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations"."""
319
-
320
-
321
306
class ThinkingLevel(_common.CaseInSensitiveEnum):
322
307
"""The number of thoughts tokens that the model should generate."""
323
308
@@ -427,6 +412,21 @@ class HarmBlockThreshold(_common.CaseInSensitiveEnum):
427
412
"""Turn off the safety filter entirely."""
428
413
429
414
415
+
class FunctionCallingConfigMode(_common.CaseInSensitiveEnum):
416
+
"""Function calling mode."""
417
+
418
+
MODE_UNSPECIFIED = 'MODE_UNSPECIFIED'
419
+
"""Unspecified function calling mode. This value should not be used."""
420
+
AUTO = 'AUTO'
421
+
"""Default model behavior, model decides to predict either function calls or natural language response."""
422
+
ANY = 'ANY'
423
+
"""Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations"."""
424
+
NONE = 'NONE'
425
+
"""Model will not predict any function calls. Model behavior is same as when not passing any function declarations."""
426
+
VALIDATED = 'VALIDATED'
427
+
"""Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations"."""
428
+
429
+
430
430
class FinishReason(_common.CaseInSensitiveEnum):
431
431
"""Output only. The reason why the model stopped generating tokens.
432
432
@@ -1593,12 +1593,11 @@ class PartialArgDict(TypedDict, total=False):
1593
1593
1594
1594
1595
1595
class FunctionCall(_common.BaseModel):
1596
-
"""A function call."""
1596
+
"""A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values."""
1597
1597
1598
1598
id: Optional[str] = Field(
1599
1599
default=None,
1600
-
description="""The unique id of the function call. If populated, the client to execute the
1601
-
`function_call` and return the response with the matching `id`.""",
1600
+
description="""Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.""",
1602
1601
)
1603
1602
args: Optional[dict[str, Any]] = Field(
1604
1603
default=None,
@@ -1619,11 +1618,10 @@ class FunctionCall(_common.BaseModel):
1619
1618
1620
1619
1621
1620
class FunctionCallDict(TypedDict, total=False):
1622
-
"""A function call."""
1621
+
"""A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values."""
1623
1622
1624
1623
id: Optional[str]
1625
-
"""The unique id of the function call. If populated, the client to execute the
1626
-
`function_call` and return the response with the matching `id`."""
1624
+
"""Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`."""
1627
1625
1628
1626
args: Optional[dict[str, Any]]
1629
1627
"""Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details."""
@@ -4966,139 +4964,6 @@ class ToolDict(TypedDict, total=False):
4966
4964
SchemaUnionDict = Union[SchemaUnion, SchemaDict]
4967
4965
4968
4966
4969
-
class LatLng(_common.BaseModel):
4970
-
"""An object that represents a latitude/longitude pair.
4971
-
4972
-
This is expressed as a pair of doubles to represent degrees latitude and
4973
-
degrees longitude. Unless specified otherwise, this object must conform to the
description="""Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided.""",
description="""Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API.""",
5044
-
)
5045
-
5046
-
5047
-
class FunctionCallingConfigDict(TypedDict, total=False):
5048
-
"""Function calling config."""
5049
-
5050
-
allowed_function_names: Optional[list[str]]
5051
-
"""Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided."""
5052
-
5053
-
mode: Optional[FunctionCallingConfigMode]
5054
-
"""Optional. Function calling mode."""
5055
-
5056
-
stream_function_call_arguments: Optional[bool]
5057
-
"""Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API."""
5058
-
5059
-
5060
-
FunctionCallingConfigOrDict = Union[
5061
-
FunctionCallingConfig, FunctionCallingConfigDict
5062
-
]
5063
-
5064
-
5065
-
class ToolConfig(_common.BaseModel):
5066
-
"""Tool config.
5067
-
5068
-
This config is shared for all tools provided in the request.
description="""If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool invocations.""",
5080
-
)
5081
-
5082
-
5083
-
class ToolConfigDict(TypedDict, total=False):
5084
-
"""Tool config.
5085
-
5086
-
This config is shared for all tools provided in the request.
"""If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool invocations."""
description="""Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided.""",
description="""Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API.""",
5752
+
)
5753
+
5754
+
5755
+
class FunctionCallingConfigDict(TypedDict, total=False):
5756
+
"""Function calling config."""
5757
+
5758
+
allowed_function_names: Optional[list[str]]
5759
+
"""Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided."""
5760
+
5761
+
mode: Optional[FunctionCallingConfigMode]
5762
+
"""Optional. Function calling mode."""
5763
+
5764
+
stream_function_call_arguments: Optional[bool]
5765
+
"""Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API."""
5766
+
5767
+
5768
+
FunctionCallingConfigOrDict = Union[
5769
+
FunctionCallingConfig, FunctionCallingConfigDict
5770
+
]
5771
+
5772
+
5773
+
class ToolConfig(_common.BaseModel):
5774
+
"""Tool config.
5775
+
5776
+
This config is shared for all tools provided in the request.
description="""Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. This field is not supported in Vertex AI.""",
5788
+
)
5789
+
5790
+
5791
+
class ToolConfigDict(TypedDict, total=False):
5792
+
"""Tool config.
5793
+
5794
+
This config is shared for all tools provided in the request.
"""Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. This field is not supported in Vertex AI."""
0 commit comments