@langchain/google 0.2.11 → 0.2.12
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.
- package/CHANGELOG.md +13 -0
- package/dist/chat_models/{api-types.d.ts → api_types/generate_content.d.cts} +199 -199
- package/dist/chat_models/{api-types.d.cts → api_types/generate_content.d.ts} +199 -199
- package/dist/chat_models/base.cjs +53 -397
- package/dist/chat_models/base.cjs.map +1 -1
- package/dist/chat_models/base.d.cts +13 -198
- package/dist/chat_models/base.d.ts +15 -200
- package/dist/chat_models/base.js +55 -397
- package/dist/chat_models/base.js.map +1 -1
- package/dist/chat_models/handlers/base.cjs +63 -0
- package/dist/chat_models/handlers/base.cjs.map +1 -0
- package/dist/chat_models/handlers/base.d.cts +48 -0
- package/dist/chat_models/handlers/base.d.ts +48 -0
- package/dist/chat_models/handlers/base.js +63 -0
- package/dist/chat_models/handlers/base.js.map +1 -0
- package/dist/chat_models/handlers/generate_content.cjs +345 -0
- package/dist/chat_models/handlers/generate_content.cjs.map +1 -0
- package/dist/chat_models/handlers/generate_content.d.cts +34 -0
- package/dist/chat_models/handlers/generate_content.d.ts +34 -0
- package/dist/chat_models/handlers/generate_content.js +345 -0
- package/dist/chat_models/handlers/generate_content.js.map +1 -0
- package/dist/chat_models/handlers/index.cjs +4 -0
- package/dist/chat_models/handlers/index.d.cts +3 -0
- package/dist/chat_models/handlers/index.d.ts +3 -0
- package/dist/chat_models/handlers/index.js +3 -0
- package/dist/chat_models/index.cjs +11 -4
- package/dist/chat_models/index.cjs.map +1 -1
- package/dist/chat_models/index.d.cts +6 -1
- package/dist/chat_models/index.d.ts +6 -1
- package/dist/chat_models/index.js +6 -2
- package/dist/chat_models/index.js.map +1 -1
- package/dist/chat_models/node.cjs +2 -2
- package/dist/chat_models/node.cjs.map +1 -1
- package/dist/chat_models/node.js +2 -2
- package/dist/chat_models/node.js.map +1 -1
- package/dist/chat_models/types.cjs.map +1 -1
- package/dist/chat_models/types.d.cts +281 -94
- package/dist/chat_models/types.d.ts +281 -94
- package/dist/chat_models/types.js.map +1 -1
- package/dist/converters/{messages.cjs → generate_content/messages.cjs} +4 -4
- package/dist/converters/generate_content/messages.cjs.map +1 -0
- package/dist/converters/{messages.js → generate_content/messages.js} +4 -4
- package/dist/converters/generate_content/messages.js.map +1 -0
- package/dist/converters/generate_content/params.cjs +136 -0
- package/dist/converters/generate_content/params.cjs.map +1 -0
- package/dist/converters/generate_content/params.js +132 -0
- package/dist/converters/generate_content/params.js.map +1 -0
- package/dist/{utils → converters/generate_content}/stream_events.cjs +2 -2
- package/dist/converters/generate_content/stream_events.cjs.map +1 -0
- package/dist/{utils → converters/generate_content}/stream_events.js +2 -2
- package/dist/converters/generate_content/stream_events.js.map +1 -0
- package/dist/converters/{tools.cjs → generate_content/tools.cjs} +4 -4
- package/dist/converters/generate_content/tools.cjs.map +1 -0
- package/dist/converters/{tools.js → generate_content/tools.js} +4 -4
- package/dist/converters/generate_content/tools.js.map +1 -0
- package/dist/converters/{params.cjs → shared/params.cjs} +8 -93
- package/dist/converters/shared/params.cjs.map +1 -0
- package/dist/converters/{params.js → shared/params.js} +8 -91
- package/dist/converters/shared/params.js.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/utils/metadata.cjs +8 -0
- package/dist/utils/metadata.cjs.map +1 -1
- package/dist/utils/metadata.js +8 -1
- package/dist/utils/metadata.js.map +1 -1
- package/dist/utils/misc.cjs.map +1 -1
- package/dist/utils/misc.d.cts +2 -1
- package/dist/utils/misc.d.ts +2 -1
- package/dist/utils/misc.js.map +1 -1
- package/package.json +4 -4
- package/dist/converters/messages.cjs.map +0 -1
- package/dist/converters/messages.js.map +0 -1
- package/dist/converters/params.cjs.map +0 -1
- package/dist/converters/params.js.map +0 -1
- package/dist/converters/tools.cjs.map +0 -1
- package/dist/converters/tools.js.map +0 -1
- package/dist/utils/stream_events.cjs.map +0 -1
- package/dist/utils/stream_events.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
//#region src/chat_models/
|
|
2
|
-
export declare namespace
|
|
1
|
+
//#region src/chat_models/api_types/generate_content.d.ts
|
|
2
|
+
export declare namespace GenContent {
|
|
3
3
|
/**
|
|
4
4
|
* Safety setting, affecting the safety-blocking behavior.
|
|
5
5
|
*
|
|
@@ -335,7 +335,7 @@ export declare namespace Gemini {
|
|
|
335
335
|
* Optional. Presence penalty applied to the next token's logprobs if the token has
|
|
336
336
|
* already been seen in the response.
|
|
337
337
|
*
|
|
338
|
-
* This penalty is binary on/off and not
|
|
338
|
+
* This penalty is binary on/off and not dependant on the number of times the
|
|
339
339
|
* token is used (after the first). Use
|
|
340
340
|
* frequency_penalty
|
|
341
341
|
* for a penalty that increases with each use.
|
|
@@ -387,7 +387,7 @@ export declare namespace Gemini {
|
|
|
387
387
|
* Refer to the [JSON text generation
|
|
388
388
|
* guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details.
|
|
389
389
|
*/
|
|
390
|
-
responseSchema?:
|
|
390
|
+
responseSchema?: GenContent.Tools.Schema;
|
|
391
391
|
/**
|
|
392
392
|
* Optional. Seed used in decoding. If not set, the request uses a randomly generated
|
|
393
393
|
* seed.
|
|
@@ -712,15 +712,20 @@ export declare namespace Gemini {
|
|
|
712
712
|
type: Type;
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
715
|
-
*
|
|
715
|
+
* An object that represents a latitude/longitude pair. This is expressed as a
|
|
716
|
+
* pair of doubles to represent degrees latitude and degrees longitude. Unless
|
|
717
|
+
* specified otherwise, this object must conform to the
|
|
718
|
+
* WGS84 standard. Values must be within normalized ranges.
|
|
716
719
|
*/
|
|
717
|
-
interface
|
|
718
|
-
/** Optional. Enables image search. Image bytes are returned. */
|
|
719
|
-
imageSearch?: ImageSearch;
|
|
720
|
+
interface LatLng {
|
|
720
721
|
/**
|
|
721
|
-
*
|
|
722
|
+
* The latitude in degrees. It must be in the range [-90.0, +90.0].
|
|
722
723
|
*/
|
|
723
|
-
|
|
724
|
+
latitude?: number;
|
|
725
|
+
/**
|
|
726
|
+
* The longitude in degrees. It must be in the range [-180.0, +180.0].
|
|
727
|
+
*/
|
|
728
|
+
longitude?: number;
|
|
724
729
|
}
|
|
725
730
|
/**
|
|
726
731
|
* Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
|
@@ -747,28 +752,23 @@ export declare namespace Gemini {
|
|
|
747
752
|
startTime?: string;
|
|
748
753
|
}
|
|
749
754
|
/**
|
|
750
|
-
*
|
|
751
|
-
* pair of doubles to represent degrees latitude and degrees longitude. Unless
|
|
752
|
-
* specified otherwise, this object must conform to the
|
|
753
|
-
* WGS84 standard. Values must be within normalized ranges.
|
|
755
|
+
* Different types of search that can be enabled on the GoogleSearch tool.
|
|
754
756
|
*/
|
|
755
|
-
interface
|
|
756
|
-
/**
|
|
757
|
-
|
|
758
|
-
*/
|
|
759
|
-
latitude?: number;
|
|
757
|
+
interface SearchTypes {
|
|
758
|
+
/** Optional. Enables image search. Image bytes are returned. */
|
|
759
|
+
imageSearch?: ImageSearch;
|
|
760
760
|
/**
|
|
761
|
-
*
|
|
761
|
+
* Optional. Enables web search. Only text results are returned.
|
|
762
762
|
*/
|
|
763
|
-
|
|
763
|
+
webSearch?: WebSearch;
|
|
764
764
|
}
|
|
765
765
|
type Type = "TYPE_UNSPECIFIED" | "STRING" | "NUMBER" | "INTEGER" | "BOOLEAN" | "ARRAY" | "OBJECT" | "NULL" | (string & {});
|
|
766
|
-
/** Image search for grounding and related configurations. */
|
|
767
|
-
interface ImageSearch {}
|
|
768
766
|
/**
|
|
769
767
|
* Standard web search for grounding and related configurations.
|
|
770
768
|
*/
|
|
771
769
|
interface WebSearch {}
|
|
770
|
+
/** Image search for grounding and related configurations. */
|
|
771
|
+
interface ImageSearch {}
|
|
772
772
|
}
|
|
773
773
|
/** Request to generate a completion from the model. */
|
|
774
774
|
interface GenerateContentRequest {
|
|
@@ -835,7 +835,7 @@ export declare namespace Gemini {
|
|
|
835
835
|
* guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode)
|
|
836
836
|
* for a usage example.
|
|
837
837
|
*/
|
|
838
|
-
toolConfig?:
|
|
838
|
+
toolConfig?: GenContent.Tools.ToolConfig;
|
|
839
839
|
/**
|
|
840
840
|
* Optional. A list of `Tools` the `Model` may use to generate the next response.
|
|
841
841
|
*
|
|
@@ -1227,66 +1227,26 @@ export declare namespace Gemini {
|
|
|
1227
1227
|
*/
|
|
1228
1228
|
readonly usageMetadata?: UsageMetadata;
|
|
1229
1229
|
}
|
|
1230
|
-
/**
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
interface Maps {
|
|
1235
|
-
/**
|
|
1236
|
-
* Sources that provide answers about the features of a given place in
|
|
1237
|
-
* Google Maps.
|
|
1238
|
-
*/
|
|
1239
|
-
placeAnswerSources?: PlaceAnswerSources;
|
|
1240
|
-
/**
|
|
1241
|
-
* The ID of the place, in `places/{place_id}` format. A user can use this
|
|
1242
|
-
* ID to look up that place.
|
|
1243
|
-
*/
|
|
1244
|
-
placeId?: string;
|
|
1245
|
-
/** Text description of the place answer. */
|
|
1246
|
-
text?: string;
|
|
1247
|
-
/** Title of the place. */
|
|
1248
|
-
title?: string;
|
|
1249
|
-
/** URI reference of the place. */
|
|
1250
|
-
uri?: string;
|
|
1251
|
-
}
|
|
1252
|
-
/** User provided metadata about the GroundingFact. */
|
|
1253
|
-
interface GroundingChunkCustomMetadata {
|
|
1254
|
-
/** The key of the metadata. */
|
|
1255
|
-
key?: string;
|
|
1230
|
+
/** A citation to a source for a portion of a specific response. */
|
|
1231
|
+
interface CitationSource {
|
|
1232
|
+
/** Optional. End of the attributed segment, exclusive. */
|
|
1233
|
+
endIndex?: number;
|
|
1256
1234
|
/**
|
|
1257
|
-
* Optional.
|
|
1258
|
-
*
|
|
1235
|
+
* Optional. License for the GitHub project that is attributed as a source for segment.
|
|
1236
|
+
*
|
|
1237
|
+
* License info is required for code citations.
|
|
1259
1238
|
*/
|
|
1260
|
-
|
|
1261
|
-
/** Optional. A list of string values for the metadata. */
|
|
1262
|
-
stringListValue?: GroundingChunkStringList;
|
|
1263
|
-
/** Optional. The string value of the metadata. */
|
|
1264
|
-
stringValue?: string;
|
|
1265
|
-
}
|
|
1266
|
-
type ServiceTier = "unspecified" | "standard" | "flex" | "priority" | (string & {});
|
|
1267
|
-
/**
|
|
1268
|
-
* Optional. If specified, the media resolution specified will be used.
|
|
1269
|
-
*/
|
|
1270
|
-
type MediaResolution = "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | (string & {});
|
|
1271
|
-
/**
|
|
1272
|
-
* The output from a server-side `ToolCall` execution. This message contains
|
|
1273
|
-
* the results of a tool invocation that was initiated by a `ToolCall`
|
|
1274
|
-
* from the model. The client should pass this `ToolResponse` back to the API
|
|
1275
|
-
* in a subsequent turn within a `Content` message, along with the corresponding
|
|
1276
|
-
* `ToolCall`.
|
|
1277
|
-
*/
|
|
1278
|
-
interface ToolResponse {
|
|
1239
|
+
license?: string;
|
|
1279
1240
|
/**
|
|
1280
|
-
* Optional.
|
|
1241
|
+
* Optional. Start of segment of the response that is attributed to this source.
|
|
1242
|
+
*
|
|
1243
|
+
* Index indicates the start of the segment, measured in bytes.
|
|
1281
1244
|
*/
|
|
1282
|
-
|
|
1283
|
-
/** Optional. The tool response. */
|
|
1284
|
-
response?: Record<string, unknown>;
|
|
1245
|
+
startIndex?: number;
|
|
1285
1246
|
/**
|
|
1286
|
-
*
|
|
1287
|
-
* corresponding `ToolCall`.
|
|
1247
|
+
* Optional. URI that is attributed as a source for a portion of the text.
|
|
1288
1248
|
*/
|
|
1289
|
-
|
|
1249
|
+
uri?: string;
|
|
1290
1250
|
}
|
|
1291
1251
|
/** Chunk from image search. */
|
|
1292
1252
|
interface Image {
|
|
@@ -1302,25 +1262,11 @@ export declare namespace Gemini {
|
|
|
1302
1262
|
/** The title of the web page that the image is from. */
|
|
1303
1263
|
title?: string;
|
|
1304
1264
|
}
|
|
1305
|
-
/** Chunk from the web. */
|
|
1306
|
-
interface Web {
|
|
1307
|
-
/** Output only. Title of the chunk. */
|
|
1308
|
-
readonly title?: string;
|
|
1309
|
-
/** Output only. URI reference of the chunk. */
|
|
1310
|
-
readonly uri?: string;
|
|
1311
|
-
}
|
|
1312
1265
|
/** The configuration for the prebuilt speaker to use. */
|
|
1313
1266
|
interface PrebuiltVoiceConfig {
|
|
1314
1267
|
/** The name of the preset voice to use. */
|
|
1315
1268
|
voiceName?: string;
|
|
1316
1269
|
}
|
|
1317
|
-
/** URI based data. */
|
|
1318
|
-
interface FileData {
|
|
1319
|
-
/** Required. URI. */
|
|
1320
|
-
fileUri: string;
|
|
1321
|
-
/** Optional. The IANA standard MIME type of the source data. */
|
|
1322
|
-
mimeType?: string;
|
|
1323
|
-
}
|
|
1324
1270
|
/**
|
|
1325
1271
|
* The result output from a `FunctionCall` that contains a string
|
|
1326
1272
|
* representing the `FunctionDeclaration.name` and a structured JSON
|
|
@@ -1371,27 +1317,7 @@ export declare namespace Gemini {
|
|
|
1371
1317
|
*/
|
|
1372
1318
|
willContinue?: boolean;
|
|
1373
1319
|
}
|
|
1374
|
-
|
|
1375
|
-
interface SearchEntryPoint {
|
|
1376
|
-
/**
|
|
1377
|
-
* Optional. Web content snippet that can be embedded in a web page or an app webview.
|
|
1378
|
-
*/
|
|
1379
|
-
renderedContent?: string;
|
|
1380
|
-
/** Optional. Base64 encoded JSON representing array of tuple. */
|
|
1381
|
-
sdkBlob?: string;
|
|
1382
|
-
}
|
|
1383
|
-
/**
|
|
1384
|
-
* The status of the underlying model. This is used to indicate the stage of the
|
|
1385
|
-
* underlying model and the retirement time if applicable.
|
|
1386
|
-
*/
|
|
1387
|
-
interface ModelStatus {
|
|
1388
|
-
/** A message explaining the model status. */
|
|
1389
|
-
message?: string;
|
|
1390
|
-
/** The stage of the underlying model. */
|
|
1391
|
-
modelStage?: ModelStage;
|
|
1392
|
-
/** The time at which the model will be retired. */
|
|
1393
|
-
retirementTime?: string;
|
|
1394
|
-
}
|
|
1320
|
+
type ServiceTier = "unspecified" | "standard" | "flex" | "priority" | (string & {});
|
|
1395
1321
|
/**
|
|
1396
1322
|
* Tool details that the model may use to generate response.
|
|
1397
1323
|
*
|
|
@@ -1405,18 +1331,18 @@ export declare namespace Gemini {
|
|
|
1405
1331
|
/**
|
|
1406
1332
|
* Optional. Enables the model to execute code as part of generation.
|
|
1407
1333
|
*/
|
|
1408
|
-
codeExecution?:
|
|
1334
|
+
codeExecution?: GenContent.Tools.CodeExecution;
|
|
1409
1335
|
/**
|
|
1410
1336
|
* Optional. Tool to support the model interacting directly with the computer.
|
|
1411
1337
|
* If enabled, it automatically populates computer-use specific Function
|
|
1412
1338
|
* Declarations.
|
|
1413
1339
|
*/
|
|
1414
|
-
computerUse?:
|
|
1340
|
+
computerUse?: GenContent.Tools.ComputerUse;
|
|
1415
1341
|
/**
|
|
1416
1342
|
* Optional. FileSearch tool type.
|
|
1417
1343
|
* Tool to retrieve knowledge from Semantic Retrieval corpora.
|
|
1418
1344
|
*/
|
|
1419
|
-
fileSearch?:
|
|
1345
|
+
fileSearch?: GenContent.Tools.FileSearch;
|
|
1420
1346
|
/**
|
|
1421
1347
|
* Optional. A list of `FunctionDeclarations` available to the model that can be used
|
|
1422
1348
|
* for function calling.
|
|
@@ -1431,66 +1357,37 @@ export declare namespace Gemini {
|
|
|
1431
1357
|
* with the Content.role "function" generation context for the next model
|
|
1432
1358
|
* turn.
|
|
1433
1359
|
*/
|
|
1434
|
-
functionDeclarations?: Array<
|
|
1360
|
+
functionDeclarations?: Array<GenContent.Tools.FunctionDeclaration>;
|
|
1435
1361
|
/**
|
|
1436
1362
|
* Optional. Tool that allows grounding the model's response with geospatial context
|
|
1437
1363
|
* related to the user's query.
|
|
1438
1364
|
*/
|
|
1439
|
-
googleMaps?:
|
|
1365
|
+
googleMaps?: GenContent.Tools.GoogleMaps;
|
|
1440
1366
|
/**
|
|
1441
1367
|
* Optional. GoogleSearch tool type.
|
|
1442
1368
|
* Tool to support Google Search in Model. Powered by Google.
|
|
1443
1369
|
*/
|
|
1444
|
-
googleSearch?:
|
|
1370
|
+
googleSearch?: GenContent.Tools.GoogleSearch;
|
|
1445
1371
|
/** Optional. Retrieval tool that is powered by Google search. */
|
|
1446
1372
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
1447
1373
|
/** Optional. MCP Servers to connect to. */
|
|
1448
1374
|
mcpServers?: Array<McpServer>;
|
|
1449
1375
|
/** Optional. Tool to support URL context retrieval. */
|
|
1450
|
-
urlContext?:
|
|
1451
|
-
}
|
|
1452
|
-
/** A citation to a source for a portion of a specific response. */
|
|
1453
|
-
interface CitationSource {
|
|
1454
|
-
/** Optional. End of the attributed segment, exclusive. */
|
|
1455
|
-
endIndex?: number;
|
|
1456
|
-
/**
|
|
1457
|
-
* Optional. License for the GitHub project that is attributed as a source for segment.
|
|
1458
|
-
*
|
|
1459
|
-
* License info is required for code citations.
|
|
1460
|
-
*/
|
|
1461
|
-
license?: string;
|
|
1462
|
-
/**
|
|
1463
|
-
* Optional. Start of segment of the response that is attributed to this source.
|
|
1464
|
-
*
|
|
1465
|
-
* Index indicates the start of the segment, measured in bytes.
|
|
1466
|
-
*/
|
|
1467
|
-
startIndex?: number;
|
|
1468
|
-
/**
|
|
1469
|
-
* Optional. URI that is attributed as a source for a portion of the text.
|
|
1470
|
-
*/
|
|
1471
|
-
uri?: string;
|
|
1376
|
+
urlContext?: GenContent.Tools.UrlContext;
|
|
1472
1377
|
}
|
|
1473
|
-
/**
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
*/
|
|
1478
|
-
interface FunctionCall {
|
|
1479
|
-
/**
|
|
1480
|
-
* Optional. The function parameters and values in JSON object format.
|
|
1481
|
-
*/
|
|
1482
|
-
args?: Record<string, unknown>;
|
|
1483
|
-
/**
|
|
1484
|
-
* Optional. Unique identifier of the function call. If populated, the client to
|
|
1485
|
-
* execute the `function_call` and return the response with the matching `id`.
|
|
1486
|
-
*/
|
|
1487
|
-
id?: string;
|
|
1378
|
+
/** User provided metadata about the GroundingFact. */
|
|
1379
|
+
interface GroundingChunkCustomMetadata {
|
|
1380
|
+
/** The key of the metadata. */
|
|
1381
|
+
key?: string;
|
|
1488
1382
|
/**
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
* length of 128.
|
|
1383
|
+
* Optional. The numeric value of the metadata.
|
|
1384
|
+
* The expected range for this value depends on the specific `key` used.
|
|
1492
1385
|
*/
|
|
1493
|
-
|
|
1386
|
+
numericValue?: number;
|
|
1387
|
+
/** Optional. A list of string values for the metadata. */
|
|
1388
|
+
stringListValue?: GroundingChunkStringList;
|
|
1389
|
+
/** Optional. The string value of the metadata. */
|
|
1390
|
+
stringValue?: string;
|
|
1494
1391
|
}
|
|
1495
1392
|
/**
|
|
1496
1393
|
* Raw media bytes.
|
|
@@ -1511,6 +1408,61 @@ export declare namespace Gemini {
|
|
|
1511
1408
|
*/
|
|
1512
1409
|
mimeType?: string;
|
|
1513
1410
|
}
|
|
1411
|
+
/**
|
|
1412
|
+
* The output from a server-side `ToolCall` execution. This message contains
|
|
1413
|
+
* the results of a tool invocation that was initiated by a `ToolCall`
|
|
1414
|
+
* from the model. The client should pass this `ToolResponse` back to the API
|
|
1415
|
+
* in a subsequent turn within a `Content` message, along with the corresponding
|
|
1416
|
+
* `ToolCall`.
|
|
1417
|
+
*/
|
|
1418
|
+
interface ToolResponse {
|
|
1419
|
+
/**
|
|
1420
|
+
* Optional. The identifier of the tool call this response is for.
|
|
1421
|
+
*/
|
|
1422
|
+
id?: string;
|
|
1423
|
+
/** Optional. The tool response. */
|
|
1424
|
+
response?: Record<string, unknown>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Required. The type of tool that was called, matching the `tool_type` in the
|
|
1427
|
+
* corresponding `ToolCall`.
|
|
1428
|
+
*/
|
|
1429
|
+
toolType: ToolType;
|
|
1430
|
+
}
|
|
1431
|
+
/** Google search entry point. */
|
|
1432
|
+
interface SearchEntryPoint {
|
|
1433
|
+
/**
|
|
1434
|
+
* Optional. Web content snippet that can be embedded in a web page or an app webview.
|
|
1435
|
+
*/
|
|
1436
|
+
renderedContent?: string;
|
|
1437
|
+
/** Optional. Base64 encoded JSON representing array of tuple. */
|
|
1438
|
+
sdkBlob?: string;
|
|
1439
|
+
}
|
|
1440
|
+
/** Chunk from the web. */
|
|
1441
|
+
interface Web {
|
|
1442
|
+
/** Output only. Title of the chunk. */
|
|
1443
|
+
readonly title?: string;
|
|
1444
|
+
/** Output only. URI reference of the chunk. */
|
|
1445
|
+
readonly uri?: string;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* The status of the underlying model. This is used to indicate the stage of the
|
|
1449
|
+
* underlying model and the retirement time if applicable.
|
|
1450
|
+
*/
|
|
1451
|
+
interface ModelStatus {
|
|
1452
|
+
/** A message explaining the model status. */
|
|
1453
|
+
message?: string;
|
|
1454
|
+
/** The stage of the underlying model. */
|
|
1455
|
+
modelStage?: ModelStage;
|
|
1456
|
+
/** The time at which the model will be retired. */
|
|
1457
|
+
retirementTime?: string;
|
|
1458
|
+
}
|
|
1459
|
+
/** URI based data. */
|
|
1460
|
+
interface FileData {
|
|
1461
|
+
/** Required. URI. */
|
|
1462
|
+
fileUri: string;
|
|
1463
|
+
/** Optional. The IANA standard MIME type of the source data. */
|
|
1464
|
+
mimeType?: string;
|
|
1465
|
+
}
|
|
1514
1466
|
/**
|
|
1515
1467
|
* A predicted server-side `ToolCall` returned from the model. This message
|
|
1516
1468
|
* contains information about a tool that the model wants to invoke.
|
|
@@ -1532,13 +1484,61 @@ export declare namespace Gemini {
|
|
|
1532
1484
|
/** Required. The type of tool that was called. */
|
|
1533
1485
|
toolType: ToolType;
|
|
1534
1486
|
}
|
|
1535
|
-
/**
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1487
|
+
/**
|
|
1488
|
+
* A grounding chunk from Google Maps. A Maps chunk corresponds to a single
|
|
1489
|
+
* place.
|
|
1490
|
+
*/
|
|
1491
|
+
interface Maps {
|
|
1492
|
+
/**
|
|
1493
|
+
* Sources that provide answers about the features of a given place in
|
|
1494
|
+
* Google Maps.
|
|
1495
|
+
*/
|
|
1496
|
+
placeAnswerSources?: PlaceAnswerSources;
|
|
1497
|
+
/**
|
|
1498
|
+
* The ID of the place, in `places/{place_id}` format. A user can use this
|
|
1499
|
+
* ID to look up that place.
|
|
1500
|
+
*/
|
|
1501
|
+
placeId?: string;
|
|
1502
|
+
/** Text description of the place answer. */
|
|
1503
|
+
text?: string;
|
|
1504
|
+
/** Title of the place. */
|
|
1505
|
+
title?: string;
|
|
1506
|
+
/** URI reference of the place. */
|
|
1507
|
+
uri?: string;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* A predicted `FunctionCall` returned from the model that contains
|
|
1511
|
+
* a string representing the `FunctionDeclaration.name` with the
|
|
1512
|
+
* arguments and their values.
|
|
1513
|
+
*/
|
|
1514
|
+
interface FunctionCall {
|
|
1515
|
+
/**
|
|
1516
|
+
* Optional. The function parameters and values in JSON object format.
|
|
1517
|
+
*/
|
|
1518
|
+
args?: Record<string, unknown>;
|
|
1519
|
+
/**
|
|
1520
|
+
* Optional. Unique identifier of the function call. If populated, the client to
|
|
1521
|
+
* execute the `function_call` and return the response with the matching `id`.
|
|
1522
|
+
*/
|
|
1523
|
+
id?: string;
|
|
1524
|
+
/**
|
|
1525
|
+
* Required. The name of the function to call.
|
|
1526
|
+
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
|
|
1527
|
+
* length of 128.
|
|
1528
|
+
*/
|
|
1529
|
+
name: string;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* A MCPServer is a server that can be called by the model to perform actions.
|
|
1533
|
+
* It is a server that implements the MCP protocol.
|
|
1534
|
+
* Next ID: 5
|
|
1535
|
+
*/
|
|
1536
|
+
interface McpServer {
|
|
1537
|
+
/** The name of the MCPServer. */
|
|
1538
|
+
name?: string;
|
|
1539
|
+
/** A transport that can stream HTTP requests and responses. */
|
|
1540
|
+
streamableHttpTransport?: StreamableHttpTransport;
|
|
1539
1541
|
}
|
|
1540
|
-
/** Required. The type of tool that was called. */
|
|
1541
|
-
type ToolType = "TOOL_TYPE_UNSPECIFIED" | "GOOGLE_SEARCH_WEB" | "GOOGLE_SEARCH_IMAGE" | "URL_CONTEXT" | "GOOGLE_MAPS" | "FILE_SEARCH" | (string & {});
|
|
1542
1542
|
/**
|
|
1543
1543
|
* A datatype containing media that is part of a `FunctionResponse` message.
|
|
1544
1544
|
*
|
|
@@ -1554,17 +1554,7 @@ export declare namespace Gemini {
|
|
|
1554
1554
|
/** Inline media bytes. */
|
|
1555
1555
|
inlineData?: FunctionResponseBlob;
|
|
1556
1556
|
}
|
|
1557
|
-
|
|
1558
|
-
* A MCPServer is a server that can be called by the model to perform actions.
|
|
1559
|
-
* It is a server that implements the MCP protocol.
|
|
1560
|
-
* Next ID: 5
|
|
1561
|
-
*/
|
|
1562
|
-
interface McpServer {
|
|
1563
|
-
/** The name of the MCPServer. */
|
|
1564
|
-
name?: string;
|
|
1565
|
-
/** A transport that can stream HTTP requests and responses. */
|
|
1566
|
-
streamableHttpTransport?: StreamableHttpTransport;
|
|
1567
|
-
}
|
|
1557
|
+
type ModelStage = "MODEL_STAGE_UNSPECIFIED" | "UNSTABLE_EXPERIMENTAL" | "EXPERIMENTAL" | "PREVIEW" | "STABLE" | "LEGACY" | "DEPRECATED" | "RETIRED" | (string & {});
|
|
1568
1558
|
/**
|
|
1569
1559
|
* Collection of sources that provide answers about the features of a given
|
|
1570
1560
|
* place in Google Maps. Each PlaceAnswerSources message corresponds to a
|
|
@@ -1580,7 +1570,11 @@ export declare namespace Gemini {
|
|
|
1580
1570
|
*/
|
|
1581
1571
|
reviewSnippets?: Array<ReviewSnippet>;
|
|
1582
1572
|
}
|
|
1583
|
-
|
|
1573
|
+
/** A list of string values. */
|
|
1574
|
+
interface GroundingChunkStringList {
|
|
1575
|
+
/** The string values of the list. */
|
|
1576
|
+
values?: Array<string>;
|
|
1577
|
+
}
|
|
1584
1578
|
/**
|
|
1585
1579
|
* Tool to retrieve public web data for grounding, powered by Google.
|
|
1586
1580
|
*/
|
|
@@ -1590,26 +1584,6 @@ export declare namespace Gemini {
|
|
|
1590
1584
|
*/
|
|
1591
1585
|
dynamicRetrievalConfig?: DynamicRetrievalConfig;
|
|
1592
1586
|
}
|
|
1593
|
-
/**
|
|
1594
|
-
* Raw media bytes for function response.
|
|
1595
|
-
*
|
|
1596
|
-
* Text should not be sent as raw bytes, use the 'FunctionResponse.response'
|
|
1597
|
-
* field.
|
|
1598
|
-
*/
|
|
1599
|
-
interface FunctionResponseBlob {
|
|
1600
|
-
/** Raw bytes for media formats. */
|
|
1601
|
-
data?: string;
|
|
1602
|
-
/**
|
|
1603
|
-
* The IANA standard MIME type of the source data.
|
|
1604
|
-
* Examples:
|
|
1605
|
-
* - image/png
|
|
1606
|
-
* - image/jpeg
|
|
1607
|
-
* If an unsupported MIME type is provided, an error will be returned. For a
|
|
1608
|
-
* complete list of supported types, see [Supported file
|
|
1609
|
-
* formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).
|
|
1610
|
-
*/
|
|
1611
|
-
mimeType?: string;
|
|
1612
|
-
}
|
|
1613
1587
|
/**
|
|
1614
1588
|
* A transport that can stream HTTP requests and responses.
|
|
1615
1589
|
* Next ID: 6
|
|
@@ -1633,6 +1607,26 @@ export declare namespace Gemini {
|
|
|
1633
1607
|
*/
|
|
1634
1608
|
url?: string;
|
|
1635
1609
|
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Raw media bytes for function response.
|
|
1612
|
+
*
|
|
1613
|
+
* Text should not be sent as raw bytes, use the 'FunctionResponse.response'
|
|
1614
|
+
* field.
|
|
1615
|
+
*/
|
|
1616
|
+
interface FunctionResponseBlob {
|
|
1617
|
+
/** Raw bytes for media formats. */
|
|
1618
|
+
data?: string;
|
|
1619
|
+
/**
|
|
1620
|
+
* The IANA standard MIME type of the source data.
|
|
1621
|
+
* Examples:
|
|
1622
|
+
* - image/png
|
|
1623
|
+
* - image/jpeg
|
|
1624
|
+
* If an unsupported MIME type is provided, an error will be returned. For a
|
|
1625
|
+
* complete list of supported types, see [Supported file
|
|
1626
|
+
* formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).
|
|
1627
|
+
*/
|
|
1628
|
+
mimeType?: string;
|
|
1629
|
+
}
|
|
1636
1630
|
/**
|
|
1637
1631
|
* Encapsulates a snippet of a user review that answers a question about
|
|
1638
1632
|
* the features of a specific place in Google Maps.
|
|
@@ -1655,6 +1649,12 @@ export declare namespace Gemini {
|
|
|
1655
1649
|
/** The mode of the predictor to be used in dynamic retrieval. */
|
|
1656
1650
|
mode?: "MODE_UNSPECIFIED" | "MODE_DYNAMIC" | (string & {});
|
|
1657
1651
|
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Optional. If specified, the media resolution specified will be used.
|
|
1654
|
+
*/
|
|
1655
|
+
type MediaResolution = "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | (string & {});
|
|
1656
|
+
/** Required. The type of tool that was called. */
|
|
1657
|
+
type ToolType = "TOOL_TYPE_UNSPECIFIED" | "GOOGLE_SEARCH_WEB" | "GOOGLE_SEARCH_IMAGE" | "URL_CONTEXT" | "GOOGLE_MAPS" | "FILE_SEARCH" | (string & {});
|
|
1658
1658
|
}
|
|
1659
1659
|
//#endregion
|
|
1660
|
-
//# sourceMappingURL=
|
|
1660
|
+
//# sourceMappingURL=generate_content.d.ts.map
|