Skip to content

Commit

Permalink
fix: a typo in chat session and missed toolConfig on chat start
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705998499
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Dec 13, 2024
1 parent 029eb24 commit b552fea
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.9.2"
".": "1.9.0"
}
26 changes: 0 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
# Changelog

## [1.9.2](https://github.com/googleapis/nodejs-vertexai/compare/v1.9.0...v1.9.2) (2024-12-05)


### Features

* add support for audioTimestamp in GenerationConfig ([#467](https://github.com/googleapis/nodejs-vertexai/issues/467)) ([598d955](https://github.com/googleapis/nodejs-vertexai/commit/598d95580fb8302bced40837b5c4bbebc84946cf))
* enable dynamic retrieval for Google Search Retrieval grounding ([3f9eee6](https://github.com/googleapis/nodejs-vertexai/commit/3f9eee6589967164b8c1b86481468eaa5347afbd))


### Bug Fixes
* fix: extend UsageMetadata interface ([#439](https://github.com/googleapis/nodejs-vertexai/pull/439))
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([df6f040](https://github.com/googleapis/nodejs-vertexai/commit/df6f0406fbaa72cd64a8f51015e51fee88518db8))
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([a3beab1](https://github.com/googleapis/nodejs-vertexai/commit/a3beab1f30540749fbeba40a13327ea078dbed69))
* include cachedContent in generate request ([#469](https://github.com/googleapis/nodejs-vertexai/issues/469)) ([a16b9d4](https://github.com/googleapis/nodejs-vertexai/commit/a16b9d48df1e3d3b8784604de08f28167f3e85bf))
* remove restriction on gsc uri for file data part. ([e694c44](https://github.com/googleapis/nodejs-vertexai/commit/e694c441b456ea7bfb3d09f89c17d71641ef355c))


### Documentation

* Fix link in Part JSDoc([#440](https://github.com/googleapis/nodejs-vertexai/pull/440))


### Miscellaneous Chores

* release as 1.9.2 ([d54a91b](https://github.com/googleapis/nodejs-vertexai/commit/d54a91bce84980ddfa90b38318a789787912833a))

## [1.9.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.8.1...v1.9.0) (2024-10-14)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/vertexai",
"description": "Vertex Generative AI client for Node.js",
"version": "1.9.2",
"version": "1.9.0",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions src/models/chat_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class ChatSession {
): Promise<GenerateContentResult> {
const newContent: Content[] =
formulateNewContentFromSendMessageRequest(request);
const generateContentrequest: GenerateContentRequest = {
const generateContentRequest: GenerateContentRequest = {
contents: this.historyInternal.concat(newContent),
safetySettings: this.safetySettings,
generationConfig: this.generationConfig,
Expand All @@ -141,7 +141,7 @@ export class ChatSession {
this.location,
this.resourcePath,
this.fetchToken(),
generateContentrequest,
generateContentRequest,
this.apiEndpoint,
this.generationConfig,
this.safetySettings,
Expand Down
3 changes: 3 additions & 0 deletions src/models/generative_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export class GenerativeModel {
startChatRequest.safetySettings =
request.safetySettings ?? this.safetySettings;
startChatRequest.tools = request.tools ?? this.tools;
startChatRequest.toolConfig = request.toolConfig ?? this.toolConfig;
startChatRequest.apiEndpoint = request.apiEndpoint ?? this.apiEndpoint;
startChatRequest.systemInstruction =
request.systemInstruction ?? this.systemInstruction;
Expand Down Expand Up @@ -492,6 +493,7 @@ export class GenerativeModelPreview {
publisherModelEndpoint: this.publisherModelEndpoint,
resourcePath: this.resourcePath,
tools: this.tools,
toolConfig: this.toolConfig,
systemInstruction: this.systemInstruction,
cachedContent: this.cachedContent?.name,
};
Expand All @@ -503,6 +505,7 @@ export class GenerativeModelPreview {
startChatRequest.safetySettings =
request.safetySettings ?? this.safetySettings;
startChatRequest.tools = request.tools ?? this.tools;
startChatRequest.toolConfig = request.toolConfig ?? this.toolConfig;
startChatRequest.systemInstruction =
request.systemInstruction ?? this.systemInstruction;
startChatRequest.cachedContent =
Expand Down
2 changes: 1 addition & 1 deletion src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const USER_ROLE = 'user';
export const MODEL_ROLE = 'model';
export const SYSTEM_ROLE = 'system';
const USER_AGENT_PRODUCT = 'model-builder';
const CLIENT_LIBRARY_VERSION = '1.9.2'; // x-release-please-version
const CLIENT_LIBRARY_VERSION = '1.9.0'; // x-release-please-version
const CLIENT_LIBRARY_LANGUAGE = `grpc-node/${CLIENT_LIBRARY_VERSION}`;
export const USER_AGENT = `${USER_AGENT_PRODUCT}/${CLIENT_LIBRARY_VERSION} ${CLIENT_LIBRARY_LANGUAGE}`;
export const CREDENTIAL_ERROR_MESSAGE =
Expand Down

0 comments on commit b552fea

Please sign in to comment.