New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/vertexai

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/vertexai - npm Package Compare versions

Comparing version 1.8.1 to 1.9.0

2

.release-please-manifest.json
{
".": "1.8.1"
".": "1.9.0"
}

@@ -120,2 +120,3 @@ /**

private readonly systemInstruction?;
private readonly cachedContent?;
getHistory(): Promise<Content[]>;

@@ -122,0 +123,0 @@ /**

@@ -197,2 +197,3 @@ "use strict";

this.requestOptions = requestOptions !== null && requestOptions !== void 0 ? requestOptions : {};
this.cachedContent = request.cachedContent;
if (request.systemInstruction) {

@@ -290,3 +291,3 @@ this.systemInstruction = (0, util_1.formulateSystemInstructionIntoContent)(request.systemInstruction);

const newContent = formulateNewContentFromSendMessageRequest(request);
const generateContentrequest = {
const generateContentRequest = {
contents: this.historyInternal.concat(newContent),

@@ -298,4 +299,5 @@ safetySettings: this.safetySettings,

systemInstruction: this.systemInstruction,
cachedContent: this.cachedContent,
};
const streamGenerateContentResultPromise = (0, generate_content_1.generateContentStream)(this.location, this.resourcePath, this.fetchToken(), generateContentrequest, this.apiEndpoint, this.generationConfig, this.safetySettings, this.tools, this.toolConfig, this.requestOptions).catch(e => {
const streamGenerateContentResultPromise = (0, generate_content_1.generateContentStream)(this.location, this.resourcePath, this.fetchToken(), generateContentRequest, this.apiEndpoint, this.generationConfig, this.safetySettings, this.tools, this.toolConfig, this.requestOptions).catch(e => {
throw e;

@@ -302,0 +304,0 @@ });

@@ -23,3 +23,3 @@ /**

export declare const SYSTEM_ROLE = "system";
export declare const USER_AGENT = "model-builder/1.8.1 grpc-node/1.8.1";
export declare const USER_AGENT = "model-builder/1.9.0 grpc-node/1.9.0";
export declare const CREDENTIAL_ERROR_MESSAGE = "\nUnable to authenticate your request \nDepending on your run time environment, you can get authentication by \n- if in local instance or cloud shell: `!gcloud auth login` \n- if in Colab: \n -`from google.colab import auth` \n -`auth.authenticate_user()` \n- if in service account or other: please follow guidance in https://cloud.google.com/docs/authentication";

@@ -27,3 +27,3 @@ "use strict";

const USER_AGENT_PRODUCT = 'model-builder';
const CLIENT_LIBRARY_VERSION = '1.8.1'; // x-release-please-version
const CLIENT_LIBRARY_VERSION = '1.9.0'; // x-release-please-version
const CLIENT_LIBRARY_LANGUAGE = `grpc-node/${CLIENT_LIBRARY_VERSION}`;

@@ -30,0 +30,0 @@ exports.USER_AGENT = `${USER_AGENT_PRODUCT}/${CLIENT_LIBRARY_VERSION} ${CLIENT_LIBRARY_LANGUAGE}`;

@@ -408,3 +408,3 @@ "use strict";

});
it('in preview should return grounding metadata when passed a VertexRagStore', async () => {
xit('in preview should return grounding metadata when passed a VertexRagStore', async () => {
var _a, _b;

@@ -411,0 +411,0 @@ const request = {

# Changelog
## [1.9.0](https://github.com/googleapis/nodejs-vertexai/compare/v1.8.1...v1.9.0) (2024-10-14)
### Features
* Add Context Cache support for ChatSessionPreview class ([#433](https://github.com/googleapis/nodejs-vertexai/issues/433)) ([f8a3bdf](https://github.com/googleapis/nodejs-vertexai/commit/f8a3bdf55b6ee694a8fd41df29bdba54d7f8cdc2))
### Documentation
* update README ([a052132](https://github.com/googleapis/nodejs-vertexai/commit/a052132b91bad5ee9a42c6fe2057afceab36b542))
## [1.8.1](https://github.com/googleapis/nodejs-vertexai/compare/v1.8.0...v1.8.1) (2024-09-25)

@@ -4,0 +16,0 @@

{
"name": "@google-cloud/vertexai",
"description": "Vertex Generative AI client for Node.js",
"version": "1.8.1",
"version": "1.9.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Google LLC",

@@ -7,3 +7,4 @@ [![NPM Downloads](https://img.shields.io/npm/dm/%40google-cloud%2Fvertexai)](https://www.npmjs.com/package/@google-cloud/vertexai)

The Vertex AI SDK for Node.js lets you use the Vertex AI Gemini API to build
AI-powered features and applications.
AI-powered features and applications. Both TypeScript and JavaScript are supported.
The sample code in this document is written in JavaScript.

@@ -10,0 +11,0 @@ For detailed samples using the Vertex AI Node.js SDK, see the

@@ -274,2 +274,3 @@ /**

private readonly systemInstruction?: Content;
private readonly cachedContent?: string;

@@ -299,2 +300,3 @@ async getHistory(): Promise<Content[]> {

this.requestOptions = requestOptions ?? {};
this.cachedContent = request.cachedContent;
if (request.systemInstruction) {

@@ -428,3 +430,3 @@ this.systemInstruction = formulateSystemInstructionIntoContent(

formulateNewContentFromSendMessageRequest(request);
const generateContentrequest: GenerateContentRequest = {
const generateContentRequest: GenerateContentRequest = {
contents: this.historyInternal.concat(newContent),

@@ -436,2 +438,3 @@ safetySettings: this.safetySettings,

systemInstruction: this.systemInstruction,
cachedContent: this.cachedContent,
};

@@ -443,3 +446,3 @@

this.fetchToken(),
generateContentrequest,
generateContentRequest,
this.apiEndpoint,

@@ -446,0 +449,0 @@ this.generationConfig,

@@ -24,3 +24,3 @@ /**

const USER_AGENT_PRODUCT = 'model-builder';
const CLIENT_LIBRARY_VERSION = '1.8.1'; // x-release-please-version
const CLIENT_LIBRARY_VERSION = '1.9.0'; // x-release-please-version
const CLIENT_LIBRARY_LANGUAGE = `grpc-node/${CLIENT_LIBRARY_VERSION}`;

@@ -27,0 +27,0 @@ export const USER_AGENT = `${USER_AGENT_PRODUCT}/${CLIENT_LIBRARY_VERSION} ${CLIENT_LIBRARY_LANGUAGE}`;

@@ -610,3 +610,3 @@ /**

it('in preview should return grounding metadata when passed a VertexRagStore', async () => {
xit('in preview should return grounding metadata when passed a VertexRagStore', async () => {
const request = {

@@ -613,0 +613,0 @@ contents: [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc