From 5e42176eef31bcd0625559fca36dca62399a95a4 Mon Sep 17 00:00:00 2001 From: Allen Firstenberg Date: Tue, 23 May 2023 13:06:08 -0400 Subject: [PATCH] Feature: Google Vertex AI PaLM Support (#1273) * Initial work implementing access to the Google Vertex AI API and the LLM models available through it. * Refactor into a base class * Prettier * Add chat version of Google Vertex AI LLM. * Add Google Vertex AI classes * Example for Google Vertex AI LLM * Add Google Vertex AI LLM * Documentation * Google Vertex AI Chat example * Fix capitalization typo * Make Google's SDK a peer dependency, move out of main entrypoint * Add convenience method for type equality. * Extensive refactoring to make the Google Vertex AI Chat implementation compliant * Legacy prettier cleanup * Prettier cleanup of refactored code * Refactor to move connection and common types into separate modules. * Refactor to move connection and common types into separate modules. * Refactor to move connection and common types into separate modules. * Change maxTokens to maxOutputTokens. Change configuration for the connection object. Prettier * ChatGoogleVertexAi entry point * GoogleVertexAi tests * GoogleVertexAi example refactoring * Example for ChatGoogleVertexAi Fix and test for determining context and examples. * Documentation for Google VertexAI text and chat models. * Refactor some of ChatGoogleVertexAi to break out some components to be better unit tested. Add unit tests. Fix bugs with context and example generation. Formatting. * Descope PR to just GoogleVertexAI LLM, normalize class names * Small fixes and renames, increase default max token output size * Fix typo in documentation import from examples. I think. * Fix docs --------- Co-authored-by: Jacob Lee --- .../docs/modules/models/llms/integrations.mdx | 25 ++++ examples/src/llms/googlevertexai.ts | 23 +++ langchain/.gitignore | 3 + langchain/package.json | 10 ++ langchain/scripts/create-entrypoints.js | 2 + langchain/src/llms/googlevertexai.ts | 118 +++++++++++++++ .../src/llms/tests/googlevertexai.int.test.ts | 28 ++++ langchain/src/types/googlevertexai-types.ts | 62 ++++++++ .../src/util/googlevertexai-connection.ts | 74 ++++++++++ langchain/tsconfig.json | 1 + yarn.lock | 136 +++++++++++++++++- 11 files changed, 479 insertions(+), 3 deletions(-) create mode 100644 examples/src/llms/googlevertexai.ts create mode 100644 langchain/src/llms/googlevertexai.ts create mode 100644 langchain/src/llms/tests/googlevertexai.int.test.ts create mode 100644 langchain/src/types/googlevertexai-types.ts create mode 100644 langchain/src/util/googlevertexai-connection.ts diff --git a/docs/docs/modules/models/llms/integrations.mdx b/docs/docs/modules/models/llms/integrations.mdx index a2c80992b31b..ca43417eeda3 100644 --- a/docs/docs/modules/models/llms/integrations.mdx +++ b/docs/docs/modules/models/llms/integrations.mdx @@ -42,6 +42,31 @@ const res = await model.call( console.log({ res }); ``` +## Google Vertex AI + +The Vertex AI implementation is meant to be used in Node.js and not +directly in a browser, since it requires a service account to use. + +Before running this code, you should make sure the Vertex AI API is +enabled for the relevant project in your Google Cloud dashboard and that you've authenticated to +Google Cloud using one of these methods: + +- You are logged into an account (using `gcloud auth application-default login`) + permitted to that project. +- You are running on a machine using a service account that is permitted + to the project. +- You have downloaded the credentials for a service account that is permitted + to the project and set the `GOOGLE_APPLICATION_CREDENTIALS` environment + variable to the path of this file. + +```bash npm2yarn +npm install google-auth-library +``` + +import GoogleVertexAIExample from "@examples/llms/googlevertexai.ts"; + +{GoogleVertexAIExample} + ## `HuggingFaceInference` ```bash npm2yarn diff --git a/examples/src/llms/googlevertexai.ts b/examples/src/llms/googlevertexai.ts new file mode 100644 index 000000000000..5dbe61a3c62d --- /dev/null +++ b/examples/src/llms/googlevertexai.ts @@ -0,0 +1,23 @@ +import { GoogleVertexAI } from "langchain/llms/googlevertexai"; + +/* + * Before running this, you should make sure you have created a + * Google Cloud Project that is permitted to the Vertex AI API. + * + * You will also need permission to access this project / API. + * Typically, this is done in one of three ways: + * - You are logged into an account permitted to that project. + * - You are running this on a machine using a service account permitted to + * the project. + * - The `GOOGLE_APPLICATION_CREDENTIALS` environment variable is set to the + * path of a credentials file for a service account permitted to the project. + */ +export const run = async () => { + const model = new GoogleVertexAI({ + temperature: 0.7, + }); + const res = await model.call( + "What would be a good company name a company that makes colorful socks?" + ); + console.log({ res }); +}; diff --git a/langchain/.gitignore b/langchain/.gitignore index 7e1661027c02..971f0585b2bc 100644 --- a/langchain/.gitignore +++ b/langchain/.gitignore @@ -73,6 +73,9 @@ llms/hf.d.ts llms/replicate.cjs llms/replicate.js llms/replicate.d.ts +llms/googlevertexai.cjs +llms/googlevertexai.js +llms/googlevertexai.d.ts llms/sagemaker_endpoint.cjs llms/sagemaker_endpoint.js llms/sagemaker_endpoint.d.ts diff --git a/langchain/package.json b/langchain/package.json index f3bacfefd259..48ef91655dcc 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -85,6 +85,9 @@ "llms/replicate.cjs", "llms/replicate.js", "llms/replicate.d.ts", + "llms/googlevertexai.cjs", + "llms/googlevertexai.js", + "llms/googlevertexai.d.ts", "llms/sagemaker_endpoint.cjs", "llms/sagemaker_endpoint.js", "llms/sagemaker_endpoint.d.ts", @@ -390,6 +393,7 @@ "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", "faiss-node": "^0.1.1", + "google-auth-library": "^8.8.0", "graphql": "^16.6.0", "hnswlib-node": "^1.4.2", "html-to-text": "^9.0.5", @@ -437,6 +441,7 @@ "d3-dsv": "^2.0.0", "epub2": "^3.0.1", "faiss-node": "^0.1.1", + "google-auth-library": "^8.8.0", "hnswlib-node": "^1.4.2", "html-to-text": "^9.0.5", "ignore": "^5.2.0", @@ -736,6 +741,11 @@ "import": "./llms/replicate.js", "require": "./llms/replicate.cjs" }, + "./llms/googlevertexai": { + "types": "./llms/googlevertexai.d.ts", + "import": "./llms/googlevertexai.js", + "require": "./llms/googlevertexai.cjs" + }, "./llms/sagemaker_endpoint": { "types": "./llms/sagemaker_endpoint.d.ts", "import": "./llms/sagemaker_endpoint.js", diff --git a/langchain/scripts/create-entrypoints.js b/langchain/scripts/create-entrypoints.js index cf75d5e88cca..021c985f6896 100644 --- a/langchain/scripts/create-entrypoints.js +++ b/langchain/scripts/create-entrypoints.js @@ -38,6 +38,7 @@ const entrypoints = { "llms/cohere": "llms/cohere", "llms/hf": "llms/hf", "llms/replicate": "llms/replicate", + "llms/googlevertexai": "llms/googlevertexai", "llms/sagemaker_endpoint": "llms/sagemaker_endpoint", // prompts prompts: "prompts/index", @@ -161,6 +162,7 @@ const requiresOptionalDependency = [ "embeddings/hf", "llms/load", "llms/cohere", + "llms/googlevertexai", "llms/hf", "llms/replicate", "llms/sagemaker_endpoint", diff --git a/langchain/src/llms/googlevertexai.ts b/langchain/src/llms/googlevertexai.ts new file mode 100644 index 000000000000..998c16d7ad2a --- /dev/null +++ b/langchain/src/llms/googlevertexai.ts @@ -0,0 +1,118 @@ +import { BaseLLM } from "./base.js"; +import { Generation, LLMResult } from "../schema/index.js"; +import { GoogleVertexAIConnection } from "../util/googlevertexai-connection.js"; +import { + GoogleVertexAIBaseLLMInput, + GoogleVertexAIBasePrediction, + GoogleVertexAILLMResponse, + GoogleVertexAIModelParams, +} from "../types/googlevertexai-types.js"; + +export interface GoogleVertexAITextInput extends GoogleVertexAIBaseLLMInput {} + +interface GoogleVertexAILLMTextInstance { + content: string; +} + +/** + * Models the data returned from the API call + */ +interface TextPrediction extends GoogleVertexAIBasePrediction { + content: string; +} + +/** + * Enables calls to the Google Cloud's Vertex AI API to access + * Large Language Models. + * + * To use, you will need to have one of the following authentication + * methods in place: + * - You are logged into an account permitted to the Google Cloud project + * using Vertex AI. + * - You are running this on a machine using a service account permitted to + * the Google Cloud project using Vertex AI. + * - The `GOOGLE_APPLICATION_CREDENTIALS` environment variable is set to the + * path of a credentials file for a service account permitted to the + * Google Cloud project using Vertex AI. + */ +export class GoogleVertexAI extends BaseLLM implements GoogleVertexAITextInput { + model = "text-bison"; + + temperature = 0.7; + + maxOutputTokens = 1024; + + topP = 0.8; + + topK = 40; + + private connection: GoogleVertexAIConnection< + this["CallOptions"], + GoogleVertexAILLMTextInstance, + TextPrediction + >; + + constructor(fields?: GoogleVertexAITextInput) { + super(fields ?? {}); + + this.model = fields?.model ?? this.model; + this.temperature = fields?.temperature ?? this.temperature; + this.maxOutputTokens = fields?.maxOutputTokens ?? this.maxOutputTokens; + this.topP = fields?.topP ?? this.topP; + this.topK = fields?.topK ?? this.topK; + + this.connection = new GoogleVertexAIConnection( + { ...fields, ...this }, + this.caller + ); + } + + _llmType(): string { + return "googlevertexai"; + } + + async _generate( + prompts: string[], + options: this["ParsedCallOptions"] + ): Promise { + const generations: Generation[][] = await Promise.all( + prompts.map((prompt) => this._generatePrompt(prompt, options)) + ); + return { generations }; + } + + async _generatePrompt( + prompt: string, + options: this["ParsedCallOptions"] + ): Promise { + const instance = this.formatInstance(prompt); + const parameters: GoogleVertexAIModelParams = { + temperature: this.temperature, + topK: this.topK, + topP: this.topP, + maxOutputTokens: this.maxOutputTokens, + }; + const result = await this.connection.request( + [instance], + parameters, + options + ); + const prediction = this.extractPredictionFromResponse(result); + return [ + { + text: prediction.content, + generationInfo: prediction, + }, + ]; + } + + formatInstance(prompt: string): GoogleVertexAILLMTextInstance { + return { content: prompt }; + } + + extractPredictionFromResponse( + result: GoogleVertexAILLMResponse + ): TextPrediction { + return result?.data?.predictions[0]; + } +} diff --git a/langchain/src/llms/tests/googlevertexai.int.test.ts b/langchain/src/llms/tests/googlevertexai.int.test.ts new file mode 100644 index 000000000000..6dab8fd04ba2 --- /dev/null +++ b/langchain/src/llms/tests/googlevertexai.int.test.ts @@ -0,0 +1,28 @@ +import { test } from "@jest/globals"; +import { GoogleVertexAI } from "../googlevertexai.js"; + +test("Test Google Vertex", async () => { + const model = new GoogleVertexAI({ maxOutputTokens: 50 }); + const res = await model.call("1 + 1 = "); + console.log({ res }); +}); + +test("Test Google Vertex generation", async () => { + const model = new GoogleVertexAI({ maxOutputTokens: 50 }); + const res = await model.generate(["1 + 1 = "]); + console.log(JSON.stringify(res, null, 2)); +}); + +test("Test Google Vertex generation", async () => { + const model = new GoogleVertexAI({ maxOutputTokens: 50 }); + const res = await model.generate(["Print hello world."]); + console.log(JSON.stringify(res, null, 2)); +}); + +test("Test Google Vertex generation", async () => { + const model = new GoogleVertexAI({ maxOutputTokens: 50 }); + const res = await model.generate([ + `Translate "I love programming" into Korean.`, + ]); + console.log(JSON.stringify(res, null, 2)); +}); diff --git a/langchain/src/types/googlevertexai-types.ts b/langchain/src/types/googlevertexai-types.ts new file mode 100644 index 000000000000..7aad285f2786 --- /dev/null +++ b/langchain/src/types/googlevertexai-types.ts @@ -0,0 +1,62 @@ +import { BaseLLMParams } from "../llms/index.js"; + +export interface GoogleVertexAIConnectionParams { + /** Hostname for the API call */ + endpoint?: string; + + /** Region where the LLM is stored */ + location?: string; + + /** Model to use */ + model?: string; +} + +export interface GoogleVertexAIModelParams { + /** Sampling temperature to use */ + temperature?: number; + + /** + * Maximum number of tokens to generate in the completion. + */ + maxOutputTokens?: number; + + /** + * Top-p changes how the model selects tokens for output. + * + * Tokens are selected from most probable to least until the sum + * of their probabilities equals the top-p value. + * + * For example, if tokens A, B, and C have a probability of + * .3, .2, and .1 and the top-p value is .5, then the model will + * select either A or B as the next token (using temperature). + */ + topP?: number; + + /** + * Top-k changes how the model selects tokens for output. + * + * A top-k of 1 means the selected token is the most probable among + * all tokens in the model’s vocabulary (also called greedy decoding), + * while a top-k of 3 means that the next token is selected from + * among the 3 most probable tokens (using temperature). + */ + topK?: number; +} + +export interface GoogleVertexAIBaseLLMInput + extends BaseLLMParams, + GoogleVertexAIConnectionParams, + GoogleVertexAIModelParams {} + +export interface GoogleVertexAIBasePrediction { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + safetyAttributes?: any; +} + +export interface GoogleVertexAILLMResponse< + PredictionType extends GoogleVertexAIBasePrediction +> { + data: { + predictions: PredictionType[]; + }; +} diff --git a/langchain/src/util/googlevertexai-connection.ts b/langchain/src/util/googlevertexai-connection.ts new file mode 100644 index 000000000000..89d8b191069a --- /dev/null +++ b/langchain/src/util/googlevertexai-connection.ts @@ -0,0 +1,74 @@ +import { GoogleAuth } from "google-auth-library"; +import { BaseLanguageModelCallOptions } from "../base_language/index.js"; +import { AsyncCaller } from "./async_caller.js"; +import { + GoogleVertexAIBasePrediction, + GoogleVertexAIConnectionParams, + GoogleVertexAILLMResponse, + GoogleVertexAIModelParams, +} from "../types/googlevertexai-types.js"; + +export class GoogleVertexAIConnection< + CallOptions extends BaseLanguageModelCallOptions, + InstanceType, + PredictionType extends GoogleVertexAIBasePrediction +> implements GoogleVertexAIConnectionParams +{ + caller: AsyncCaller; + + endpoint = "us-central1-aiplatform.googleapis.com"; + + location = "us-central1"; + + model: string; + + auth: GoogleAuth; + + constructor( + fields: GoogleVertexAIConnectionParams | undefined, + caller: AsyncCaller + ) { + this.caller = caller; + + this.endpoint = fields?.endpoint ?? this.endpoint; + this.location = fields?.location ?? this.location; + this.model = fields?.model ?? this.model; + + this.auth = new GoogleAuth({ + scopes: "https://www.googleapis.com/auth/cloud-platform", + }); + } + + async request( + instances: [InstanceType], + parameters: GoogleVertexAIModelParams, + options: CallOptions + ): Promise> { + const client = await this.auth.getClient(); + const projectId = await this.auth.getProjectId(); + const url = `https://${this.endpoint}/v1/projects/${projectId}/locations/${this.location}/publishers/google/models/${this.model}:predict`; + const method = "POST" as const; + + const data = { + instances, + parameters, + }; + + const opts = { + url, + method, + data, + }; + + async function _request() { + return client.request(opts); + } + + const response = await this.caller.callWithOptions( + { signal: options.signal }, + _request.bind(client) + ); + + return >response; + } +} diff --git a/langchain/tsconfig.json b/langchain/tsconfig.json index 7e49a2745618..c2b21d6cddc4 100644 --- a/langchain/tsconfig.json +++ b/langchain/tsconfig.json @@ -55,6 +55,7 @@ "src/llms/cohere.ts", "src/llms/hf.ts", "src/llms/replicate.ts", + "src/llms/googlevertexai.ts", "src/llms/sagemaker_endpoint.ts", "src/prompts/index.ts", "src/prompts/load.ts", diff --git a/yarn.lock b/yarn.lock index 91fc08e5a910..0633e61fe6f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9420,6 +9420,13 @@ __metadata: languageName: node linkType: hard +"arrify@npm:^2.0.0": + version: 2.0.1 + resolution: "arrify@npm:2.0.1" + checksum: 067c4c1afd182806a82e4c1cb8acee16ab8b5284fbca1ce29408e6e91281c36bb5b612f6ddfbd40a0f7a7e0c75bf2696eb94c027f6e328d6e9c52465c98e4209 + languageName: node + linkType: hard + "asap@npm:~2.0.3, asap@npm:~2.0.6": version: 2.0.6 resolution: "asap@npm:2.0.6" @@ -9862,7 +9869,7 @@ __metadata: languageName: node linkType: hard -"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": +"base64-js@npm:^1.3.0, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 @@ -9909,6 +9916,13 @@ __metadata: languageName: node linkType: hard +"bignumber.js@npm:^9.0.0": + version: 9.1.1 + resolution: "bignumber.js@npm:9.1.1" + checksum: ad243b7e2f9120b112d670bb3d674128f0bd2ca1745b0a6c9df0433bd2c0252c43e6315d944c2ac07b4c639e7496b425e46842773cf89c6a2dcd4f31e5c4b11e + languageName: node + linkType: hard + "binary-extensions@npm:^2.0.0, binary-extensions@npm:^2.2.0": version: 2.2.0 resolution: "binary-extensions@npm:2.2.0" @@ -10159,6 +10173,13 @@ __metadata: languageName: node linkType: hard +"buffer-equal-constant-time@npm:1.0.1": + version: 1.0.1 + resolution: "buffer-equal-constant-time@npm:1.0.1" + checksum: 80bb945f5d782a56f374b292770901065bad21420e34936ecbe949e57724b4a13874f735850dd1cc61f078773c4fb5493a41391e7bda40d1fa388d6bd80daaab + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -12487,6 +12508,15 @@ __metadata: languageName: node linkType: hard +"ecdsa-sig-formatter@npm:1.0.11, ecdsa-sig-formatter@npm:^1.0.11": + version: 1.0.11 + resolution: "ecdsa-sig-formatter@npm:1.0.11" + dependencies: + safe-buffer: ^5.0.1 + checksum: 207f9ab1c2669b8e65540bce29506134613dd5f122cccf1e6a560f4d63f2732d427d938f8481df175505aad94583bcb32c688737bb39a6df0625f903d6d93c03 + languageName: node + linkType: hard + "ee-first@npm:1.1.1": version: 1.1.1 resolution: "ee-first@npm:1.1.1" @@ -14030,7 +14060,7 @@ __metadata: languageName: node linkType: hard -"extend@npm:^3.0.0": +"extend@npm:^3.0.0, extend@npm:^3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" checksum: a50a8309ca65ea5d426382ff09f33586527882cf532931cb08ca786ea3146c0553310bda688710ff61d7668eba9f96b923fe1420cdf56a2c3eaf30fcab87b515 @@ -14125,6 +14155,13 @@ __metadata: languageName: node linkType: hard +"fast-text-encoding@npm:^1.0.0": + version: 1.0.6 + resolution: "fast-text-encoding@npm:1.0.6" + checksum: 9d58f694314b3283e785bf61954902536da228607ad246905e30256f9ab8331f780ac987e7222c9f5eafd04168d07e12b8054c85cedb76a2c05af0e82387a903 + languageName: node + linkType: hard + "fast-url-parser@npm:1.1.3": version: 1.1.3 resolution: "fast-url-parser@npm:1.1.3" @@ -14673,6 +14710,28 @@ __metadata: languageName: node linkType: hard +"gaxios@npm:^5.0.0, gaxios@npm:^5.0.1": + version: 5.1.0 + resolution: "gaxios@npm:5.1.0" + dependencies: + extend: ^3.0.2 + https-proxy-agent: ^5.0.0 + is-stream: ^2.0.0 + node-fetch: ^2.6.7 + checksum: c3bf9eff0055f9af734380a765afb237ca199b6dedccd888417075c923c94311dcf5217fcb2b908c1121412668959d99c5ef5328827155e51deae6ce579c4473 + languageName: node + linkType: hard + +"gcp-metadata@npm:^5.2.0": + version: 5.2.0 + resolution: "gcp-metadata@npm:5.2.0" + dependencies: + gaxios: ^5.0.0 + json-bigint: ^1.0.0 + checksum: 4e7ed589c814bb79cbf052b0eda1d5e219fbee030f4772eca27ec1e6e1faa85ba0ef3b17ea5c3fd51a54fc5429c924b4edbb260ac147701f211fb9807b893544 + languageName: node + linkType: hard + "generic-pool@npm:3.9.0": version: 3.9.0 resolution: "generic-pool@npm:3.9.0" @@ -14997,6 +15056,34 @@ __metadata: languageName: node linkType: hard +"google-auth-library@npm:^8.8.0": + version: 8.8.0 + resolution: "google-auth-library@npm:8.8.0" + dependencies: + arrify: ^2.0.0 + base64-js: ^1.3.0 + ecdsa-sig-formatter: ^1.0.11 + fast-text-encoding: ^1.0.0 + gaxios: ^5.0.0 + gcp-metadata: ^5.2.0 + gtoken: ^6.1.0 + jws: ^4.0.0 + lru-cache: ^6.0.0 + checksum: 4552805466679e258febc4c0621d401d510df267f2f105957b8925b79c1454d9a2e5d53af211dd90a1848658f608babac7f5bc2f3c536c441ba32ba3641d335d + languageName: node + linkType: hard + +"google-p12-pem@npm:^4.0.0": + version: 4.0.1 + resolution: "google-p12-pem@npm:4.0.1" + dependencies: + node-forge: ^1.3.1 + bin: + gp12-pem: build/src/bin/gp12-pem.js + checksum: 59a5026331ea67455672e83770da29f09d979f02e06cb2227ea5916f8cca437887c2d3869f2602a686dc84437886ae9d2ac010780803cbe8e5f161c2d02d8efd + languageName: node + linkType: hard + "gopd@npm:^1.0.1": version: 1.0.1 resolution: "gopd@npm:1.0.1" @@ -15091,6 +15178,17 @@ __metadata: languageName: node linkType: hard +"gtoken@npm:^6.1.0": + version: 6.1.2 + resolution: "gtoken@npm:6.1.2" + dependencies: + gaxios: ^5.0.1 + google-p12-pem: ^4.0.0 + jws: ^4.0.0 + checksum: cf3210afe2ccee8feaa06f0c7eb942e217244a8563a1d0a71aa3095eea545015896741c1d48654d8de35b7b07579f93e25e5dfe817f06b7e753646b67f7a4ecf + languageName: node + linkType: hard + "gzip-size@npm:^6.0.0": version: 6.0.0 resolution: "gzip-size@npm:6.0.0" @@ -17803,6 +17901,15 @@ __metadata: languageName: node linkType: hard +"json-bigint@npm:^1.0.0": + version: 1.0.0 + resolution: "json-bigint@npm:1.0.0" + dependencies: + bignumber.js: ^9.0.0 + checksum: c67bb93ccb3c291e60eb4b62931403e378906aab113ec1c2a8dd0f9a7f065ad6fd9713d627b732abefae2e244ac9ce1721c7a3142b2979532f12b258634ce6f6 + languageName: node + linkType: hard + "json-buffer@npm:3.0.0": version: 3.0.0 resolution: "json-buffer@npm:3.0.0" @@ -17940,6 +18047,27 @@ __metadata: languageName: node linkType: hard +"jwa@npm:^2.0.0": + version: 2.0.0 + resolution: "jwa@npm:2.0.0" + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: ^5.0.1 + checksum: 8f00b71ad5fe94cb55006d0d19202f8f56889109caada2f7eeb63ca81755769ce87f4f48101967f398462e3b8ae4faebfbd5a0269cb755dead5d63c77ba4d2f1 + languageName: node + linkType: hard + +"jws@npm:^4.0.0": + version: 4.0.0 + resolution: "jws@npm:4.0.0" + dependencies: + jwa: ^2.0.0 + safe-buffer: ^5.0.1 + checksum: d68d07aa6d1b8cb35c363a9bd2b48f15064d342a5d9dc18a250dbbce8dc06bd7e4792516c50baa16b8d14f61167c19e851fd7f66b59ecc68b7f6a013759765f7 + languageName: node + linkType: hard + "keyv@npm:^3.0.0": version: 3.1.0 resolution: "keyv@npm:3.1.0" @@ -18037,6 +18165,7 @@ __metadata: expr-eval: ^2.0.2 faiss-node: ^0.1.1 flat: ^5.0.2 + google-auth-library: ^8.8.0 graphql: ^16.6.0 hnswlib-node: ^1.4.2 html-to-text: ^9.0.5 @@ -18094,6 +18223,7 @@ __metadata: d3-dsv: ^2.0.0 epub2: ^3.0.1 faiss-node: ^0.1.1 + google-auth-library: ^8.8.0 hnswlib-node: ^1.4.2 html-to-text: ^9.0.5 ignore: ^5.2.0 @@ -19658,7 +19788,7 @@ __metadata: languageName: node linkType: hard -"node-forge@npm:^1": +"node-forge@npm:^1, node-forge@npm:^1.3.1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" checksum: 08fb072d3d670599c89a1704b3e9c649ff1b998256737f0e06fbd1a5bf41cae4457ccaee32d95052d80bbafd9ffe01284e078c8071f0267dc9744e51c5ed42a9