@langchain/anthropic 0.3.25 → 1.0.0-alpha.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.
- package/README.md +8 -8
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/chat_models.cjs +772 -989
- package/dist/chat_models.cjs.map +1 -0
- package/dist/chat_models.d.cts +615 -0
- package/dist/chat_models.d.cts.map +1 -0
- package/dist/chat_models.d.ts +222 -199
- package/dist/chat_models.d.ts.map +1 -0
- package/dist/chat_models.js +766 -980
- package/dist/chat_models.js.map +1 -0
- package/dist/index.cjs +6 -20
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -2
- package/dist/output_parsers.cjs +65 -104
- package/dist/output_parsers.cjs.map +1 -0
- package/dist/output_parsers.js +64 -100
- package/dist/output_parsers.js.map +1 -0
- package/dist/types.d.cts +32 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +29 -31
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/content.cjs +153 -0
- package/dist/utils/content.cjs.map +1 -0
- package/dist/utils/content.js +148 -0
- package/dist/utils/content.js.map +1 -0
- package/dist/utils/errors.cjs +16 -27
- package/dist/utils/errors.cjs.map +1 -0
- package/dist/utils/errors.js +17 -25
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/index.cjs +7 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/message_inputs.cjs +218 -535
- package/dist/utils/message_inputs.cjs.map +1 -0
- package/dist/utils/message_inputs.js +219 -533
- package/dist/utils/message_inputs.js.map +1 -0
- package/dist/utils/message_outputs.cjs +185 -246
- package/dist/utils/message_outputs.cjs.map +1 -0
- package/dist/utils/message_outputs.js +184 -243
- package/dist/utils/message_outputs.js.map +1 -0
- package/dist/utils/prompts.cjs +46 -45
- package/dist/utils/prompts.cjs.map +1 -0
- package/dist/utils/prompts.d.cts +45 -0
- package/dist/utils/prompts.d.cts.map +1 -0
- package/dist/utils/prompts.d.ts +8 -2
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +46 -42
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/standard.cjs +127 -0
- package/dist/utils/standard.cjs.map +1 -0
- package/dist/utils/standard.js +127 -0
- package/dist/utils/standard.js.map +1 -0
- package/dist/utils/tools.cjs +14 -25
- package/dist/utils/tools.cjs.map +1 -0
- package/dist/utils/tools.js +14 -23
- package/dist/utils/tools.js.map +1 -0
- package/package.json +30 -53
- package/dist/experimental/index.cjs +0 -17
- package/dist/experimental/index.d.ts +0 -1
- package/dist/experimental/index.js +0 -1
- package/dist/experimental/tool_calling.cjs +0 -318
- package/dist/experimental/tool_calling.d.ts +0 -57
- package/dist/experimental/tool_calling.js +0 -314
- package/dist/experimental/utils/tool_calling.cjs +0 -106
- package/dist/experimental/utils/tool_calling.d.ts +0 -10
- package/dist/experimental/utils/tool_calling.js +0 -101
- package/dist/load/import_constants.cjs +0 -5
- package/dist/load/import_constants.d.ts +0 -1
- package/dist/load/import_constants.js +0 -2
- package/dist/load/import_map.cjs +0 -39
- package/dist/load/import_map.d.ts +0 -2
- package/dist/load/import_map.js +0 -3
- package/dist/load/import_type.cjs +0 -3
- package/dist/load/import_type.d.ts +0 -5
- package/dist/load/import_type.js +0 -2
- package/dist/load/index.cjs +0 -63
- package/dist/load/index.d.ts +0 -14
- package/dist/load/index.js +0 -25
- package/dist/load/map_keys.cjs +0 -2
- package/dist/load/map_keys.d.ts +0 -3
- package/dist/load/map_keys.js +0 -1
- package/dist/load/serializable.cjs +0 -17
- package/dist/load/serializable.d.ts +0 -1
- package/dist/load/serializable.js +0 -1
- package/dist/output_parsers.d.ts +0 -22
- package/dist/types.cjs +0 -48
- package/dist/types.js +0 -45
- package/dist/utils/errors.d.ts +0 -3
- package/dist/utils/message_inputs.d.ts +0 -14
- package/dist/utils/message_outputs.d.ts +0 -14
- package/dist/utils/tools.d.ts +0 -3
- package/experimental.cjs +0 -1
- package/experimental.d.cts +0 -1
- package/experimental.d.ts +0 -1
- package/experimental.js +0 -1
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
package/README.md
CHANGED
|
@@ -82,19 +82,19 @@ To develop the Anthropic package, you'll need to follow these instructions:
|
|
|
82
82
|
### Install dependencies
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
|
|
85
|
+
pnpm install
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
### Build the package
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
|
-
|
|
91
|
+
pnpm build
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
Or from the repo root:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
|
|
97
|
+
pnpm build --filter @langchain/anthropic
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
### Run tests
|
|
@@ -103,8 +103,8 @@ Test files should live within a `tests/` file in the `src/` folder. Unit tests s
|
|
|
103
103
|
end in `.int.test.ts`:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
$
|
|
107
|
-
$
|
|
106
|
+
$ pnpm test
|
|
107
|
+
$ pnpm test:int
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### Lint & Format
|
|
@@ -112,16 +112,16 @@ $ yarn test:int
|
|
|
112
112
|
Run the linter & formatter to ensure your code is up to standard:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
|
|
115
|
+
pnpm lint && pnpm format
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### Adding new entrypoints
|
|
119
119
|
|
|
120
|
-
If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `
|
|
120
|
+
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.
|
|
121
121
|
|
|
122
122
|
## Publishing
|
|
123
123
|
|
|
124
|
-
After running `
|
|
124
|
+
After running `pnpm build`, publish a new version with:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
$ npm publish
|
|
@@ -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;
|