@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.
Files changed (55) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +6 -6
  3. package/README.md +8 -8
  4. package/dist/_virtual/rolldown_runtime.cjs +25 -0
  5. package/dist/chat_models.cjs +667 -845
  6. package/dist/chat_models.cjs.map +1 -0
  7. package/dist/chat_models.d.cts +556 -0
  8. package/dist/chat_models.d.cts.map +1 -0
  9. package/dist/chat_models.d.ts +171 -157
  10. package/dist/chat_models.d.ts.map +1 -0
  11. package/dist/chat_models.js +665 -840
  12. package/dist/chat_models.js.map +1 -0
  13. package/dist/embeddings.cjs +97 -151
  14. package/dist/embeddings.cjs.map +1 -0
  15. package/dist/embeddings.d.cts +104 -0
  16. package/dist/embeddings.d.cts.map +1 -0
  17. package/dist/embeddings.d.ts +76 -70
  18. package/dist/embeddings.d.ts.map +1 -0
  19. package/dist/embeddings.js +93 -144
  20. package/dist/embeddings.js.map +1 -0
  21. package/dist/index.cjs +5 -18
  22. package/dist/index.d.cts +3 -0
  23. package/dist/index.d.ts +3 -2
  24. package/dist/index.js +4 -2
  25. package/dist/output_parsers.cjs +47 -75
  26. package/dist/output_parsers.cjs.map +1 -0
  27. package/dist/output_parsers.js +47 -72
  28. package/dist/output_parsers.js.map +1 -0
  29. package/dist/types.d.cts +8 -0
  30. package/dist/types.d.cts.map +1 -0
  31. package/dist/types.d.ts +7 -2
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/utils/common.cjs +356 -549
  34. package/dist/utils/common.cjs.map +1 -0
  35. package/dist/utils/common.js +357 -545
  36. package/dist/utils/common.js.map +1 -0
  37. package/dist/utils/tools.cjs +65 -102
  38. package/dist/utils/tools.cjs.map +1 -0
  39. package/dist/utils/tools.js +64 -99
  40. package/dist/utils/tools.js.map +1 -0
  41. package/dist/utils/zod_to_genai_parameters.cjs +31 -49
  42. package/dist/utils/zod_to_genai_parameters.cjs.map +1 -0
  43. package/dist/utils/zod_to_genai_parameters.js +29 -45
  44. package/dist/utils/zod_to_genai_parameters.js.map +1 -0
  45. package/package.json +42 -51
  46. package/dist/output_parsers.d.ts +0 -20
  47. package/dist/types.cjs +0 -2
  48. package/dist/types.js +0 -1
  49. package/dist/utils/common.d.ts +0 -22
  50. package/dist/utils/tools.d.ts +0 -10
  51. package/dist/utils/zod_to_genai_parameters.d.ts +0 -14
  52. package/index.cjs +0 -1
  53. package/index.d.cts +0 -1
  54. package/index.d.ts +0 -1
  55. 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
- 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
@@ -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
- npm install @langchain/core
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
- yarn install
129
+ pnpm install
130
130
  ```
131
131
 
132
132
  ### Build the package
133
133
 
134
134
  ```bash
135
- yarn build
135
+ pnpm build
136
136
  ```
137
137
 
138
138
  Or from the repo root:
139
139
 
140
140
  ```bash
141
- yarn build --filter=@langchain/google-genai
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
- $ yarn test
151
- $ yarn test:int
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
- yarn lint && yarn format
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 `entrypoints` field in the `config` variable located inside `langchain.config.js` and run `yarn build` to generate the new entrypoint.
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;