@librechat/agents 3.0.10 → 3.0.12
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 +6 -0
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/main.cjs +1 -0
- package/dist/cjs/main.cjs.map +1 -1
- package/dist/cjs/messages/cache.cjs +50 -0
- package/dist/cjs/messages/cache.cjs.map +1 -1
- package/dist/cjs/stream.cjs +2 -1
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/tools/handlers.cjs +3 -3
- package/dist/cjs/tools/handlers.cjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +7 -1
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/main.mjs +1 -1
- package/dist/esm/messages/cache.mjs +50 -1
- package/dist/esm/messages/cache.mjs.map +1 -1
- package/dist/esm/stream.mjs +2 -1
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/tools/handlers.mjs +3 -3
- package/dist/esm/tools/handlers.mjs.map +1 -1
- package/dist/types/messages/cache.d.ts +13 -1
- package/dist/types/types/llm.d.ts +2 -0
- package/package.json +1 -1
- package/src/graphs/Graph.ts +8 -0
- package/src/messages/cache.test.ts +187 -1
- package/src/messages/cache.ts +65 -1
- package/src/stream.ts +2 -1
- package/src/tools/handlers.ts +3 -3
- package/src/types/llm.ts +2 -0
package/src/tools/handlers.ts
CHANGED
|
@@ -34,7 +34,7 @@ export async function handleToolCallChunks({
|
|
|
34
34
|
let prevStepId: string;
|
|
35
35
|
let prevRunStep: t.RunStep | undefined;
|
|
36
36
|
try {
|
|
37
|
-
prevStepId = graph.getStepIdByKey(stepKey
|
|
37
|
+
prevStepId = graph.getStepIdByKey(stepKey);
|
|
38
38
|
prevRunStep = graph.getRunStep(prevStepId);
|
|
39
39
|
} catch {
|
|
40
40
|
/** Edge Case: If no previous step exists, create a new message creation step */
|
|
@@ -48,7 +48,7 @@ export async function handleToolCallChunks({
|
|
|
48
48
|
prevRunStep = graph.getRunStep(prevStepId);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
const _stepId = graph.getStepIdByKey(stepKey
|
|
51
|
+
const _stepId = graph.getStepIdByKey(stepKey);
|
|
52
52
|
|
|
53
53
|
/** Edge Case: Tool Call Run Step or `tool_call_ids` never dispatched */
|
|
54
54
|
const tool_calls: ToolCall[] | undefined =
|
|
@@ -133,7 +133,7 @@ export const handleToolCalls = async (
|
|
|
133
133
|
let prevStepId = '';
|
|
134
134
|
let prevRunStep: t.RunStep | undefined;
|
|
135
135
|
try {
|
|
136
|
-
prevStepId = graph.getStepIdByKey(stepKey
|
|
136
|
+
prevStepId = graph.getStepIdByKey(stepKey);
|
|
137
137
|
prevRunStep = graph.getRunStep(prevStepId);
|
|
138
138
|
} catch {
|
|
139
139
|
// no previous step
|
package/src/types/llm.ts
CHANGED
|
@@ -66,8 +66,10 @@ export type VertexAIClientOptions = ChatVertexAIInput & {
|
|
|
66
66
|
export type BedrockAnthropicInput = ChatBedrockConverseInput & {
|
|
67
67
|
additionalModelRequestFields?: ChatBedrockConverseInput['additionalModelRequestFields'] &
|
|
68
68
|
AnthropicReasoning;
|
|
69
|
+
promptCache?: boolean;
|
|
69
70
|
};
|
|
70
71
|
export type BedrockConverseClientOptions = ChatBedrockConverseInput;
|
|
72
|
+
export type BedrockAnthropicClientOptions = BedrockAnthropicInput;
|
|
71
73
|
export type GoogleClientOptions = GoogleGenerativeAIChatInput & {
|
|
72
74
|
customHeaders?: RequestOptions['customHeaders'];
|
|
73
75
|
thinkingConfig?: GeminiGenerationConfig['thinkingConfig'];
|