@langchain/google-gauth 0.2.18 → 1.0.0
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.
- package/CHANGELOG.md +18 -0
- package/LICENSE +6 -6
- package/README.md +1 -1
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/auth.cjs +31 -87
- package/dist/auth.cjs.map +1 -0
- package/dist/auth.js +30 -79
- package/dist/auth.js.map +1 -0
- package/dist/chat_models.cjs +21 -19
- package/dist/chat_models.cjs.map +1 -0
- package/dist/chat_models.d.cts +21 -0
- package/dist/chat_models.d.cts.map +1 -0
- package/dist/chat_models.d.ts +12 -6
- package/dist/chat_models.d.ts.map +1 -0
- package/dist/chat_models.js +20 -15
- package/dist/chat_models.js.map +1 -0
- package/dist/embeddings.cjs +22 -25
- package/dist/embeddings.cjs.map +1 -0
- package/dist/embeddings.d.cts +22 -0
- package/dist/embeddings.d.cts.map +1 -0
- package/dist/embeddings.d.ts +14 -8
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +21 -21
- package/dist/embeddings.js.map +1 -0
- package/dist/index.cjs +10 -20
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +6 -4
- package/dist/llms.cjs +22 -25
- package/dist/llms.cjs.map +1 -0
- package/dist/llms.d.cts +22 -0
- package/dist/llms.d.cts.map +1 -0
- package/dist/llms.d.ts +13 -7
- package/dist/llms.d.ts.map +1 -0
- package/dist/llms.js +21 -21
- package/dist/llms.js.map +1 -0
- package/dist/media.cjs +19 -16
- package/dist/media.cjs.map +1 -0
- package/dist/media.d.cts +16 -0
- package/dist/media.d.cts.map +1 -0
- package/dist/media.d.ts +12 -9
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +17 -11
- package/dist/media.js.map +1 -0
- package/dist/types.cjs +9 -17
- package/dist/types.d.cts +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utils.cjs +9 -17
- package/dist/utils.d.cts +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +56 -73
- package/dist/auth.d.ts +0 -27
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/types.cjs +0 -1
- package/types.d.cts +0 -1
- package/types.d.ts +0 -1
- package/types.js +0 -1
- package/utils.cjs +0 -1
- package/utils.d.cts +0 -1
- package/utils.d.ts +0 -1
- package/utils.js +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @langchain/google-gauth
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
## 0.2.18
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @langchain/google-common@0.2.18
|
|
12
|
+
|
|
13
|
+
## 0.2.17
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [4a3f5af]
|
|
18
|
+
- @langchain/google-common@0.2.17
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
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
|
-
|
|
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
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -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,88 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
-
nextChunk() {
|
|
34
|
-
return this.baseStream.nextChunk();
|
|
35
|
-
}
|
|
36
|
-
get streamDone() {
|
|
37
|
-
return this.baseStream.streamDone;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.NodeAbstractStream = NodeAbstractStream;
|
|
41
|
-
class NodeJsonStream extends NodeAbstractStream {
|
|
42
|
-
constructor(data) {
|
|
43
|
-
super(new google_common_1.JsonStream(), data);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.NodeJsonStream = NodeJsonStream;
|
|
47
|
-
class NodeSseStream extends NodeAbstractStream {
|
|
48
|
-
constructor(data) {
|
|
49
|
-
super(new google_common_1.SseStream(), data);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.NodeSseStream = NodeSseStream;
|
|
53
|
-
class NodeSseJsonStream extends NodeAbstractStream {
|
|
54
|
-
constructor(data) {
|
|
55
|
-
super(new google_common_1.SseJsonStream(), data);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.NodeSseJsonStream = NodeSseJsonStream;
|
|
59
|
-
class GAuthClient extends google_common_1.GoogleAbstractedFetchClient {
|
|
60
|
-
constructor(fields) {
|
|
61
|
-
super();
|
|
62
|
-
Object.defineProperty(this, "gauth", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true,
|
|
65
|
-
writable: true,
|
|
66
|
-
value: void 0
|
|
67
|
-
});
|
|
68
|
-
const options = (0, google_common_1.ensureAuthOptionScopes)(fields?.authOptions, "scopes", fields?.platformType);
|
|
69
|
-
this.gauth = new google_auth_library_1.GoogleAuth(options);
|
|
70
|
-
this._fetch = async (...args) => {
|
|
71
|
-
const url = args[0];
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
const opts = args[1] ?? {};
|
|
74
|
-
opts.responseType = "stream";
|
|
75
|
-
return await this.gauth.fetch(url, opts);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
get clientType() {
|
|
79
|
-
return "gauth";
|
|
80
|
-
}
|
|
81
|
-
async getProjectId() {
|
|
82
|
-
return this.gauth.getProjectId();
|
|
83
|
-
}
|
|
84
|
-
async request(opts) {
|
|
85
|
-
return this._request(opts?.url, opts, {});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
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 google_auth_library = require_rolldown_runtime.__toESM(require("google-auth-library"));
|
|
4
|
+
|
|
5
|
+
//#region src/auth.ts
|
|
6
|
+
var GAuthClient = class extends __langchain_google_common.GoogleAbstractedFetchClient {
|
|
7
|
+
gauth;
|
|
8
|
+
constructor(fields) {
|
|
9
|
+
super();
|
|
10
|
+
const options = (0, __langchain_google_common.ensureAuthOptionScopes)(fields?.authOptions, "scopes", fields?.platformType);
|
|
11
|
+
this.gauth = new google_auth_library.GoogleAuth(options);
|
|
12
|
+
this._fetch = async (...args) => {
|
|
13
|
+
const url = args[0];
|
|
14
|
+
const opts = args[1] ?? {};
|
|
15
|
+
opts.responseType = "stream";
|
|
16
|
+
return await this.gauth.fetch(url, opts);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
get clientType() {
|
|
20
|
+
return "gauth";
|
|
21
|
+
}
|
|
22
|
+
async getProjectId() {
|
|
23
|
+
return this.gauth.getProjectId();
|
|
24
|
+
}
|
|
25
|
+
async request(opts) {
|
|
26
|
+
return this._request(opts?.url, opts, {});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
88
31
|
exports.GAuthClient = GAuthClient;
|
|
32
|
+
//# sourceMappingURL=auth.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.cjs","names":["GoogleAbstractedFetchClient","fields?: GoogleConnectionParams<GoogleAuthOptions>","GoogleAuth","opts: any","opts: GoogleAbstractedClientOps"],"sources":["../src/auth.ts"],"sourcesContent":["import { Readable } from \"stream\";\nimport {\n AbstractStream,\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleConnectionParams,\n JsonStream,\n SseJsonStream,\n SseStream,\n} from \"@langchain/google-common\";\nimport { GoogleAuth, GoogleAuthOptions } from \"google-auth-library\";\n\nexport class NodeAbstractStream implements AbstractStream {\n private baseStream: AbstractStream;\n\n constructor(baseStream: AbstractStream, data: Readable) {\n this.baseStream = baseStream;\n const decoder = new TextDecoder(\"utf-8\");\n data.on(\"data\", (data) => {\n const text = decoder.decode(data, { stream: true });\n this.appendBuffer(text);\n });\n data.on(\"end\", () => {\n const rest = decoder.decode();\n this.appendBuffer(rest);\n this.closeBuffer();\n });\n }\n\n appendBuffer(data: string): void {\n return this.baseStream.appendBuffer(data);\n }\n\n closeBuffer(): void {\n return this.baseStream.closeBuffer();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextChunk(): Promise<any> {\n return this.baseStream.nextChunk();\n }\n\n get streamDone(): boolean {\n return this.baseStream.streamDone;\n }\n}\n\nexport class NodeJsonStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new JsonStream(), data);\n }\n}\n\nexport class NodeSseStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new SseStream(), data);\n }\n}\n\nexport class NodeSseJsonStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new SseJsonStream(), data);\n }\n}\n\nexport class GAuthClient extends GoogleAbstractedFetchClient {\n gauth: GoogleAuth;\n\n constructor(fields?: GoogleConnectionParams<GoogleAuthOptions>) {\n super();\n const options = ensureAuthOptionScopes<GoogleAuthOptions>(\n fields?.authOptions,\n \"scopes\",\n fields?.platformType\n );\n this.gauth = new GoogleAuth(options);\n this._fetch = async (...args) => {\n const url = args[0];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const opts: any = args[1] ?? {};\n opts.responseType = \"stream\";\n return await this.gauth.fetch(url, opts);\n };\n }\n\n get clientType(): string {\n return \"gauth\";\n }\n\n async getProjectId(): Promise<string> {\n return this.gauth.getProjectId();\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n return this._request(opts?.url, opts, {});\n }\n}\n"],"mappings":";;;;;AAkEA,IAAa,cAAb,cAAiCA,sDAA4B;CAC3D;CAEA,YAAYC,QAAoD;EAC9D,OAAO;EACP,MAAM,gEACJ,QAAQ,aACR,UACA,QAAQ,aACT;EACD,KAAK,QAAQ,IAAIC,+BAAW;EAC5B,KAAK,SAAS,OAAO,GAAG,SAAS;GAC/B,MAAM,MAAM,KAAK;GAEjB,MAAMC,OAAY,KAAK,MAAM,CAAE;GAC/B,KAAK,eAAe;AACpB,UAAO,MAAM,KAAK,MAAM,MAAM,KAAK,KAAK;EACzC;CACF;CAED,IAAI,aAAqB;AACvB,SAAO;CACR;CAED,MAAM,eAAgC;AACpC,SAAO,KAAK,MAAM,cAAc;CACjC;CAED,MAAM,QAAQC,MAAmD;AAC/D,SAAO,KAAK,SAAS,MAAM,KAAK,MAAM,CAAE,EAAC;CAC1C;AACF"}
|
package/dist/auth.js
CHANGED
|
@@ -1,80 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GoogleAbstractedFetchClient, ensureAuthOptionScopes } from "@langchain/google-common";
|
|
2
2
|
import { GoogleAuth } from "google-auth-library";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
get streamDone() {
|
|
34
|
-
return this.baseStream.streamDone;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export class NodeJsonStream extends NodeAbstractStream {
|
|
38
|
-
constructor(data) {
|
|
39
|
-
super(new JsonStream(), data);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export class NodeSseStream extends NodeAbstractStream {
|
|
43
|
-
constructor(data) {
|
|
44
|
-
super(new SseStream(), data);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export class NodeSseJsonStream extends NodeAbstractStream {
|
|
48
|
-
constructor(data) {
|
|
49
|
-
super(new SseJsonStream(), data);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export class GAuthClient extends GoogleAbstractedFetchClient {
|
|
53
|
-
constructor(fields) {
|
|
54
|
-
super();
|
|
55
|
-
Object.defineProperty(this, "gauth", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: void 0
|
|
60
|
-
});
|
|
61
|
-
const options = ensureAuthOptionScopes(fields?.authOptions, "scopes", fields?.platformType);
|
|
62
|
-
this.gauth = new GoogleAuth(options);
|
|
63
|
-
this._fetch = async (...args) => {
|
|
64
|
-
const url = args[0];
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
|
-
const opts = args[1] ?? {};
|
|
67
|
-
opts.responseType = "stream";
|
|
68
|
-
return await this.gauth.fetch(url, opts);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
get clientType() {
|
|
72
|
-
return "gauth";
|
|
73
|
-
}
|
|
74
|
-
async getProjectId() {
|
|
75
|
-
return this.gauth.getProjectId();
|
|
76
|
-
}
|
|
77
|
-
async request(opts) {
|
|
78
|
-
return this._request(opts?.url, opts, {});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
3
|
+
|
|
4
|
+
//#region src/auth.ts
|
|
5
|
+
var GAuthClient = class extends GoogleAbstractedFetchClient {
|
|
6
|
+
gauth;
|
|
7
|
+
constructor(fields) {
|
|
8
|
+
super();
|
|
9
|
+
const options = ensureAuthOptionScopes(fields?.authOptions, "scopes", fields?.platformType);
|
|
10
|
+
this.gauth = new GoogleAuth(options);
|
|
11
|
+
this._fetch = async (...args) => {
|
|
12
|
+
const url = args[0];
|
|
13
|
+
const opts = args[1] ?? {};
|
|
14
|
+
opts.responseType = "stream";
|
|
15
|
+
return await this.gauth.fetch(url, opts);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
get clientType() {
|
|
19
|
+
return "gauth";
|
|
20
|
+
}
|
|
21
|
+
async getProjectId() {
|
|
22
|
+
return this.gauth.getProjectId();
|
|
23
|
+
}
|
|
24
|
+
async request(opts) {
|
|
25
|
+
return this._request(opts?.url, opts, {});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { GAuthClient };
|
|
31
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","names":["fields?: GoogleConnectionParams<GoogleAuthOptions>","opts: any","opts: GoogleAbstractedClientOps"],"sources":["../src/auth.ts"],"sourcesContent":["import { Readable } from \"stream\";\nimport {\n AbstractStream,\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleConnectionParams,\n JsonStream,\n SseJsonStream,\n SseStream,\n} from \"@langchain/google-common\";\nimport { GoogleAuth, GoogleAuthOptions } from \"google-auth-library\";\n\nexport class NodeAbstractStream implements AbstractStream {\n private baseStream: AbstractStream;\n\n constructor(baseStream: AbstractStream, data: Readable) {\n this.baseStream = baseStream;\n const decoder = new TextDecoder(\"utf-8\");\n data.on(\"data\", (data) => {\n const text = decoder.decode(data, { stream: true });\n this.appendBuffer(text);\n });\n data.on(\"end\", () => {\n const rest = decoder.decode();\n this.appendBuffer(rest);\n this.closeBuffer();\n });\n }\n\n appendBuffer(data: string): void {\n return this.baseStream.appendBuffer(data);\n }\n\n closeBuffer(): void {\n return this.baseStream.closeBuffer();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextChunk(): Promise<any> {\n return this.baseStream.nextChunk();\n }\n\n get streamDone(): boolean {\n return this.baseStream.streamDone;\n }\n}\n\nexport class NodeJsonStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new JsonStream(), data);\n }\n}\n\nexport class NodeSseStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new SseStream(), data);\n }\n}\n\nexport class NodeSseJsonStream extends NodeAbstractStream {\n constructor(data: Readable) {\n super(new SseJsonStream(), data);\n }\n}\n\nexport class GAuthClient extends GoogleAbstractedFetchClient {\n gauth: GoogleAuth;\n\n constructor(fields?: GoogleConnectionParams<GoogleAuthOptions>) {\n super();\n const options = ensureAuthOptionScopes<GoogleAuthOptions>(\n fields?.authOptions,\n \"scopes\",\n fields?.platformType\n );\n this.gauth = new GoogleAuth(options);\n this._fetch = async (...args) => {\n const url = args[0];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const opts: any = args[1] ?? {};\n opts.responseType = \"stream\";\n return await this.gauth.fetch(url, opts);\n };\n }\n\n get clientType(): string {\n return \"gauth\";\n }\n\n async getProjectId(): Promise<string> {\n return this.gauth.getProjectId();\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n return this._request(opts?.url, opts, {});\n }\n}\n"],"mappings":";;;;AAkEA,IAAa,cAAb,cAAiC,4BAA4B;CAC3D;CAEA,YAAYA,QAAoD;EAC9D,OAAO;EACP,MAAM,UAAU,uBACd,QAAQ,aACR,UACA,QAAQ,aACT;EACD,KAAK,QAAQ,IAAI,WAAW;EAC5B,KAAK,SAAS,OAAO,GAAG,SAAS;GAC/B,MAAM,MAAM,KAAK;GAEjB,MAAMC,OAAY,KAAK,MAAM,CAAE;GAC/B,KAAK,eAAe;AACpB,UAAO,MAAM,KAAK,MAAM,MAAM,KAAK,KAAK;EACzC;CACF;CAED,IAAI,aAAqB;AACvB,SAAO;CACR;CAED,MAAM,eAAgC;AACpC,SAAO,KAAK,MAAM,cAAc;CACjC;CAED,MAAM,QAAQC,MAAmD;AAC/D,SAAO,KAAK,SAAS,MAAM,KAAK,MAAM,CAAE,EAAC;CAC1C;AACF"}
|
package/dist/chat_models.cjs
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
* Integration with a Google 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.GAuthClient(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<GoogleAuthOptions> | undefined","GAuthClient"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput\n extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\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<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;;AAkBA,IAAa,aAAb,cACUA,yCAEV;CAEE,OAAO,UAAU;AACf,SAAO;CACR;CAED,YAAYC,QAA0B;EACpC,MAAM,OAAO;CACd;CAED,sBACEC,QACwB;AACxB,SAAO,IAAIC,yBAAY;CACxB;AACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from "@langchain/google-common";
|
|
2
|
+
import { GoogleAuthOptions } from "google-auth-library";
|
|
3
|
+
|
|
4
|
+
//#region src/chat_models.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Input to chat model class.
|
|
8
|
+
*/
|
|
9
|
+
interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}
|
|
10
|
+
/**
|
|
11
|
+
* Integration with a Google chat model.
|
|
12
|
+
*/
|
|
13
|
+
declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> 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<GoogleAuthOptions> | 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","GoogleAuthOptions","ChatGoogleInput","ChatGoogle"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {\n}\n/**\n * Integration with a Google chat model.\n */\nexport declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> 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<GoogleAuthOptions> | undefined): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAgC,UAAfK,eAAAA,SAAwBJ,mBAAT,CAA6BG,iBAA7B,CAAA,CAAA;;AAA4B;AAK5D;AAA+B,cAAVE,UAAAA,SAAmBN,cAAT,CAAwBI,iBAAxB,CAAA,YAAsDC,eAAtD,CAAA;EAAA;EAAyC,OAG/CA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAe,WACaD,CAAAA,MAAAA,CAAAA,EAD5BC,eAC4BD;EAAiB,qBAApCD,CAAAA,MAAAA,EAAAA,kBAAAA,CAAmBC,iBAAnBD,CAAAA,GAAAA,SAAAA,CAAAA,EAAoDD,sBAApDC"}
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from "@langchain/google-common";
|
|
2
2
|
import { GoogleAuthOptions } from "google-auth-library";
|
|
3
|
+
|
|
4
|
+
//#region src/chat_models.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Input to chat model class.
|
|
5
8
|
*/
|
|
6
|
-
|
|
7
|
-
}
|
|
9
|
+
interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}
|
|
8
10
|
/**
|
|
9
11
|
* Integration with a Google chat model.
|
|
10
12
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> 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<GoogleAuthOptions> | 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","GoogleAuthOptions","ChatGoogleInput","ChatGoogle"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { ChatGoogleBase, ChatGoogleBaseInput, GoogleAbstractedClient, GoogleBaseLLMInput } from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {\n}\n/**\n * Integration with a Google chat model.\n */\nexport declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> 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<GoogleAuthOptions> | undefined): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAgC,UAAfK,eAAAA,SAAwBJ,mBAAT,CAA6BG,iBAA7B,CAAA,CAAA;;AAA4B;AAK5D;AAA+B,cAAVE,UAAAA,SAAmBN,cAAT,CAAwBI,iBAAxB,CAAA,YAAsDC,eAAtD,CAAA;EAAA;EAAyC,OAG/CA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAe,WACaD,CAAAA,MAAAA,CAAAA,EAD5BC,eAC4BD;EAAiB,qBAApCD,CAAAA,MAAAA,EAAAA,kBAAAA,CAAmBC,iBAAnBD,CAAAA,GAAAA,SAAAA,CAAAA,EAAoDD,sBAApDC"}
|
package/dist/chat_models.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { ChatGoogleBase, } from "@langchain/google-common";
|
|
2
1
|
import { GAuthClient } from "./auth.js";
|
|
2
|
+
import { ChatGoogleBase } from "@langchain/google-common";
|
|
3
|
+
|
|
4
|
+
//#region src/chat_models.ts
|
|
3
5
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
* Integration with a Google 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 GAuthClient(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<GoogleAuthOptions> | undefined"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput\n extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\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<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;AAkBA,IAAa,aAAb,cACU,eAEV;CAEE,OAAO,UAAU;AACf,SAAO;CACR;CAED,YAAYA,QAA0B;EACpC,MAAM,OAAO;CACd;CAED,sBACEC,QACwB;AACxB,SAAO,IAAI,YAAY;CACxB;AACF"}
|
package/dist/embeddings.cjs
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
buildAbstractedClient(fields) {
|
|
24
|
-
return new auth_js_1.GAuthClient(fields);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
7
|
+
* Integration with an Google embeddings model.
|
|
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.GAuthClient(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<GoogleAuthOptions>","GAuthClient"],"sources":["../src/embeddings.ts"],"sourcesContent":["import {\n GoogleAbstractedClient,\n GoogleConnectionParams,\n BaseGoogleEmbeddings,\n BaseGoogleEmbeddingsParams,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput\n extends BaseGoogleEmbeddingsParams<GoogleAuthOptions> {}\n\n/**\n * Integration with an Google embeddings model.\n */\nexport class GoogleEmbeddings\n extends BaseGoogleEmbeddings<GoogleAuthOptions>\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<GoogleAuthOptions>\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;;AAkBA,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,yBAAY;CACxB;AACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams, GoogleAbstractedClient, GoogleConnectionParams } from "@langchain/google-common";
|
|
2
|
+
import { GoogleAuthOptions } from "google-auth-library";
|
|
3
|
+
|
|
4
|
+
//#region src/embeddings.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Input to LLM class.
|
|
8
|
+
*/
|
|
9
|
+
interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<GoogleAuthOptions> {}
|
|
10
|
+
/**
|
|
11
|
+
* Integration with an Google embeddings model.
|
|
12
|
+
*/
|
|
13
|
+
declare class GoogleEmbeddings extends BaseGoogleEmbeddings<GoogleAuthOptions> 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<GoogleAuthOptions>): 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","GoogleAuthOptions","GoogleEmbeddingsInput","GoogleEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { GoogleAbstractedClient, GoogleConnectionParams, BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams } from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<GoogleAuthOptions> {\n}\n/**\n * Integration with an Google embeddings model.\n */\nexport declare class GoogleEmbeddings extends BaseGoogleEmbeddings<GoogleAuthOptions> 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<GoogleAuthOptions>): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAsC,UAArBK,qBAAAA,SAA8BF,0BAAT,CAAoCC,iBAApC,CAAA,CAAA;;AAAmC;AAKzE;AAAqC,cAAhBE,gBAAAA,SAAyBJ,oBAAT,CAA8BE,iBAA9B,CAAA,YAA4DC,qBAA5D,CAAA;EAAA;EAA+C,OAI5DA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAqB,eACaD,EAAAA,OAAAA;EAAiB,WAAxCH,CAAAA,MAAAA,EADXI,qBACWJ;EAAsB,qBAAsBD,CAAAA,MAAAA,CAAAA,EAA5CC,sBAA4CD,CAArBI,iBAAqBJ,CAAAA,CAAAA,EAAAA,sBAAAA"}
|
package/dist/embeddings.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams, GoogleAbstractedClient, GoogleConnectionParams } from "@langchain/google-common";
|
|
2
2
|
import { GoogleAuthOptions } from "google-auth-library";
|
|
3
|
+
|
|
4
|
+
//#region src/embeddings.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Input to LLM class.
|
|
5
8
|
*/
|
|
6
|
-
|
|
7
|
-
}
|
|
9
|
+
interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<GoogleAuthOptions> {}
|
|
8
10
|
/**
|
|
9
11
|
* Integration with an Google embeddings model.
|
|
10
12
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
declare class GoogleEmbeddings extends BaseGoogleEmbeddings<GoogleAuthOptions> 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<GoogleAuthOptions>): 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","GoogleAuthOptions","GoogleEmbeddingsInput","GoogleEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { GoogleAbstractedClient, GoogleConnectionParams, BaseGoogleEmbeddings, BaseGoogleEmbeddingsParams } from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\n/**\n * Input to LLM class.\n */\nexport interface GoogleEmbeddingsInput extends BaseGoogleEmbeddingsParams<GoogleAuthOptions> {\n}\n/**\n * Integration with an Google embeddings model.\n */\nexport declare class GoogleEmbeddings extends BaseGoogleEmbeddings<GoogleAuthOptions> 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<GoogleAuthOptions>): GoogleAbstractedClient;\n}\n"],"mappings":";;;;;;;AAKA;AAAsC,UAArBK,qBAAAA,SAA8BF,0BAAT,CAAoCC,iBAApC,CAAA,CAAA;;AAAmC;AAKzE;AAAqC,cAAhBE,gBAAAA,SAAyBJ,oBAAT,CAA8BE,iBAA9B,CAAA,YAA4DC,qBAA5D,CAAA;EAAA;EAA+C,OAI5DA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAqB,eACaD,EAAAA,OAAAA;EAAiB,WAAxCH,CAAAA,MAAAA,EADXI,qBACWJ;EAAsB,qBAAsBD,CAAAA,MAAAA,CAAAA,EAA5CC,sBAA4CD,CAArBI,iBAAqBJ,CAAAA,CAAAA,EAAAA,sBAAAA"}
|