mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 11:38:51 +01:00
fix: update output type to ToolMessage in memory handling functions
This commit is contained in:
parent
3784c702aa
commit
4464b333e9
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ import type {
|
|||
} from '@librechat/agents';
|
||||
import type { TAttachment, MemoryArtifact } from 'librechat-data-provider';
|
||||
import type { ObjectId, MemoryMethods } from '@librechat/data-schemas';
|
||||
import type { BaseMessage } from '@langchain/core/messages';
|
||||
import type { BaseMessage, ToolMessage } from '@langchain/core/messages';
|
||||
import type { Response as ServerResponse } from 'express';
|
||||
import { Tokenizer } from '~/utils';
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ async function handleMemoryArtifact({
|
|||
data: ToolEndData;
|
||||
metadata?: ToolEndMetadata;
|
||||
}) {
|
||||
const output = data?.output;
|
||||
const output = data?.output as ToolMessage | undefined;
|
||||
if (!output) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -507,7 +507,7 @@ export function createMemoryCallback({
|
|||
artifactPromises: Promise<Partial<TAttachment> | null>[];
|
||||
}): ToolEndCallback {
|
||||
return async (data: ToolEndData, metadata?: Record<string, unknown>) => {
|
||||
const output = data?.output;
|
||||
const output = data?.output as ToolMessage | undefined;
|
||||
const memoryArtifact = output?.artifact?.[Tools.memory] as MemoryArtifact;
|
||||
if (memoryArtifact == null) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue