@@ -1146,7 +1146,7 @@ def from_dict(cls, generation_config_dict: Dict[str, Any]) -> "GenerationConfig"
1146
1146
def to_dict (self ) -> Dict [str , Any ]:
1147
1147
return type (self ._raw_generation_config ).to_dict (self ._raw_generation_config )
1148
1148
1149
- def __repr__ (self ):
1149
+ def __repr__ (self ) -> str :
1150
1150
return self ._raw_generation_config .__repr__ ()
1151
1151
1152
1152
@@ -1208,7 +1208,7 @@ def __init__(
1208
1208
def from_function_declarations (
1209
1209
cls ,
1210
1210
function_declarations : List ["FunctionDeclaration" ],
1211
- ):
1211
+ ) -> "Tool" :
1212
1212
gapic_function_declarations = [
1213
1213
function_declaration ._raw_function_declaration
1214
1214
for function_declaration in function_declarations
@@ -1221,16 +1221,16 @@ def from_function_declarations(
1221
1221
@classmethod
1222
1222
def from_retrieval (
1223
1223
cls ,
1224
- retrieval : "Retrieval" ,
1225
- ):
1224
+ retrieval : "grounding. Retrieval" ,
1225
+ ) -> "Tool" :
1226
1226
raw_tool = gapic_tool_types .Tool (retrieval = retrieval ._raw_retrieval )
1227
1227
return cls ._from_gapic (raw_tool = raw_tool )
1228
1228
1229
1229
@classmethod
1230
1230
def from_google_search_retrieval (
1231
1231
cls ,
1232
- google_search_retrieval : "GoogleSearchRetrieval" ,
1233
- ):
1232
+ google_search_retrieval : "grounding. GoogleSearchRetrieval" ,
1233
+ ) -> "Tool" :
1234
1234
raw_tool = gapic_tool_types .Tool (
1235
1235
google_search_retrieval = google_search_retrieval ._raw_google_search_retrieval
1236
1236
)
@@ -1259,7 +1259,7 @@ def from_dict(cls, tool_dict: Dict[str, Any]) -> "Tool":
1259
1259
def to_dict (self ) -> Dict [str , Any ]:
1260
1260
return type (self ._raw_tool ).to_dict (self ._raw_tool )
1261
1261
1262
- def __repr__ (self ):
1262
+ def __repr__ (self ) -> str :
1263
1263
return self ._raw_tool .__repr__ ()
1264
1264
1265
1265
@@ -1347,7 +1347,7 @@ def __init__(
1347
1347
)
1348
1348
1349
1349
1350
- def _convert_schema_dict_to_gapic (schema_dict : Dict [str , Any ]):
1350
+ def _convert_schema_dict_to_gapic (schema_dict : Dict [str , Any ]) -> Dict [ str , Any ] :
1351
1351
"""Converts a JsonSchema to a dict that the GAPIC Schema class accepts."""
1352
1352
gapic_schema_dict = copy .copy (schema_dict )
1353
1353
if "type" in gapic_schema_dict :
@@ -1390,7 +1390,7 @@ def from_dict(cls, response_dict: Dict[str, Any]) -> "GenerationResponse":
1390
1390
def to_dict (self ) -> Dict [str , Any ]:
1391
1391
return type (self ._raw_response ).to_dict (self ._raw_response )
1392
1392
1393
- def __repr__ (self ):
1393
+ def __repr__ (self ) -> str :
1394
1394
return self ._raw_response .__repr__ ()
1395
1395
1396
1396
@property
@@ -1435,7 +1435,7 @@ def from_dict(cls, candidate_dict: Dict[str, Any]) -> "Candidate":
1435
1435
def to_dict (self ) -> Dict [str , Any ]:
1436
1436
return type (self ._raw_candidate ).to_dict (self ._raw_candidate )
1437
1437
1438
- def __repr__ (self ):
1438
+ def __repr__ (self ) -> str :
1439
1439
return self ._raw_candidate .__repr__ ()
1440
1440
1441
1441
@property
@@ -1515,7 +1515,7 @@ def from_dict(cls, content_dict: Dict[str, Any]) -> "Content":
1515
1515
def to_dict (self ) -> Dict [str , Any ]:
1516
1516
return type (self ._raw_content ).to_dict (self ._raw_content )
1517
1517
1518
- def __repr__ (self ):
1518
+ def __repr__ (self ) -> str :
1519
1519
return self ._raw_content .__repr__ ()
1520
1520
1521
1521
@property
@@ -1579,7 +1579,7 @@ def from_dict(cls, part_dict: Dict[str, Any]) -> "Part":
1579
1579
json_format .ParseDict (part_dict , raw_part ._pb )
1580
1580
return cls ._from_gapic (raw_part = raw_part )
1581
1581
1582
- def __repr__ (self ):
1582
+ def __repr__ (self ) -> str :
1583
1583
return self ._raw_part .__repr__ ()
1584
1584
1585
1585
@staticmethod
0 commit comments