fix(Vercel AI SDK): Streaming not working properly (#3386)

This commit is contained in:
Saket Aryan
2025-08-30 21:58:30 +05:30
committed by GitHub
parent 0b2aa36e98
commit 748620f29b
4 changed files with 15 additions and 76 deletions
+6 -6
View File
@@ -62,26 +62,26 @@ const convertToMem0Format = (messages: LanguageModelV2Prompt) => {
const searchInternalMemories = async (query: string, config?: Mem0ConfigSettings, top_k: number = 5) => {
try {
const filters: { AND: Array<{ [key: string]: string | undefined }> } = {
AND: [],
const filters: { OR: Array<{ [key: string]: string | undefined }> } = {
OR: [],
};
if (config?.user_id) {
filters.AND.push({
filters.OR.push({
user_id: config.user_id,
});
}
if (config?.app_id) {
filters.AND.push({
filters.OR.push({
app_id: config.app_id,
});
}
if (config?.agent_id) {
filters.AND.push({
filters.OR.push({
agent_id: config.agent_id,
});
}
if (config?.run_id) {
filters.AND.push({
filters.OR.push({
run_id: config.run_id,
});
}