@lobehub/lobehub 2.0.0-next.260 → 2.0.0-next.261
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/CHANGELOG.md +25 -0
- package/changelog/v1.json +5 -0
- package/package.json +1 -1
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-topics/route.ts +18 -2
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-user-topics/route.ts +16 -2
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-users/route.ts +16 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.261](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.260...v2.0.0-next.261)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-10**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **userMemories**: Support to use customized Qstash client with extra header for workflows.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **userMemories**: Support to use customized Qstash client with extra header for workflows, closes [#11378](https://github.com/lobehub/lobe-chat/issues/11378) ([3417af4](https://github.com/lobehub/lobe-chat/commit/3417af4))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 2.0.0-next.260](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.259...v2.0.0-next.260)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2026-01-10**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.261",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
type MemoryExtractionPayloadInput,
|
|
13
13
|
normalizeMemoryExtractionPayload,
|
|
14
14
|
} from '@/server/services/memory/userMemory/extract';
|
|
15
|
+
import { Client } from '@upstash/qstash'
|
|
16
|
+
import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryExtractionConfig';
|
|
17
|
+
|
|
18
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
15
19
|
|
|
16
20
|
const CEP_LAYERS: LayersEnum[] = [LayersEnum.Context, LayersEnum.Experience, LayersEnum.Preference];
|
|
17
21
|
const IDENTITY_LAYERS: LayersEnum[] = [LayersEnum.Identity];
|
|
@@ -136,5 +140,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>((context) =>
|
|
|
136
140
|
span.end();
|
|
137
141
|
}
|
|
138
142
|
},
|
|
139
|
-
),
|
|
140
|
-
)
|
|
143
|
+
), {
|
|
144
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
145
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
146
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
147
|
+
//
|
|
148
|
+
// Refer to the doc for more details:
|
|
149
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
150
|
+
qstashClient: new Client({
|
|
151
|
+
headers: {
|
|
152
|
+
...upstashWorkflowExtraHeaders,
|
|
153
|
+
},
|
|
154
|
+
token: process.env.QSTASH_TOKEN!
|
|
155
|
+
})
|
|
156
|
+
});
|
|
@@ -10,13 +10,14 @@ import {
|
|
|
10
10
|
import { forEachBatchSequential } from '@/server/services/memory/userMemory/topicBatching';
|
|
11
11
|
import { MemorySourceType } from '@lobechat/types';
|
|
12
12
|
import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryExtractionConfig';
|
|
13
|
+
import { Client } from '@upstash/qstash'
|
|
13
14
|
|
|
14
15
|
const TOPIC_PAGE_SIZE = 50;
|
|
15
16
|
const TOPIC_BATCH_SIZE = 4;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
18
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
19
19
|
|
|
20
|
+
export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
20
21
|
const params = normalizeMemoryExtractionPayload(context.requestPayload || {});
|
|
21
22
|
if (!params.userIds.length) {
|
|
22
23
|
return { message: 'No user ids provided for topic processing.' };
|
|
@@ -125,4 +126,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
return { processedUsers: params.userIds.length };
|
|
129
|
+
}, {
|
|
130
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
131
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
132
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
133
|
+
//
|
|
134
|
+
// Refer to the doc for more details:
|
|
135
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
136
|
+
qstashClient: new Client({
|
|
137
|
+
headers: {
|
|
138
|
+
...upstashWorkflowExtraHeaders,
|
|
139
|
+
},
|
|
140
|
+
token: process.env.QSTASH_TOKEN!
|
|
141
|
+
})
|
|
128
142
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { serve } from '@upstash/workflow/nextjs';
|
|
2
2
|
import { chunk } from 'es-toolkit/compat';
|
|
3
|
+
import { Client } from '@upstash/qstash'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
MemoryExtractionExecutor,
|
|
@@ -13,9 +14,9 @@ import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryEx
|
|
|
13
14
|
const USER_PAGE_SIZE = 50;
|
|
14
15
|
const USER_BATCH_SIZE = 10;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
17
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
18
18
|
|
|
19
|
+
export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
19
20
|
const params = normalizeMemoryExtractionPayload(context.requestPayload || {});
|
|
20
21
|
if (params.sources.length === 0) {
|
|
21
22
|
return { message: 'No sources provided, skip memory extraction.' };
|
|
@@ -73,4 +74,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
|
73
74
|
nextCursor: cursor ? cursor.id : null,
|
|
74
75
|
processedUsers: ids.length,
|
|
75
76
|
};
|
|
77
|
+
}, {
|
|
78
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
79
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
80
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
81
|
+
//
|
|
82
|
+
// Refer to the doc for more details:
|
|
83
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
84
|
+
qstashClient: new Client({
|
|
85
|
+
headers: {
|
|
86
|
+
...upstashWorkflowExtraHeaders,
|
|
87
|
+
},
|
|
88
|
+
token: process.env.QSTASH_TOKEN!
|
|
89
|
+
})
|
|
76
90
|
});
|