@langchain/anthropic 0.1.20 → 0.1.21
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.d.ts +6 -3
- package/package.json +2 -2
package/dist/chat_models.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ChatGeneration, ChatGenerationChunk, type ChatResult } from "@langchain
|
|
|
6
6
|
import { BaseChatModel, LangSmithParams, type BaseChatModelParams } from "@langchain/core/language_models/chat_models";
|
|
7
7
|
import { StructuredOutputMethodOptions, type BaseLanguageModelCallOptions, BaseLanguageModelInput } from "@langchain/core/language_models/base";
|
|
8
8
|
import { StructuredToolInterface } from "@langchain/core/tools";
|
|
9
|
-
import { Runnable
|
|
9
|
+
import { Runnable } from "@langchain/core/runnables";
|
|
10
10
|
import { ToolCall } from "@langchain/core/messages/tool";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { AnthropicToolResponse } from "./types.js";
|
|
@@ -151,7 +151,7 @@ export declare class ChatAnthropicMessages<CallOptions extends ChatAnthropicCall
|
|
|
151
151
|
* @throws {Error} If a mix of AnthropicTools and StructuredTools are passed.
|
|
152
152
|
*/
|
|
153
153
|
formatStructuredToolToAnthropic(tools: ChatAnthropicCallOptions["tools"]): AnthropicTool[] | undefined;
|
|
154
|
-
bindTools(tools: (AnthropicTool | StructuredToolInterface)[], kwargs?: Partial<CallOptions>):
|
|
154
|
+
bindTools(tools: (AnthropicTool | StructuredToolInterface)[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, AIMessageChunk, CallOptions>;
|
|
155
155
|
/**
|
|
156
156
|
* Get the parameters used to invoke the model
|
|
157
157
|
*/
|
|
@@ -193,7 +193,10 @@ export declare class ChatAnthropicMessages<CallOptions extends ChatAnthropicCall
|
|
|
193
193
|
model: string;
|
|
194
194
|
stop_reason: "max_tokens" | "stop_sequence" | "end_turn" | null;
|
|
195
195
|
stop_sequence: string | null;
|
|
196
|
-
usage: Anthropic.Messages.Usage;
|
|
196
|
+
usage: Anthropic.Messages.Usage; /** A list of strings upon which to stop generating.
|
|
197
|
+
* You probably want `["\n\nHuman:"]`, as that's the cue for
|
|
198
|
+
* the next turn in the dialog agent.
|
|
199
|
+
*/
|
|
197
200
|
};
|
|
198
201
|
}>;
|
|
199
202
|
/** @ignore */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/anthropic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Anthropic integrations for LangChain.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@anthropic-ai/sdk": "^0.21.0",
|
|
43
|
-
"@langchain/core": ">0.1.56
|
|
43
|
+
"@langchain/core": ">0.1.56 <0.3.0",
|
|
44
44
|
"fast-xml-parser": "^4.3.5",
|
|
45
45
|
"zod": "^3.22.4",
|
|
46
46
|
"zod-to-json-schema": "^3.22.4"
|