Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/vertexai

Package Overview
Dependencies
Maintainers
2
Versions
23
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 0.1.2 to 0.1.3

2

.release-please-manifest.json
{
".": "0.1.2"
".": "0.1.3"
}

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

*/
async function postRequest({ region, project, resourcePath, resourceMethod, token, data, apiEndpoint, apiVersion = 'v1beta1', }) {
async function postRequest({ region, project, resourcePath, resourceMethod, token, data, apiEndpoint, apiVersion = 'v1', }) {
const vertexBaseEndpoint = apiEndpoint !== null && apiEndpoint !== void 0 ? apiEndpoint : `${region}-${API_BASE_PATH}`;

@@ -37,7 +37,7 @@ let vertexEndpoint = `https://${vertexBaseEndpoint}/${apiVersion}/projects/${project}/locations/${region}/${resourcePath}:${resourceMethod}`;

headers: {
Authorization: `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
user_agent: content_1.CLIENT_INFO.user_agent,
client_library_language: content_1.CLIENT_INFO.client_library_language,
client_library_version: content_1.CLIENT_INFO.client_library_version,
'User-Agent': content_1.CLIENT_INFO.user_agent,
'client_library_language': content_1.CLIENT_INFO.client_library_language,
'client_library_version': content_1.CLIENT_INFO.client_library_version,
},

@@ -44,0 +44,0 @@ body: JSON.stringify(data),

# Changelog
## [0.1.3](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.2...v0.1.3) (2023-12-13)
### Bug Fixes
* Add samples link to readme ([3a86e85](https://github.com/googleapis/nodejs-vertexai/commit/3a86e85de034479818813e563cef6badd68074ab))
* update header field ([eab8841](https://github.com/googleapis/nodejs-vertexai/commit/eab8841f42679e976d4b1eca8dc083330380daff))
## [0.1.2](https://github.com/googleapis/nodejs-vertexai/compare/v0.1.1...v0.1.2) (2023-12-13)

@@ -4,0 +12,0 @@

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

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

@@ -5,2 +5,3 @@ # Vertex AI Node.js SDK

[See here](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/generative-ai/snippets) for detailed samples using the Vertex AI Node.js SDK.

@@ -10,3 +11,3 @@ ## Before you begin

1. [Select or create a Cloud Platform project](https://console.cloud.google.com/project).
1. [Enable billing for your project](https://console.cloud.google.com/project).
1. [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).
1. [Enable the Vertex AI API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).

@@ -13,0 +14,0 @@ 1. [Set up authentication with a service account](https://cloud.google.com/docs/authentication/getting-started) so you can access the

@@ -38,8 +38,5 @@ /**

apiEndpoint,
apiVersion = 'v1beta1',
apiVersion = 'v1',
}: {
region: string;
project: string;
resourcePath: string;
resourceMethod: string;
region: string; project: string; resourcePath: string; resourceMethod: string;
token: string;

@@ -49,3 +46,3 @@ data: GenerateContentRequest | CountTokensRequest;

apiVersion?: string;
}): Promise<Response | undefined> {
}): Promise<Response|undefined> {
const vertexBaseEndpoint = apiEndpoint ?? `${region}-${API_BASE_PATH}`;

@@ -63,7 +60,7 @@

headers: {
Authorization: `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
user_agent: CLIENT_INFO.user_agent,
client_library_language: CLIENT_INFO.client_library_language,
client_library_version: CLIENT_INFO.client_library_version,
'User-Agent': CLIENT_INFO.user_agent,
'client_library_language': CLIENT_INFO.client_library_language,
'client_library_version': CLIENT_INFO.client_library_version,
},

@@ -70,0 +67,0 @@ body: JSON.stringify(data),

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