@langchain/anthropic 0.0.0 → 0.0.2
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/dist/chat_models.cjs +3 -1
- package/dist/chat_models.d.ts +2 -2
- package/dist/chat_models.js +1 -0
- package/dist/index.cjs +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +5 -13
- package/chat_models.cjs +0 -1
- package/chat_models.d.ts +0 -1
- package/chat_models.js +0 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatAnthropic = exports.DEFAULT_STOP_SEQUENCES = void 0;
|
|
3
|
+
exports.ChatAnthropic = exports.DEFAULT_STOP_SEQUENCES = exports.HUMAN_PROMPT = exports.AI_PROMPT = void 0;
|
|
4
4
|
const sdk_1 = require("@anthropic-ai/sdk");
|
|
5
|
+
Object.defineProperty(exports, "AI_PROMPT", { enumerable: true, get: function () { return sdk_1.AI_PROMPT; } });
|
|
6
|
+
Object.defineProperty(exports, "HUMAN_PROMPT", { enumerable: true, get: function () { return sdk_1.HUMAN_PROMPT; } });
|
|
5
7
|
const messages_1 = require("langchain-core/messages");
|
|
6
8
|
const outputs_1 = require("langchain-core/outputs");
|
|
7
9
|
const env_1 = require("langchain-core/utils/env");
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Anthropic, ClientOptions } from "@anthropic-ai/sdk";
|
|
1
|
+
import { Anthropic, AI_PROMPT, HUMAN_PROMPT, ClientOptions } from "@anthropic-ai/sdk";
|
|
2
2
|
import type { CompletionCreateParams } from "@anthropic-ai/sdk/resources/completions";
|
|
3
3
|
import type { Stream } from "@anthropic-ai/sdk/streaming";
|
|
4
4
|
import { CallbackManagerForLLMRun } from "langchain-core/callbacks/manager";
|
|
@@ -6,6 +6,7 @@ import { type BaseMessage } from "langchain-core/messages";
|
|
|
6
6
|
import { ChatGenerationChunk, type ChatResult } from "langchain-core/outputs";
|
|
7
7
|
import { BaseChatModel, type BaseChatModelParams } from "langchain-core/language_models/chat_models";
|
|
8
8
|
import { type BaseLanguageModelCallOptions } from "langchain-core/language_models/base";
|
|
9
|
+
export { AI_PROMPT, HUMAN_PROMPT, };
|
|
9
10
|
export declare const DEFAULT_STOP_SEQUENCES: string[];
|
|
10
11
|
/**
|
|
11
12
|
* Input to AnthropicChat class.
|
|
@@ -154,4 +155,3 @@ export declare class ChatAnthropic<CallOptions extends BaseLanguageModelCallOpti
|
|
|
154
155
|
/** @ignore */
|
|
155
156
|
_combineLLMOutput(): never[];
|
|
156
157
|
}
|
|
157
|
-
export {};
|
package/dist/chat_models.js
CHANGED
|
@@ -3,6 +3,7 @@ import { AIMessage, AIMessageChunk, ChatMessage, } from "langchain-core/messages
|
|
|
3
3
|
import { ChatGenerationChunk, } from "langchain-core/outputs";
|
|
4
4
|
import { getEnvironmentVariable } from "langchain-core/utils/env";
|
|
5
5
|
import { BaseChatModel, } from "langchain-core/language_models/chat_models";
|
|
6
|
+
export { AI_PROMPT, HUMAN_PROMPT, };
|
|
6
7
|
/**
|
|
7
8
|
* Extracts the custom role of a generic chat message.
|
|
8
9
|
* @param message The chat message from which to extract the custom role.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./chat_models.cjs"), exports);
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./chat_models.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./chat_models.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/anthropic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Anthropic integrations for LangChain.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -54,11 +54,6 @@
|
|
|
54
54
|
"rimraf": "^5.0.1",
|
|
55
55
|
"typescript": "^5.0.0"
|
|
56
56
|
},
|
|
57
|
-
"peerDependenciesMeta": {
|
|
58
|
-
"fast-xml-parser": {
|
|
59
|
-
"optional": true
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
57
|
"publishConfig": {
|
|
63
58
|
"access": "public"
|
|
64
59
|
},
|
|
@@ -77,18 +72,15 @@
|
|
|
77
72
|
"vectorstores"
|
|
78
73
|
],
|
|
79
74
|
"exports": {
|
|
80
|
-
"
|
|
81
|
-
"types": "./
|
|
82
|
-
"import": "./
|
|
83
|
-
"require": "./
|
|
75
|
+
".": {
|
|
76
|
+
"types": "./index.d.ts",
|
|
77
|
+
"import": "./index.js",
|
|
78
|
+
"require": "./index.cjs"
|
|
84
79
|
},
|
|
85
80
|
"./package.json": "./package.json"
|
|
86
81
|
},
|
|
87
82
|
"files": [
|
|
88
83
|
"dist/",
|
|
89
|
-
"chat_models.cjs",
|
|
90
|
-
"chat_models.js",
|
|
91
|
-
"chat_models.d.ts",
|
|
92
84
|
"index.cjs",
|
|
93
85
|
"index.js",
|
|
94
86
|
"index.d.ts"
|
package/chat_models.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/chat_models.cjs');
|
package/chat_models.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/chat_models.js'
|
package/chat_models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/chat_models.js'
|