@langchain/google-webauth 0.2.18 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +6 -6
  3. package/README.md +2 -5
  4. package/dist/_virtual/rolldown_runtime.cjs +25 -0
  5. package/dist/auth.cjs +37 -42
  6. package/dist/auth.cjs.map +1 -0
  7. package/dist/auth.d.cts +13 -0
  8. package/dist/auth.d.cts.map +1 -0
  9. package/dist/auth.d.ts +11 -13
  10. package/dist/auth.d.ts.map +1 -0
  11. package/dist/auth.js +36 -41
  12. package/dist/auth.js.map +1 -0
  13. package/dist/chat_models.cjs +21 -19
  14. package/dist/chat_models.cjs.map +1 -0
  15. package/dist/chat_models.d.cts +21 -0
  16. package/dist/chat_models.d.cts.map +1 -0
  17. package/dist/chat_models.d.ts +13 -7
  18. package/dist/chat_models.d.ts.map +1 -0
  19. package/dist/chat_models.js +20 -15
  20. package/dist/chat_models.js.map +1 -0
  21. package/dist/embeddings.cjs +22 -25
  22. package/dist/embeddings.cjs.map +1 -0
  23. package/dist/embeddings.d.cts +22 -0
  24. package/dist/embeddings.d.cts.map +1 -0
  25. package/dist/embeddings.d.ts +14 -8
  26. package/dist/embeddings.d.ts.map +1 -0
  27. package/dist/embeddings.js +21 -21
  28. package/dist/embeddings.js.map +1 -0
  29. package/dist/index.cjs +7 -19
  30. package/dist/index.d.cts +4 -0
  31. package/dist/index.d.ts +4 -3
  32. package/dist/index.js +5 -3
  33. package/dist/llms.cjs +22 -25
  34. package/dist/llms.cjs.map +1 -0
  35. package/dist/llms.d.cts +22 -0
  36. package/dist/llms.d.cts.map +1 -0
  37. package/dist/llms.d.ts +14 -8
  38. package/dist/llms.d.ts.map +1 -0
  39. package/dist/llms.js +21 -21
  40. package/dist/llms.js.map +1 -0
  41. package/dist/types.cjs +9 -17
  42. package/dist/types.d.cts +1 -0
  43. package/dist/types.d.ts +1 -1
  44. package/dist/types.js +1 -1
  45. package/dist/utils.cjs +9 -17
  46. package/dist/utils.d.cts +1 -0
  47. package/dist/utils.d.ts +1 -1
  48. package/dist/utils.js +1 -1
  49. package/package.json +56 -68
  50. package/dist/media.cjs +0 -17
  51. package/dist/media.d.ts +0 -13
  52. package/dist/media.js +0 -12
  53. package/index.cjs +0 -1
  54. package/index.d.cts +0 -1
  55. package/index.d.ts +0 -1
  56. package/index.js +0 -1
  57. package/types.cjs +0 -1
  58. package/types.d.cts +0 -1
  59. package/types.d.ts +0 -1
  60. package/types.js +0 -1
  61. package/utils.cjs +0 -1
  62. package/utils.d.cts +0 -1
  63. package/utils.d.ts +0 -1
  64. package/utils.js +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # @langchain/google-webauth
2
+
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ac0d4fe`](https://github.com/langchain-ai/langchainjs/commit/ac0d4fe3807e05eb2185ae8a36da69498e6163d4)]:
8
+ - @langchain/google-common@1.0.1
9
+
10
+ ## 1.0.0
11
+
12
+ This release updates the package for compatibility with LangChain v1.0. See the v1.0 [release notes](https://docs.langchain.com/oss/javascript/releases/langchain-v1) for details on what's new.
13
+
14
+ ## 0.2.18
15
+
16
+ ### Patch Changes
17
+
18
+ - @langchain/google-common@0.2.18
19
+
20
+ ## 0.2.17
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [4a3f5af]
25
+ - @langchain/google-common@0.2.17
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License
1
+ MIT License
2
2
 
3
- Copyright (c) 2023 LangChain
3
+ Copyright (c) LangChain, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -8,17 +8,15 @@ in an environment variable.
8
8
  If you are running this on the Google Cloud Platform, or in a way
9
9
  where service account credentials can be stored on a file system,
10
10
  consider using the @langchain/google-gauth
11
- package *instead*. You do not need to use both packages. See the
11
+ package _instead_. You do not need to use both packages. See the
12
12
  section on **Authorization** below.
13
13
 
14
-
15
14
  ## Installation
16
15
 
17
16
  ```bash
18
- $ yarn add @langchain/google-webauth
17
+ $ pnpm install @langchain/google-webauth
19
18
  ```
20
19
 
21
-
22
20
  ## Authorization
23
21
 
24
22
  Authorization is either done through the use of an API Key, if it is
@@ -37,4 +35,3 @@ credentials from the first of the following that apply:
37
35
  `GOOGLE_WEB_CREDENTIALS`
38
36
  5. The Service Account credentials that are saved directly into the
39
37
  `GOOGLE_VERTEX_AI_WEB_CREDENTIALS` (deprecated)
40
-
@@ -0,0 +1,25 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+
23
+ //#endregion
24
+
25
+ exports.__toESM = __toESM;
package/dist/auth.cjs CHANGED
@@ -1,43 +1,38 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebGoogleAuth = void 0;
4
- const env_1 = require("@langchain/core/utils/env");
5
- const google_common_1 = require("@langchain/google-common");
6
- const google_1 = require("web-auth-library/google");
7
- class WebGoogleAuth extends google_common_1.GoogleAbstractedFetchClient {
8
- constructor(fields) {
9
- super();
10
- Object.defineProperty(this, "options", {
11
- enumerable: true,
12
- configurable: true,
13
- writable: true,
14
- value: void 0
15
- });
16
- const options = fields?.authOptions;
17
- const accessToken = options?.accessToken;
18
- const credentials = options?.credentials ??
19
- (0, env_1.getEnvironmentVariable)("GOOGLE_WEB_CREDENTIALS") ??
20
- (0, env_1.getEnvironmentVariable)("GOOGLE_VERTEX_AI_WEB_CREDENTIALS");
21
- if (credentials === undefined)
22
- throw new Error(`Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into "authOptions.credentials".`);
23
- this.options = (0, google_common_1.ensureAuthOptionScopes)({ ...options, accessToken, credentials }, "scope", fields?.platformType);
24
- }
25
- get clientType() {
26
- return "webauth";
27
- }
28
- async getProjectId() {
29
- const credentials = (0, google_1.getCredentials)(this.options.credentials);
30
- return credentials.project_id;
31
- }
32
- async request(opts) {
33
- let { accessToken } = this.options;
34
- if (accessToken === undefined) {
35
- accessToken = await (0, google_1.getAccessToken)(this.options);
36
- }
37
- const authHeader = {
38
- Authorization: `Bearer ${accessToken}`,
39
- };
40
- return this._request(opts?.url, opts, authHeader);
41
- }
42
- }
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const __langchain_google_common = require_rolldown_runtime.__toESM(require("@langchain/google-common"));
3
+ const __langchain_core_utils_env = require_rolldown_runtime.__toESM(require("@langchain/core/utils/env"));
4
+ const web_auth_library_google = require_rolldown_runtime.__toESM(require("web-auth-library/google"));
5
+
6
+ //#region src/auth.ts
7
+ var WebGoogleAuth = class extends __langchain_google_common.GoogleAbstractedFetchClient {
8
+ options;
9
+ constructor(fields) {
10
+ super();
11
+ const options = fields?.authOptions;
12
+ const accessToken = options?.accessToken;
13
+ const credentials = options?.credentials ?? (0, __langchain_core_utils_env.getEnvironmentVariable)("GOOGLE_WEB_CREDENTIALS") ?? (0, __langchain_core_utils_env.getEnvironmentVariable)("GOOGLE_VERTEX_AI_WEB_CREDENTIALS");
14
+ if (credentials === void 0) throw new Error(`Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into "authOptions.credentials".`);
15
+ this.options = (0, __langchain_google_common.ensureAuthOptionScopes)({
16
+ ...options,
17
+ accessToken,
18
+ credentials
19
+ }, "scope", fields?.platformType);
20
+ }
21
+ get clientType() {
22
+ return "webauth";
23
+ }
24
+ async getProjectId() {
25
+ const credentials = (0, web_auth_library_google.getCredentials)(this.options.credentials);
26
+ return credentials.project_id;
27
+ }
28
+ async request(opts) {
29
+ let { accessToken } = this.options;
30
+ if (accessToken === void 0) accessToken = await (0, web_auth_library_google.getAccessToken)(this.options);
31
+ const authHeader = { Authorization: `Bearer ${accessToken}` };
32
+ return this._request(opts?.url, opts, authHeader);
33
+ }
34
+ };
35
+
36
+ //#endregion
43
37
  exports.WebGoogleAuth = WebGoogleAuth;
38
+ //# sourceMappingURL=auth.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.cjs","names":["GoogleAbstractedFetchClient","fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined","opts: GoogleAbstractedClientOps"],"sources":["../src/auth.ts"],"sourcesContent":["import { getEnvironmentVariable } from \"@langchain/core/utils/env\";\nimport {\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport {\n getAccessToken,\n getCredentials,\n Credentials,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore CJS type resolution workaround\n} from \"web-auth-library/google\";\n\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\n\nexport class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined) {\n super();\n\n const options = fields?.authOptions;\n const accessToken = options?.accessToken;\n\n const credentials =\n options?.credentials ??\n getEnvironmentVariable(\"GOOGLE_WEB_CREDENTIALS\") ??\n getEnvironmentVariable(\"GOOGLE_VERTEX_AI_WEB_CREDENTIALS\");\n if (credentials === undefined)\n throw new Error(\n `Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into \"authOptions.credentials\".`\n );\n\n this.options = ensureAuthOptionScopes<WebGoogleAuthOptions>(\n { ...options, accessToken, credentials },\n \"scope\",\n fields?.platformType\n );\n }\n\n get clientType(): string {\n return \"webauth\";\n }\n\n async getProjectId(): Promise<string> {\n const credentials = getCredentials(this.options.credentials);\n return credentials.project_id;\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n let { accessToken } = this.options;\n\n if (accessToken === undefined) {\n accessToken = await getAccessToken(this.options);\n }\n\n const authHeader = {\n Authorization: `Bearer ${accessToken}`,\n };\n return this._request(opts?.url, opts, authHeader);\n }\n}\n"],"mappings":";;;;;;AAsBA,IAAa,gBAAb,cAAmCA,sDAA4B;CAC7D;CAEA,YAAYC,QAA8D;EACxE,OAAO;EAEP,MAAM,UAAU,QAAQ;EACxB,MAAM,cAAc,SAAS;EAE7B,MAAM,cACJ,SAAS,sEACc,yBAAyB,2DACzB,mCAAmC;AAC5D,MAAI,gBAAgB,OAClB,OAAM,IAAI,MACR,CAAC,qIAAqI,CAAC;EAG3I,KAAK,gEACH;GAAE,GAAG;GAAS;GAAa;EAAa,GACxC,SACA,QAAQ,aACT;CACF;CAED,IAAI,aAAqB;AACvB,SAAO;CACR;CAED,MAAM,eAAgC;EACpC,MAAM,0DAA6B,KAAK,QAAQ,YAAY;AAC5D,SAAO,YAAY;CACpB;CAED,MAAM,QAAQC,MAAmD;EAC/D,IAAI,EAAE,aAAa,GAAG,KAAK;AAE3B,MAAI,gBAAgB,QAClB,cAAc,kDAAqB,KAAK,QAAQ;EAGlD,MAAM,aAAa,EACjB,eAAe,CAAC,OAAO,EAAE,aAAa,CACvC;AACD,SAAO,KAAK,SAAS,MAAM,KAAK,MAAM,WAAW;CAClD;AACF"}
@@ -0,0 +1,13 @@
1
+ import { GoogleBaseLLMInput } from "@langchain/google-common";
2
+ import { Credentials } from "web-auth-library/google";
3
+
4
+ //#region src/auth.d.ts
5
+ type WebGoogleAuthOptions = {
6
+ credentials: string | Credentials;
7
+ scope?: string | string[];
8
+ accessToken?: string;
9
+ responseModality?: string;
10
+ };
11
+ //#endregion
12
+ export { WebGoogleAuthOptions };
13
+ //# sourceMappingURL=auth.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.cts","names":["GoogleAbstractedClientOps","GoogleAbstractedFetchClient","GoogleBaseLLMInput","Credentials","WebGoogleAuthOptions","WebGoogleAuth","Promise"],"sources":["../src/auth.d.ts"],"sourcesContent":["import { GoogleAbstractedClientOps, GoogleAbstractedFetchClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { Credentials } from \"web-auth-library/google\";\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\nexport declare class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined);\n get clientType(): string;\n getProjectId(): Promise<string>;\n request(opts: GoogleAbstractedClientOps): Promise<unknown>;\n}\n"],"mappings":";;;;KAEYI,oBAAAA;wBACcD;EADdC,KAAAA,CAAAA,EAAAA,MAAAA,GAAAA,MAAoB,EAAA"}
package/dist/auth.d.ts CHANGED
@@ -1,15 +1,13 @@
1
- import { GoogleAbstractedClientOps, GoogleAbstractedFetchClient, GoogleBaseLLMInput } from "@langchain/google-common";
1
+ import { GoogleAbstractedFetchClient, GoogleBaseLLMInput } from "@langchain/google-common";
2
2
  import { Credentials } from "web-auth-library/google";
3
- export type WebGoogleAuthOptions = {
4
- credentials: string | Credentials;
5
- scope?: string | string[];
6
- accessToken?: string;
7
- responseModality?: string;
3
+
4
+ //#region src/auth.d.ts
5
+ type WebGoogleAuthOptions = {
6
+ credentials: string | Credentials;
7
+ scope?: string | string[];
8
+ accessToken?: string;
9
+ responseModality?: string;
8
10
  };
9
- export declare class WebGoogleAuth extends GoogleAbstractedFetchClient {
10
- options: WebGoogleAuthOptions;
11
- constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined);
12
- get clientType(): string;
13
- getProjectId(): Promise<string>;
14
- request(opts: GoogleAbstractedClientOps): Promise<unknown>;
15
- }
11
+ //#endregion
12
+ export { WebGoogleAuthOptions };
13
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","names":["GoogleAbstractedClientOps","GoogleAbstractedFetchClient","GoogleBaseLLMInput","Credentials","WebGoogleAuthOptions","WebGoogleAuth","Promise"],"sources":["../src/auth.d.ts"],"sourcesContent":["import { GoogleAbstractedClientOps, GoogleAbstractedFetchClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { Credentials } from \"web-auth-library/google\";\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\nexport declare class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined);\n get clientType(): string;\n getProjectId(): Promise<string>;\n request(opts: GoogleAbstractedClientOps): Promise<unknown>;\n}\n"],"mappings":";;;;KAEYI,oBAAAA;wBACcD;EADdC,KAAAA,CAAAA,EAAAA,MAAAA,GAAAA,MAAoB,EAAA"}
package/dist/auth.js CHANGED
@@ -1,42 +1,37 @@
1
+ import { GoogleAbstractedFetchClient, ensureAuthOptionScopes } from "@langchain/google-common";
1
2
  import { getEnvironmentVariable } from "@langchain/core/utils/env";
2
- import { ensureAuthOptionScopes, GoogleAbstractedFetchClient, } from "@langchain/google-common";
3
- import { getAccessToken, getCredentials,
4
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5
- // @ts-ignore CJS type resolution workaround
6
- } from "web-auth-library/google";
7
- export class WebGoogleAuth extends GoogleAbstractedFetchClient {
8
- constructor(fields) {
9
- super();
10
- Object.defineProperty(this, "options", {
11
- enumerable: true,
12
- configurable: true,
13
- writable: true,
14
- value: void 0
15
- });
16
- const options = fields?.authOptions;
17
- const accessToken = options?.accessToken;
18
- const credentials = options?.credentials ??
19
- getEnvironmentVariable("GOOGLE_WEB_CREDENTIALS") ??
20
- getEnvironmentVariable("GOOGLE_VERTEX_AI_WEB_CREDENTIALS");
21
- if (credentials === undefined)
22
- throw new Error(`Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into "authOptions.credentials".`);
23
- this.options = ensureAuthOptionScopes({ ...options, accessToken, credentials }, "scope", fields?.platformType);
24
- }
25
- get clientType() {
26
- return "webauth";
27
- }
28
- async getProjectId() {
29
- const credentials = getCredentials(this.options.credentials);
30
- return credentials.project_id;
31
- }
32
- async request(opts) {
33
- let { accessToken } = this.options;
34
- if (accessToken === undefined) {
35
- accessToken = await getAccessToken(this.options);
36
- }
37
- const authHeader = {
38
- Authorization: `Bearer ${accessToken}`,
39
- };
40
- return this._request(opts?.url, opts, authHeader);
41
- }
42
- }
3
+ import { getAccessToken, getCredentials } from "web-auth-library/google";
4
+
5
+ //#region src/auth.ts
6
+ var WebGoogleAuth = class extends GoogleAbstractedFetchClient {
7
+ options;
8
+ constructor(fields) {
9
+ super();
10
+ const options = fields?.authOptions;
11
+ const accessToken = options?.accessToken;
12
+ const credentials = options?.credentials ?? getEnvironmentVariable("GOOGLE_WEB_CREDENTIALS") ?? getEnvironmentVariable("GOOGLE_VERTEX_AI_WEB_CREDENTIALS");
13
+ if (credentials === void 0) throw new Error(`Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into "authOptions.credentials".`);
14
+ this.options = ensureAuthOptionScopes({
15
+ ...options,
16
+ accessToken,
17
+ credentials
18
+ }, "scope", fields?.platformType);
19
+ }
20
+ get clientType() {
21
+ return "webauth";
22
+ }
23
+ async getProjectId() {
24
+ const credentials = getCredentials(this.options.credentials);
25
+ return credentials.project_id;
26
+ }
27
+ async request(opts) {
28
+ let { accessToken } = this.options;
29
+ if (accessToken === void 0) accessToken = await getAccessToken(this.options);
30
+ const authHeader = { Authorization: `Bearer ${accessToken}` };
31
+ return this._request(opts?.url, opts, authHeader);
32
+ }
33
+ };
34
+
35
+ //#endregion
36
+ export { WebGoogleAuth };
37
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","names":["fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined","opts: GoogleAbstractedClientOps"],"sources":["../src/auth.ts"],"sourcesContent":["import { getEnvironmentVariable } from \"@langchain/core/utils/env\";\nimport {\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport {\n getAccessToken,\n getCredentials,\n Credentials,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore CJS type resolution workaround\n} from \"web-auth-library/google\";\n\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\n\nexport class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined) {\n super();\n\n const options = fields?.authOptions;\n const accessToken = options?.accessToken;\n\n const credentials =\n options?.credentials ??\n getEnvironmentVariable(\"GOOGLE_WEB_CREDENTIALS\") ??\n getEnvironmentVariable(\"GOOGLE_VERTEX_AI_WEB_CREDENTIALS\");\n if (credentials === undefined)\n throw new Error(\n `Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into \"authOptions.credentials\".`\n );\n\n this.options = ensureAuthOptionScopes<WebGoogleAuthOptions>(\n { ...options, accessToken, credentials },\n \"scope\",\n fields?.platformType\n );\n }\n\n get clientType(): string {\n return \"webauth\";\n }\n\n async getProjectId(): Promise<string> {\n const credentials = getCredentials(this.options.credentials);\n return credentials.project_id;\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n let { accessToken } = this.options;\n\n if (accessToken === undefined) {\n accessToken = await getAccessToken(this.options);\n }\n\n const authHeader = {\n Authorization: `Bearer ${accessToken}`,\n };\n return this._request(opts?.url, opts, authHeader);\n }\n}\n"],"mappings":";;;;;AAsBA,IAAa,gBAAb,cAAmC,4BAA4B;CAC7D;CAEA,YAAYA,QAA8D;EACxE,OAAO;EAEP,MAAM,UAAU,QAAQ;EACxB,MAAM,cAAc,SAAS;EAE7B,MAAM,cACJ,SAAS,eACT,uBAAuB,yBAAyB,IAChD,uBAAuB,mCAAmC;AAC5D,MAAI,gBAAgB,OAClB,OAAM,IAAI,MACR,CAAC,qIAAqI,CAAC;EAG3I,KAAK,UAAU,uBACb;GAAE,GAAG;GAAS;GAAa;EAAa,GACxC,SACA,QAAQ,aACT;CACF;CAED,IAAI,aAAqB;AACvB,SAAO;CACR;CAED,MAAM,eAAgC;EACpC,MAAM,cAAc,eAAe,KAAK,QAAQ,YAAY;AAC5D,SAAO,YAAY;CACpB;CAED,MAAM,QAAQC,MAAmD;EAC/D,IAAI,EAAE,aAAa,GAAG,KAAK;AAE3B,MAAI,gBAAgB,QAClB,cAAc,MAAM,eAAe,KAAK,QAAQ;EAGlD,MAAM,aAAa,EACjB,eAAe,CAAC,OAAO,EAAE,aAAa,CACvC;AACD,SAAO,KAAK,SAAS,MAAM,KAAK,MAAM,WAAW;CAClD;AACF"}
@@ -1,21 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatGoogle = void 0;
4
- const google_common_1 = require("@langchain/google-common");
5
- const auth_js_1 = require("./auth.cjs");
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_auth = require('./auth.cjs');
3
+ const __langchain_google_common = require_rolldown_runtime.__toESM(require("@langchain/google-common"));
4
+
5
+ //#region src/chat_models.ts
6
6
  /**
7
- * Integration with a chat model.
8
- */
9
- class ChatGoogle extends google_common_1.ChatGoogleBase {
10
- // Used for tracing, replace with the same name as your class
11
- static lc_name() {
12
- return "ChatGoogle";
13
- }
14
- constructor(fields) {
15
- super(fields);
16
- }
17
- buildAbstractedClient(fields) {
18
- return new auth_js_1.WebGoogleAuth(fields);
19
- }
20
- }
7
+ * Integration with a chat model.
8
+ */
9
+ var ChatGoogle = class extends __langchain_google_common.ChatGoogleBase {
10
+ static lc_name() {
11
+ return "ChatGoogle";
12
+ }
13
+ constructor(fields) {
14
+ super(fields);
15
+ }
16
+ buildAbstractedClient(fields) {
17
+ return new require_auth.WebGoogleAuth(fields);
18
+ }
19
+ };
20
+
21
+ //#endregion
21
22
  exports.ChatGoogle = ChatGoogle;
23
+ //# sourceMappingURL=chat_models.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.cjs","names":["ChatGoogleBase","fields?: ChatGoogleInput","fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined","WebGoogleAuth"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { WebGoogleAuth, WebGoogleAuthOptions } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput\n extends ChatGoogleBaseInput<WebGoogleAuthOptions> {}\n\n/**\n * Integration with a chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<WebGoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(fields?: ChatGoogleInput) {\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new WebGoogleAuth(fields);\n }\n}\n"],"mappings":";;;;;;;;AAiBA,IAAa,aAAb,cACUA,yCAEV;CAEE,OAAO,UAAU;AACf,SAAO;CACR;CAED,YAAYC,QAA0B;EACpC,MAAM,OAAO;CACd;CAED,sBACEC,QACwB;AACxB,SAAO,IAAIC,2BAAc;CAC1B;AACF"}
@@ -0,0 +1,21 @@
1
+ import { WebGoogleAuthOptions } from "./auth.cjs";
2
+ import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from "@langchain/google-common";
3
+
4
+ //#region src/chat_models.d.ts
5
+
6
+ /**
7
+ * Input to chat model class.
8
+ */
9
+ interface ChatGoogleInput extends ChatGoogleBaseInput<WebGoogleAuthOptions> {}
10
+ /**
11
+ * Integration with a chat model.
12
+ */
13
+ declare class ChatGoogle extends ChatGoogleBase<WebGoogleAuthOptions> implements ChatGoogleInput {
14
+ // Used for tracing, replace with the same name as your class
15
+ static lc_name(): string;
16
+ constructor(fields?: ChatGoogleInput);
17
+ buildAbstractedClient(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined): GoogleAbstractedClient;
18
+ }
19
+ //#endregion
20
+ export { ChatGoogle, ChatGoogleInput };
21
+ //# sourceMappingURL=chat_models.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.d.cts","names":["ChatGoogleBase","ChatGoogleBaseInput","GoogleAbstractedClient","GoogleBaseLLMInput","WebGoogleAuthOptions","ChatGoogleInput","ChatGoogle"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { WebGoogleAuthOptions } from \"./auth.js\";\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<WebGoogleAuthOptions> {\n}\n/**\n * Integration with a chat model.\n */\nexport declare class ChatGoogle extends ChatGoogleBase<WebGoogleAuthOptions> implements ChatGoogleInput {\n // Used for tracing, replace with the same name as your class\n static lc_name(): string;\n constructor(fields?: ChatGoogleInput);\n buildAbstractedClient(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAgC,UAAfK,eAAAA,SAAwBJ,mBAAT,CAA6BG,oBAA7B,CAAA,CAAA;;AAA4B;AAK5D;AAA+B,cAAVE,UAAAA,SAAmBN,cAAT,CAAwBI,oBAAxB,CAAA,YAAyDC,eAAzD,CAAA;EAAA;EAA4C,OAGlDA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAe,WACaD,CAAAA,MAAAA,CAAAA,EAD5BC,eAC4BD;EAAoB,qBAAvCD,CAAAA,MAAAA,EAAAA,kBAAAA,CAAmBC,oBAAnBD,CAAAA,GAAAA,SAAAA,CAAAA,EAAuDD,sBAAvDC"}
@@ -1,15 +1,21 @@
1
- import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from "@langchain/google-common";
2
1
  import { WebGoogleAuthOptions } from "./auth.js";
2
+ import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from "@langchain/google-common";
3
+
4
+ //#region src/chat_models.d.ts
5
+
3
6
  /**
4
7
  * Input to chat model class.
5
8
  */
6
- export interface ChatGoogleInput extends ChatGoogleBaseInput<WebGoogleAuthOptions> {
7
- }
9
+ interface ChatGoogleInput extends ChatGoogleBaseInput<WebGoogleAuthOptions> {}
8
10
  /**
9
11
  * Integration with a chat model.
10
12
  */
11
- export declare class ChatGoogle extends ChatGoogleBase<WebGoogleAuthOptions> implements ChatGoogleInput {
12
- static lc_name(): string;
13
- constructor(fields?: ChatGoogleInput);
14
- buildAbstractedClient(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined): GoogleAbstractedClient;
13
+ declare class ChatGoogle extends ChatGoogleBase<WebGoogleAuthOptions> implements ChatGoogleInput {
14
+ // Used for tracing, replace with the same name as your class
15
+ static lc_name(): string;
16
+ constructor(fields?: ChatGoogleInput);
17
+ buildAbstractedClient(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined): GoogleAbstractedClient;
15
18
  }
19
+ //#endregion
20
+ export { ChatGoogle, ChatGoogleInput };
21
+ //# sourceMappingURL=chat_models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.d.ts","names":["ChatGoogleBase","ChatGoogleBaseInput","GoogleAbstractedClient","GoogleBaseLLMInput","WebGoogleAuthOptions","ChatGoogleInput","ChatGoogle"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { WebGoogleAuthOptions } from \"./auth.js\";\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<WebGoogleAuthOptions> {\n}\n/**\n * Integration with a chat model.\n */\nexport declare class ChatGoogle extends ChatGoogleBase<WebGoogleAuthOptions> implements ChatGoogleInput {\n // Used for tracing, replace with the same name as your class\n static lc_name(): string;\n constructor(fields?: ChatGoogleInput);\n buildAbstractedClient(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAgC,UAAfK,eAAAA,SAAwBJ,mBAAT,CAA6BG,oBAA7B,CAAA,CAAA;;AAA4B;AAK5D;AAA+B,cAAVE,UAAAA,SAAmBN,cAAT,CAAwBI,oBAAxB,CAAA,YAAyDC,eAAzD,CAAA;EAAA;EAA4C,OAGlDA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAe,WACaD,CAAAA,MAAAA,CAAAA,EAD5BC,eAC4BD;EAAoB,qBAAvCD,CAAAA,MAAAA,EAAAA,kBAAAA,CAAmBC,oBAAnBD,CAAAA,GAAAA,SAAAA,CAAAA,EAAuDD,sBAAvDC"}
@@ -1,17 +1,22 @@
1
- import { ChatGoogleBase, } from "@langchain/google-common";
2
1
  import { WebGoogleAuth } from "./auth.js";
2
+ import { ChatGoogleBase } from "@langchain/google-common";
3
+
4
+ //#region src/chat_models.ts
3
5
  /**
4
- * Integration with a chat model.
5
- */
6
- export class ChatGoogle extends ChatGoogleBase {
7
- // Used for tracing, replace with the same name as your class
8
- static lc_name() {
9
- return "ChatGoogle";
10
- }
11
- constructor(fields) {
12
- super(fields);
13
- }
14
- buildAbstractedClient(fields) {
15
- return new WebGoogleAuth(fields);
16
- }
17
- }
6
+ * Integration with a chat model.
7
+ */
8
+ var ChatGoogle = class extends ChatGoogleBase {
9
+ static lc_name() {
10
+ return "ChatGoogle";
11
+ }
12
+ constructor(fields) {
13
+ super(fields);
14
+ }
15
+ buildAbstractedClient(fields) {
16
+ return new WebGoogleAuth(fields);
17
+ }
18
+ };
19
+
20
+ //#endregion
21
+ export { ChatGoogle };
22
+ //# sourceMappingURL=chat_models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_models.js","names":["fields?: ChatGoogleInput","fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { WebGoogleAuth, WebGoogleAuthOptions } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput\n extends ChatGoogleBaseInput<WebGoogleAuthOptions> {}\n\n/**\n * Integration with a chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<WebGoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(fields?: ChatGoogleInput) {\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new WebGoogleAuth(fields);\n }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,aAAb,cACU,eAEV;CAEE,OAAO,UAAU;AACf,SAAO;CACR;CAED,YAAYA,QAA0B;EACpC,MAAM,OAAO;CACd;CAED,sBACEC,QACwB;AACxB,SAAO,IAAI,cAAc;CAC1B;AACF"}
@@ -1,27 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GoogleEmbeddings = void 0;
4
- const google_common_1 = require("@langchain/google-common");
5
- const auth_js_1 = require("./auth.cjs");
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_auth = require('./auth.cjs');
3
+ const __langchain_google_common = require_rolldown_runtime.__toESM(require("@langchain/google-common"));
4
+
5
+ //#region src/embeddings.ts
6
6
  /**
7
- * Integration with an LLM.
8
- */
9
- class GoogleEmbeddings extends google_common_1.BaseGoogleEmbeddings {
10
- // Used for tracing, replace with the same name as your class
11
- static lc_name() {
12
- return "GoogleEmbeddings";
13
- }
14
- constructor(fields) {
15
- super(fields);
16
- Object.defineProperty(this, "lc_serializable", {
17
- enumerable: true,
18
- configurable: true,
19
- writable: true,
20
- value: true
21
- });
22
- }
23
- buildAbstractedClient(fields) {
24
- return new auth_js_1.WebGoogleAuth(fields);
25
- }
26
- }
7
+ * Integration with an LLM.
8
+ */
9
+ var GoogleEmbeddings = class extends __langchain_google_common.BaseGoogleEmbeddings {
10
+ static lc_name() {
11
+ return "GoogleEmbeddings";
12
+ }
13
+ lc_serializable = true;
14
+ constructor(fields) {
15
+ super(fields);
16
+ }
17
+ buildAbstractedClient(fields) {
18
+ return new require_auth.WebGoogleAuth(fields);
19
+ }
20
+ };
21
+
22
+ //#endregion
27
23
  exports.GoogleEmbeddings = GoogleEmbeddings;
24
+ //# sourceMappingURL=embeddings.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings.cjs","names":["BaseGoogleEmbeddings","fields: GoogleEmbeddingsInput","fields?: GoogleConnectionParams<WebGoogleAuthOptions>","WebGoogleAuth"],"sources":["../src/embeddings.ts"],"sourcesContent":["import {\n GoogleAbstractedClient,\n GoogleConnectionParams,\n BaseGoogleEmbeddings,\n BaseGoogleEmbeddingsParams,\n} from \"@langchain/google-common\";\nimport { WebGoogleAuth, WebGoogleAuthOptions } from \"./auth.js\";\n\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput\n extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {}\n\n/**\n * Integration with an LLM.\n */\nexport class GoogleEmbeddings\n extends BaseGoogleEmbeddings<WebGoogleAuthOptions>\n implements GoogleEmbeddingsInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"GoogleEmbeddings\";\n }\n\n lc_serializable = true;\n\n constructor(fields: GoogleEmbeddingsInput) {\n super(fields);\n }\n\n buildAbstractedClient(\n fields?: GoogleConnectionParams<WebGoogleAuthOptions>\n ): GoogleAbstractedClient {\n return new WebGoogleAuth(fields);\n }\n}\n"],"mappings":";;;;;;;;AAiBA,IAAa,mBAAb,cACUA,+CAEV;CAEE,OAAO,UAAU;AACf,SAAO;CACR;CAED,kBAAkB;CAElB,YAAYC,QAA+B;EACzC,MAAM,OAAO;CACd;CAED,sBACEC,QACwB;AACxB,SAAO,IAAIC,2BAAc;CAC1B;AACF"}
@@ -0,0 +1,22 @@
1
+ import { WebGoogleAuthOptions } from "./auth.cjs";
2
+ import { BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams, GoogleAbstractedClient, GoogleConnectionParams } from "@langchain/google-common";
3
+
4
+ //#region src/embeddings.d.ts
5
+
6
+ /**
7
+ * Input to LLM class.
8
+ */
9
+ interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {}
10
+ /**
11
+ * Integration with an LLM.
12
+ */
13
+ declare class GoogleEmbeddings extends BaseGoogleEmbeddings<WebGoogleAuthOptions> implements GoogleEmbeddingsInput {
14
+ // Used for tracing, replace with the same name as your class
15
+ static lc_name(): string;
16
+ lc_serializable: boolean;
17
+ constructor(fields: GoogleEmbeddingsInput);
18
+ buildAbstractedClient(fields?: GoogleConnectionParams<WebGoogleAuthOptions>): GoogleAbstractedClient;
19
+ }
20
+ //#endregion
21
+ export { GoogleEmbeddings, GoogleEmbeddingsInput };
22
+ //# sourceMappingURL=embeddings.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings.d.cts","names":["GoogleAbstractedClient","GoogleConnectionParams","BaseGoogleEmbeddings","BaseGoogleEmbeddingsParams","WebGoogleAuthOptions","GoogleEmbeddingsInput","GoogleEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { GoogleAbstractedClient, GoogleConnectionParams, BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams } from \"@langchain/google-common\";\nimport { WebGoogleAuthOptions } from \"./auth.js\";\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {\n}\n/**\n * Integration with an LLM.\n */\nexport declare class GoogleEmbeddings extends BaseGoogleEmbeddings<WebGoogleAuthOptions> implements GoogleEmbeddingsInput {\n // Used for tracing, replace with the same name as your class\n static lc_name(): string;\n lc_serializable: boolean;\n constructor(fields: GoogleEmbeddingsInput);\n buildAbstractedClient(fields?: GoogleConnectionParams<WebGoogleAuthOptions>): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAsC,UAArBK,qBAAAA,SAA8BF,0BAAT,CAAoCC,oBAApC,CAAA,CAAA;;AAAmC;AAKzE;AAAqC,cAAhBE,gBAAAA,SAAyBJ,oBAAT,CAA8BE,oBAA9B,CAAA,YAA+DC,qBAA/D,CAAA;EAAA;EAAkD,OAI/DA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAqB,eACaD,EAAAA,OAAAA;EAAoB,WAA3CH,CAAAA,MAAAA,EADXI,qBACWJ;EAAsB,qBAAyBD,CAAAA,MAAAA,CAAAA,EAA/CC,sBAA+CD,CAAxBI,oBAAwBJ,CAAAA,CAAAA,EAAAA,sBAAAA"}
@@ -1,16 +1,22 @@
1
- import { GoogleAbstractedClient, GoogleConnectionParams, BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams } from "@langchain/google-common";
2
1
  import { WebGoogleAuthOptions } from "./auth.js";
2
+ import { BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams, GoogleAbstractedClient, GoogleConnectionParams } from "@langchain/google-common";
3
+
4
+ //#region src/embeddings.d.ts
5
+
3
6
  /**
4
7
  * Input to LLM class.
5
8
  */
6
- export interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {
7
- }
9
+ interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {}
8
10
  /**
9
11
  * Integration with an LLM.
10
12
  */
11
- export declare class GoogleEmbeddings extends BaseGoogleEmbeddings<WebGoogleAuthOptions> implements GoogleEmbeddingsInput {
12
- static lc_name(): string;
13
- lc_serializable: boolean;
14
- constructor(fields: GoogleEmbeddingsInput);
15
- buildAbstractedClient(fields?: GoogleConnectionParams<WebGoogleAuthOptions>): GoogleAbstractedClient;
13
+ declare class GoogleEmbeddings extends BaseGoogleEmbeddings<WebGoogleAuthOptions> implements GoogleEmbeddingsInput {
14
+ // Used for tracing, replace with the same name as your class
15
+ static lc_name(): string;
16
+ lc_serializable: boolean;
17
+ constructor(fields: GoogleEmbeddingsInput);
18
+ buildAbstractedClient(fields?: GoogleConnectionParams<WebGoogleAuthOptions>): GoogleAbstractedClient;
16
19
  }
20
+ //#endregion
21
+ export { GoogleEmbeddings, GoogleEmbeddingsInput };
22
+ //# sourceMappingURL=embeddings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings.d.ts","names":["GoogleAbstractedClient","GoogleConnectionParams","BaseGoogleEmbeddings","BaseGoogleEmbeddingsParams","WebGoogleAuthOptions","GoogleEmbeddingsInput","GoogleEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { GoogleAbstractedClient, GoogleConnectionParams, BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams } from \"@langchain/google-common\";\nimport { WebGoogleAuthOptions } from \"./auth.js\";\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<WebGoogleAuthOptions> {\n}\n/**\n * Integration with an LLM.\n */\nexport declare class GoogleEmbeddings extends BaseGoogleEmbeddings<WebGoogleAuthOptions> implements GoogleEmbeddingsInput {\n // Used for tracing, replace with the same name as your class\n static lc_name(): string;\n lc_serializable: boolean;\n constructor(fields: GoogleEmbeddingsInput);\n buildAbstractedClient(fields?: GoogleConnectionParams<WebGoogleAuthOptions>): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAsC,UAArBK,qBAAAA,SAA8BF,0BAAT,CAAoCC,oBAApC,CAAA,CAAA;;AAAmC;AAKzE;AAAqC,cAAhBE,gBAAAA,SAAyBJ,oBAAT,CAA8BE,oBAA9B,CAAA,YAA+DC,qBAA/D,CAAA;EAAA;EAAkD,OAI/DA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAqB,eACaD,EAAAA,OAAAA;EAAoB,WAA3CH,CAAAA,MAAAA,EADXI,qBACWJ;EAAsB,qBAAyBD,CAAAA,MAAAA,CAAAA,EAA/CC,sBAA+CD,CAAxBI,oBAAwBJ,CAAAA,CAAAA,EAAAA,sBAAAA"}