@librechat/agents 2.4.51 → 2.4.53
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/cjs/graphs/Graph.cjs +7 -6
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/index.cjs +8 -8
- package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/types.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/utils/message_inputs.cjs +15 -0
- package/dist/cjs/llm/anthropic/utils/message_inputs.cjs.map +1 -1
- package/dist/cjs/main.cjs +2 -0
- package/dist/cjs/main.cjs.map +1 -1
- package/dist/cjs/stream.cjs +8 -0
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/tools/ToolNode.cjs +8 -2
- package/dist/cjs/tools/ToolNode.cjs.map +1 -1
- package/dist/cjs/tools/handlers.cjs +101 -1
- package/dist/cjs/tools/handlers.cjs.map +1 -1
- package/dist/cjs/tools/search/anthropic.cjs +40 -0
- package/dist/cjs/tools/search/anthropic.cjs.map +1 -0
- package/dist/cjs/tools/search/search.cjs +82 -15
- package/dist/cjs/tools/search/search.cjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +7 -6
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/llm/anthropic/index.mjs +8 -8
- package/dist/esm/llm/anthropic/index.mjs.map +1 -1
- package/dist/esm/llm/anthropic/types.mjs.map +1 -1
- package/dist/esm/llm/anthropic/utils/message_inputs.mjs +15 -0
- package/dist/esm/llm/anthropic/utils/message_inputs.mjs.map +1 -1
- package/dist/esm/main.mjs +1 -1
- package/dist/esm/stream.mjs +9 -1
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/tools/ToolNode.mjs +8 -2
- package/dist/esm/tools/ToolNode.mjs.map +1 -1
- package/dist/esm/tools/handlers.mjs +101 -3
- package/dist/esm/tools/handlers.mjs.map +1 -1
- package/dist/esm/tools/search/anthropic.mjs +37 -0
- package/dist/esm/tools/search/anthropic.mjs.map +1 -0
- package/dist/esm/tools/search/search.mjs +82 -15
- package/dist/esm/tools/search/search.mjs.map +1 -1
- package/dist/types/graphs/Graph.d.ts +2 -0
- package/dist/types/llm/anthropic/types.d.ts +2 -0
- package/dist/types/llm/anthropic/utils/message_inputs.d.ts +1 -1
- package/dist/types/llm/anthropic/utils/output_parsers.d.ts +3 -3
- package/dist/types/scripts/ant_web_search.d.ts +1 -0
- package/dist/types/tools/CodeExecutor.d.ts +2 -2
- package/dist/types/tools/ToolNode.d.ts +1 -1
- package/dist/types/tools/handlers.d.ts +11 -0
- package/dist/types/tools/search/anthropic.d.ts +16 -0
- package/dist/types/tools/search/types.d.ts +9 -0
- package/dist/types/types/llm.d.ts +3 -2
- package/dist/types/types/stream.d.ts +9 -1
- package/package.json +5 -3
- package/src/graphs/Graph.ts +8 -6
- package/src/llm/anthropic/Jacob_Lee_Resume_2023.pdf +0 -0
- package/src/llm/anthropic/index.ts +7 -12
- package/src/llm/anthropic/llm.spec.ts +447 -115
- package/src/llm/anthropic/types.ts +16 -0
- package/src/llm/anthropic/utils/message_inputs.ts +17 -2
- package/src/llm/anthropic/utils/output_parsers.ts +4 -4
- package/src/scripts/ant_web_search.ts +158 -0
- package/src/stream.ts +16 -5
- package/src/tools/ToolNode.ts +17 -3
- package/src/tools/handlers.ts +163 -1
- package/src/tools/search/anthropic.ts +51 -0
- package/src/tools/search/search.ts +92 -14
- package/src/tools/search/types.ts +9 -0
- package/src/types/llm.ts +4 -2
- package/src/types/stream.ts +14 -0
|
@@ -581,6 +581,15 @@ export interface SearXNGResult {
|
|
|
581
581
|
content?: string;
|
|
582
582
|
publishedDate?: string;
|
|
583
583
|
img_src?: string;
|
|
584
|
+
score?: number;
|
|
585
|
+
engine?: string;
|
|
586
|
+
category?: string;
|
|
587
|
+
thumbnail?: string;
|
|
588
|
+
priority?: string;
|
|
589
|
+
engines?: string[];
|
|
590
|
+
positions?: number[];
|
|
591
|
+
template?: string;
|
|
592
|
+
parsed_url?: string[];
|
|
584
593
|
}
|
|
585
594
|
|
|
586
595
|
export type ProcessSourcesFields = {
|
package/src/types/llm.ts
CHANGED
|
@@ -91,9 +91,11 @@ export type ClientOptions =
|
|
|
91
91
|
| DeepSeekClientOptions
|
|
92
92
|
| XAIClientOptions;
|
|
93
93
|
|
|
94
|
-
export type
|
|
94
|
+
export type SharedLLMConfig = {
|
|
95
95
|
provider: Providers;
|
|
96
|
-
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type LLMConfig = SharedLLMConfig & ClientOptions;
|
|
97
99
|
|
|
98
100
|
export type ProviderOptionsMap = {
|
|
99
101
|
[Providers.AZURE]: AzureClientOptions;
|
package/src/types/stream.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
} from '@langchain/core/messages';
|
|
9
9
|
import type { ToolCall, ToolCallChunk } from '@langchain/core/messages/tool';
|
|
10
10
|
import type { LLMResult, Generation } from '@langchain/core/outputs';
|
|
11
|
+
import type { AnthropicContentBlock } from '@/llm/anthropic/types';
|
|
11
12
|
import type { ToolEndEvent } from '@/types/tools';
|
|
12
13
|
import { StepTypes, ContentTypes, GraphEvents } from '@/common/enum';
|
|
13
14
|
|
|
@@ -299,7 +300,20 @@ export type ToolCallContent = {
|
|
|
299
300
|
tool_call?: ToolCallPart;
|
|
300
301
|
};
|
|
301
302
|
|
|
303
|
+
export type ToolResultContent = {
|
|
304
|
+
content:
|
|
305
|
+
| string
|
|
306
|
+
| Record<string, unknown>
|
|
307
|
+
| Array<string | Record<string, unknown>>
|
|
308
|
+
| AnthropicContentBlock[];
|
|
309
|
+
type: 'tool_result' | 'web_search_result' | 'web_search_tool_result';
|
|
310
|
+
tool_use_id?: string;
|
|
311
|
+
input?: string | Record<string, unknown>;
|
|
312
|
+
index?: number;
|
|
313
|
+
};
|
|
314
|
+
|
|
302
315
|
export type MessageContentComplex = (
|
|
316
|
+
| ToolResultContent
|
|
303
317
|
| ThinkingContentText
|
|
304
318
|
| AgentUpdate
|
|
305
319
|
| ToolCallContent
|