@librechat/agents-types 2.4.52 → 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/llm.ts +4 -2
- package/package.json +1 -1
- package/stream.ts +14 -0
package/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/package.json
CHANGED
package/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
|