@langchain/google-genai 0.2.17 → 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 +11 -0
- package/LICENSE +6 -6
- package/README.md +8 -8
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/chat_models.cjs +667 -845
- package/dist/chat_models.cjs.map +1 -0
- package/dist/chat_models.d.cts +556 -0
- package/dist/chat_models.d.cts.map +1 -0
- package/dist/chat_models.d.ts +171 -157
- package/dist/chat_models.d.ts.map +1 -0
- package/dist/chat_models.js +665 -840
- package/dist/chat_models.js.map +1 -0
- package/dist/embeddings.cjs +97 -151
- package/dist/embeddings.cjs.map +1 -0
- package/dist/embeddings.d.cts +104 -0
- package/dist/embeddings.d.cts.map +1 -0
- package/dist/embeddings.d.ts +76 -70
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +93 -144
- package/dist/embeddings.js.map +1 -0
- package/dist/index.cjs +5 -18
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -2
- package/dist/output_parsers.cjs +47 -75
- package/dist/output_parsers.cjs.map +1 -0
- package/dist/output_parsers.js +47 -72
- package/dist/output_parsers.js.map +1 -0
- package/dist/types.d.cts +8 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +7 -2
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/common.cjs +356 -549
- package/dist/utils/common.cjs.map +1 -0
- package/dist/utils/common.js +357 -545
- package/dist/utils/common.js.map +1 -0
- package/dist/utils/tools.cjs +65 -102
- package/dist/utils/tools.cjs.map +1 -0
- package/dist/utils/tools.js +64 -99
- package/dist/utils/tools.js.map +1 -0
- package/dist/utils/zod_to_genai_parameters.cjs +31 -49
- package/dist/utils/zod_to_genai_parameters.cjs.map +1 -0
- package/dist/utils/zod_to_genai_parameters.js +29 -45
- package/dist/utils/zod_to_genai_parameters.js.map +1 -0
- package/package.json +42 -51
- package/dist/output_parsers.d.ts +0 -20
- package/dist/types.cjs +0 -2
- package/dist/types.js +0 -1
- package/dist/utils/common.d.ts +0 -22
- package/dist/utils/tools.d.ts +0 -10
- package/dist/utils/zod_to_genai_parameters.d.ts +0 -14
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @langchain/google-genai
|
|
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
|
+
- 0092a79: compute per-chunk token deltas while streaming
|
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
|
@@ -64,7 +64,7 @@ const response = await model.invoke(new HumanMessage("Hello world!"));
|
|
|
64
64
|
Gemini vision model supports image inputs when providing a single chat message. Example:
|
|
65
65
|
|
|
66
66
|
```bash npm2yarn
|
|
67
|
-
|
|
67
|
+
pnpm install @langchain/core
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
@@ -126,19 +126,19 @@ To develop the Google GenAI package, you'll need to follow these instructions:
|
|
|
126
126
|
### Install dependencies
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
|
|
129
|
+
pnpm install
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
### Build the package
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
|
|
135
|
+
pnpm build
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
Or from the repo root:
|
|
139
139
|
|
|
140
140
|
```bash
|
|
141
|
-
|
|
141
|
+
pnpm build --filter @langchain/google-genai
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
### Run tests
|
|
@@ -147,8 +147,8 @@ Test files should live within a `tests/` file in the `src/` folder. Unit tests s
|
|
|
147
147
|
end in `.int.test.ts`:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
$
|
|
151
|
-
$
|
|
150
|
+
$ pnpm test
|
|
151
|
+
$ pnpm test:int
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
### Lint & Format
|
|
@@ -156,9 +156,9 @@ $ yarn test:int
|
|
|
156
156
|
Run the linter & formatter to ensure your code is up to standard:
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
|
-
|
|
159
|
+
pnpm lint && pnpm format
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
### Adding new entrypoints
|
|
163
163
|
|
|
164
|
-
If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `
|
|
164
|
+
If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `exports` field in the `package.json` file and run `pnpm build` to generate the new entrypoint.
|
|
@@ -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;
|