@google/generative-ai
Advanced tools
Comparing version
@@ -72,3 +72,3 @@ 'use strict'; | ||
*/ | ||
const PACKAGE_VERSION = "0.11.5"; | ||
const PACKAGE_VERSION = "0.12.0"; | ||
const PACKAGE_LOG_HEADER = "genai-js"; | ||
@@ -75,0 +75,0 @@ var Task; |
@@ -73,2 +73,8 @@ /** | ||
responseMimeType?: string; | ||
/** | ||
* Output response schema of the generated candidate text. | ||
* Note: This only applies when the specified `responseMIMEType` supports a schema; currently | ||
* this is limited to `application/json`. | ||
*/ | ||
responseSchema?: ResponseSchema; | ||
} | ||
@@ -222,18 +228,2 @@ /** | ||
/** | ||
* Schema for parameters passed to {@link FunctionDeclaration.parameters}. | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchema { | ||
/** The type of the parameter. */ | ||
type: FunctionDeclarationSchemaType; | ||
/** The format of the parameter. */ | ||
properties: { | ||
[k: string]: FunctionDeclarationSchemaProperty; | ||
}; | ||
/** Optional. Description of the parameter. */ | ||
description?: string; | ||
/** Optional. Array of required parameters. */ | ||
required?: string[]; | ||
} | ||
/** | ||
* Schema is used to define the format of input/output data. | ||
@@ -244,3 +234,3 @@ * Represents a select subset of an OpenAPI 3.0 schema object. | ||
*/ | ||
export interface FunctionDeclarationSchemaProperty { | ||
export interface Schema { | ||
/** | ||
@@ -271,2 +261,30 @@ * Optional. The type of the property. {@link | ||
/** | ||
* Schema for parameters passed to {@link FunctionDeclaration.parameters}. | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchema { | ||
/** The type of the parameter. */ | ||
type: FunctionDeclarationSchemaType; | ||
/** The format of the parameter. */ | ||
properties: { | ||
[k: string]: FunctionDeclarationSchemaProperty; | ||
}; | ||
/** Optional. Description of the parameter. */ | ||
description?: string; | ||
/** Optional. Array of required parameters. */ | ||
required?: string[]; | ||
} | ||
/** | ||
* Schema for top-level function declaration | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchemaProperty extends Schema { | ||
} | ||
/** | ||
* Schema passed to {@link GenerationConfig.responseSchema} | ||
* @public | ||
*/ | ||
export interface ResponseSchema extends Schema { | ||
} | ||
/** | ||
* Tool config. This config is shared for all tools provided in the request. | ||
@@ -273,0 +291,0 @@ * @public |
@@ -328,31 +328,6 @@ /** | ||
/** | ||
* Schema is used to define the format of input/output data. | ||
* Represents a select subset of an OpenAPI 3.0 schema object. | ||
* More fields may be added in the future as needed. | ||
* Schema for top-level function declaration | ||
* @public | ||
*/ | ||
export declare interface FunctionDeclarationSchemaProperty { | ||
/** | ||
* Optional. The type of the property. {@link | ||
* FunctionDeclarationSchemaType}. | ||
*/ | ||
type?: FunctionDeclarationSchemaType; | ||
/** Optional. The format of the property. */ | ||
format?: string; | ||
/** Optional. The description of the property. */ | ||
description?: string; | ||
/** Optional. Whether the property is nullable. */ | ||
nullable?: boolean; | ||
/** Optional. The items of the property. {@link FunctionDeclarationSchema} */ | ||
items?: FunctionDeclarationSchema; | ||
/** Optional. The enum of the property. */ | ||
enum?: string[]; | ||
/** Optional. Map of {@link FunctionDeclarationSchema}. */ | ||
properties?: { | ||
[k: string]: FunctionDeclarationSchema; | ||
}; | ||
/** Optional. Array of required property. */ | ||
required?: string[]; | ||
/** Optional. The example of the property. */ | ||
example?: unknown; | ||
export declare interface FunctionDeclarationSchemaProperty extends Schema { | ||
} | ||
@@ -506,2 +481,8 @@ | ||
responseMimeType?: string; | ||
/** | ||
* Output response schema of the generated candidate text. | ||
* Note: This only applies when the specified `responseMIMEType` supports a schema; currently | ||
* this is limited to `application/json`. | ||
*/ | ||
responseSchema?: ResponseSchema; | ||
} | ||
@@ -728,2 +709,9 @@ | ||
/** | ||
* Schema passed to {@link GenerationConfig.responseSchema} | ||
* @public | ||
*/ | ||
export declare interface ResponseSchema extends Schema { | ||
} | ||
/** | ||
* A safety rating associated with a {@link GenerateContentCandidate} | ||
@@ -747,2 +735,34 @@ * @public | ||
/** | ||
* Schema is used to define the format of input/output data. | ||
* Represents a select subset of an OpenAPI 3.0 schema object. | ||
* More fields may be added in the future as needed. | ||
* @public | ||
*/ | ||
export declare interface Schema { | ||
/** | ||
* Optional. The type of the property. {@link | ||
* FunctionDeclarationSchemaType}. | ||
*/ | ||
type?: FunctionDeclarationSchemaType; | ||
/** Optional. The format of the property. */ | ||
format?: string; | ||
/** Optional. The description of the property. */ | ||
description?: string; | ||
/** Optional. Whether the property is nullable. */ | ||
nullable?: boolean; | ||
/** Optional. The items of the property. {@link FunctionDeclarationSchema} */ | ||
items?: FunctionDeclarationSchema; | ||
/** Optional. The enum of the property. */ | ||
enum?: string[]; | ||
/** Optional. Map of {@link FunctionDeclarationSchema}. */ | ||
properties?: { | ||
[k: string]: FunctionDeclarationSchema; | ||
}; | ||
/** Optional. Array of required property. */ | ||
required?: string[]; | ||
/** Optional. The example of the property. */ | ||
example?: unknown; | ||
} | ||
/** | ||
* Params for {@link GenerativeModel.startChat}. | ||
@@ -749,0 +769,0 @@ * @public |
@@ -250,3 +250,3 @@ 'use strict'; | ||
*/ | ||
const PACKAGE_VERSION = "0.11.5"; | ||
const PACKAGE_VERSION = "0.12.0"; | ||
const PACKAGE_LOG_HEADER = "genai-js"; | ||
@@ -253,0 +253,0 @@ var Task; |
@@ -73,2 +73,8 @@ /** | ||
responseMimeType?: string; | ||
/** | ||
* Output response schema of the generated candidate text. | ||
* Note: This only applies when the specified `responseMIMEType` supports a schema; currently | ||
* this is limited to `application/json`. | ||
*/ | ||
responseSchema?: ResponseSchema; | ||
} | ||
@@ -222,18 +228,2 @@ /** | ||
/** | ||
* Schema for parameters passed to {@link FunctionDeclaration.parameters}. | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchema { | ||
/** The type of the parameter. */ | ||
type: FunctionDeclarationSchemaType; | ||
/** The format of the parameter. */ | ||
properties: { | ||
[k: string]: FunctionDeclarationSchemaProperty; | ||
}; | ||
/** Optional. Description of the parameter. */ | ||
description?: string; | ||
/** Optional. Array of required parameters. */ | ||
required?: string[]; | ||
} | ||
/** | ||
* Schema is used to define the format of input/output data. | ||
@@ -244,3 +234,3 @@ * Represents a select subset of an OpenAPI 3.0 schema object. | ||
*/ | ||
export interface FunctionDeclarationSchemaProperty { | ||
export interface Schema { | ||
/** | ||
@@ -271,2 +261,30 @@ * Optional. The type of the property. {@link | ||
/** | ||
* Schema for parameters passed to {@link FunctionDeclaration.parameters}. | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchema { | ||
/** The type of the parameter. */ | ||
type: FunctionDeclarationSchemaType; | ||
/** The format of the parameter. */ | ||
properties: { | ||
[k: string]: FunctionDeclarationSchemaProperty; | ||
}; | ||
/** Optional. Description of the parameter. */ | ||
description?: string; | ||
/** Optional. Array of required parameters. */ | ||
required?: string[]; | ||
} | ||
/** | ||
* Schema for top-level function declaration | ||
* @public | ||
*/ | ||
export interface FunctionDeclarationSchemaProperty extends Schema { | ||
} | ||
/** | ||
* Schema passed to {@link GenerationConfig.responseSchema} | ||
* @public | ||
*/ | ||
export interface ResponseSchema extends Schema { | ||
} | ||
/** | ||
* Tool config. This config is shared for all tools provided in the request. | ||
@@ -273,0 +291,0 @@ * @public |
{ | ||
"name": "@google/generative-ai", | ||
"version": "0.11.5", | ||
"version": "0.12.0", | ||
"description": "Google AI JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
257701
0.59%6920
0.79%