Skip to content

Commit

Permalink
feat(firebaseml)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### firebaseml:v2beta

The following keys were deleted:
- schemas.GenerationConfig.properties.responseStyle.description
- schemas.GenerationConfig.properties.responseStyle.enum
- schemas.GenerationConfig.properties.responseStyle.enumDescriptions
- schemas.GenerationConfig.properties.responseStyle.type

The following keys were added:
- schemas.GenerateContentRequest.properties.cachedContent.description
- schemas.GenerateContentRequest.properties.cachedContent.type
- schemas.GenerationConfig.properties.responseSchema.$ref
- schemas.GenerationConfig.properties.responseSchema.description
  • Loading branch information
yoshi-automation authored and sofisl committed Jun 3, 2024
1 parent b27c80a commit e0ed8eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
24 changes: 8 additions & 16 deletions discovery/firebaseml-v2beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
}
}
},
"revision": "20240508",
"revision": "20240530",
"rootUrl": "https://firebaseml.googleapis.com/",
"schemas": {
"Blob": {
Expand Down Expand Up @@ -539,6 +539,10 @@
"description": "Request message for [PredictionService.GenerateContent].",
"id": "GenerateContentRequest",
"properties": {
"cachedContent": {
"description": "Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}`",
"type": "string"
},
"contents": {
"description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.",
"items": {
Expand Down Expand Up @@ -627,21 +631,9 @@
"description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.",
"type": "string"
},
"responseStyle": {
"description": "Optional. Control Three levels of creativity in the model output. Default: RESPONSE_STYLE_BALANCED",
"enum": [
"RESPONSE_STYLE_UNSPECIFIED",
"RESPONSE_STYLE_PRECISE",
"RESPONSE_STYLE_BALANCED",
"RESPONSE_STYLE_CREATIVE"
],
"enumDescriptions": [
"response style unspecified.",
"Precise response.",
"Default response style.",
"Creative response style."
],
"type": "string"
"responseSchema": {
"$ref": "Schema",
"description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response."
},
"stopSequences": {
"description": "Optional. Stop sequences.",
Expand Down
8 changes: 6 additions & 2 deletions src/apis/firebaseml/v2beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ export namespace firebaseml_v2beta {
* Request message for [PredictionService.GenerateContent].
*/
export interface Schema$GenerateContentRequest {
/**
* Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project\}/locations/{location\}/cachedContents/{cachedContent\}`
*/
cachedContent?: string | null;
/**
* Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
*/
Expand Down Expand Up @@ -412,9 +416,9 @@ export namespace firebaseml_v2beta {
*/
responseMimeType?: string | null;
/**
* Optional. Control Three levels of creativity in the model output. Default: RESPONSE_STYLE_BALANCED
* Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
*/
responseStyle?: string | null;
responseSchema?: Schema$Schema;
/**
* Optional. Stop sequences.
*/
Expand Down

0 comments on commit e0ed8eb

Please sign in to comment.