@lobehub/lobehub 2.0.0-next.35 → 2.0.0-next.37
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 +50 -0
- package/changelog/v1.json +18 -0
- package/next.config.ts +5 -6
- package/package.json +2 -2
- package/packages/agent-runtime/src/core/__tests__/runtime.test.ts +112 -77
- package/packages/agent-runtime/src/core/runtime.ts +63 -18
- package/packages/agent-runtime/src/types/generalAgent.ts +55 -0
- package/packages/agent-runtime/src/types/index.ts +1 -0
- package/packages/agent-runtime/src/types/instruction.ts +10 -3
- package/packages/const/src/user.ts +0 -1
- package/packages/context-engine/src/processors/GroupMessageFlatten.ts +8 -6
- package/packages/context-engine/src/processors/__tests__/GroupMessageFlatten.test.ts +12 -12
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/assistant-group-branches.json +249 -0
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/index.ts +4 -0
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/multi-assistant-group.json +260 -0
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/active-index-1.json +4 -0
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/assistant-group-branches.json +481 -0
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/conversation.json +5 -1
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/index.ts +4 -0
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/multi-assistant-group.json +407 -0
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/nested.json +18 -2
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/complex-scenario.json +25 -3
- package/packages/conversation-flow/src/__tests__/parse.test.ts +12 -0
- package/packages/conversation-flow/src/index.ts +1 -1
- package/packages/conversation-flow/src/transformation/FlatListBuilder.ts +112 -34
- package/packages/conversation-flow/src/types/flatMessageList.ts +0 -12
- package/packages/conversation-flow/src/{types.ts → types/index.ts} +3 -14
- package/packages/database/src/models/__tests__/apiKey.test.ts +444 -0
- package/packages/database/src/models/message.ts +18 -19
- package/packages/types/src/aiChat.ts +2 -0
- package/packages/types/src/importer.ts +2 -2
- package/packages/types/src/message/ui/chat.ts +17 -1
- package/packages/types/src/message/ui/extra.ts +2 -2
- package/packages/types/src/message/ui/params.ts +2 -2
- package/packages/types/src/user/preference.ts +0 -4
- package/packages/utils/src/tokenizer/index.ts +3 -11
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/MessageFromUrl.tsx +3 -3
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/V1Mobile/index.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/V1Mobile/useSend.ts +3 -3
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/useSend.ts +6 -6
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx +5 -3
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/WelcomeChatItem/AgentWelcome/OpeningQuestions.tsx +2 -2
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/WelcomeChatItem/GroupWelcome/GroupUsageSuggest.tsx +2 -2
- package/src/app/[variants]/(main)/labs/page.tsx +0 -9
- package/src/features/ChatInput/ActionBar/STT/browser.tsx +3 -3
- package/src/features/ChatInput/ActionBar/STT/openai.tsx +3 -3
- package/src/features/Conversation/Error/AccessCodeForm.tsx +1 -1
- package/src/features/Conversation/Error/ChatInvalidApiKey.tsx +1 -1
- package/src/features/Conversation/Error/ClerkLogin/index.tsx +1 -1
- package/src/features/Conversation/Error/OAuthForm.tsx +1 -1
- package/src/features/Conversation/Error/index.tsx +0 -5
- package/src/features/Conversation/Messages/Assistant/Actions/index.tsx +13 -10
- package/src/features/Conversation/Messages/Assistant/Extra/index.test.tsx +3 -8
- package/src/features/Conversation/Messages/Assistant/Extra/index.tsx +2 -6
- package/src/features/Conversation/Messages/Assistant/MessageContent.tsx +7 -9
- package/src/features/Conversation/Messages/Assistant/Tool/Inspector/PluginResult.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Tool/Inspector/PluginState.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Tool/Render/PluginSettings.tsx +4 -1
- package/src/features/Conversation/Messages/Assistant/Tool/Render/index.tsx +2 -3
- package/src/features/Conversation/Messages/Assistant/index.tsx +57 -60
- package/src/features/Conversation/Messages/Default.tsx +1 -0
- package/src/features/Conversation/Messages/Group/Actions/WithContentId.tsx +38 -10
- package/src/features/Conversation/Messages/Group/Actions/index.tsx +1 -1
- package/src/features/Conversation/Messages/Group/ContentBlock.tsx +1 -3
- package/src/features/Conversation/Messages/Group/GroupChildren.tsx +12 -12
- package/src/features/Conversation/Messages/Group/MessageContent.tsx +7 -1
- package/src/features/Conversation/Messages/Group/Tool/Render/PluginSettings.tsx +1 -1
- package/src/features/Conversation/Messages/Group/index.tsx +2 -1
- package/src/features/Conversation/Messages/Supervisor/index.tsx +2 -2
- package/src/features/Conversation/Messages/User/{Actions.tsx → Actions/ActionsBar.tsx} +26 -25
- package/src/features/Conversation/Messages/User/Actions/MessageBranch.tsx +107 -0
- package/src/features/Conversation/Messages/User/Actions/index.tsx +42 -0
- package/src/features/Conversation/Messages/User/index.tsx +43 -44
- package/src/features/Conversation/Messages/index.tsx +3 -3
- package/src/features/Conversation/components/AutoScroll.tsx +3 -3
- package/src/features/Conversation/components/Extras/Usage/UsageDetail/AnimatedNumber.tsx +55 -0
- package/src/features/Conversation/components/Extras/Usage/UsageDetail/index.tsx +5 -2
- package/src/features/Conversation/components/VirtualizedList/index.tsx +29 -20
- package/src/features/Conversation/hooks/useChatListActionsBar.tsx +8 -10
- package/src/features/Portal/Thread/Chat/ChatInput/useSend.ts +3 -3
- package/src/hooks/useHotkeys/chatScope.ts +15 -7
- package/src/libs/trpc/client/lambda.ts +4 -3
- package/src/server/routers/lambda/__tests__/aiChat.test.ts +1 -1
- package/src/server/routers/lambda/__tests__/integration/message.integration.test.ts +0 -26
- package/src/server/routers/lambda/aiChat.ts +3 -2
- package/src/server/routers/lambda/message.ts +8 -16
- package/src/server/services/message/__tests__/index.test.ts +29 -39
- package/src/server/services/message/index.ts +41 -36
- package/src/services/electron/desktopNotification.ts +6 -6
- package/src/services/electron/file.ts +6 -6
- package/src/services/file/ClientS3/index.ts +8 -8
- package/src/services/message/__tests__/metadata-race-condition.test.ts +157 -0
- package/src/services/message/index.ts +21 -15
- package/src/services/upload.ts +11 -11
- package/src/services/utils/abortableRequest.test.ts +161 -0
- package/src/services/utils/abortableRequest.ts +67 -0
- package/src/store/chat/agents/GeneralChatAgent.ts +137 -0
- package/src/store/chat/agents/createAgentExecutors.ts +395 -0
- package/src/store/chat/helpers.test.ts +0 -99
- package/src/store/chat/helpers.ts +0 -11
- package/src/store/chat/slices/aiChat/actions/__tests__/conversationControl.test.ts +332 -0
- package/src/store/chat/slices/aiChat/actions/__tests__/conversationLifecycle.test.ts +257 -0
- package/src/store/chat/slices/aiChat/actions/__tests__/helpers.ts +11 -2
- package/src/store/chat/slices/aiChat/actions/__tests__/rag.test.ts +6 -6
- package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +391 -0
- package/src/store/chat/slices/aiChat/actions/__tests__/streamingStates.test.ts +179 -0
- package/src/store/chat/slices/aiChat/actions/conversationControl.ts +157 -0
- package/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts +329 -0
- package/src/store/chat/slices/aiChat/actions/generateAIGroupChat.ts +14 -14
- package/src/store/chat/slices/aiChat/actions/index.ts +12 -6
- package/src/store/chat/slices/aiChat/actions/rag.ts +9 -6
- package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +604 -0
- package/src/store/chat/slices/aiChat/actions/streamingStates.ts +84 -0
- package/src/store/chat/slices/builtinTool/actions/__tests__/localSystem.test.ts +4 -4
- package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +11 -11
- package/src/store/chat/slices/builtinTool/actions/interpreter.ts +8 -8
- package/src/store/chat/slices/builtinTool/actions/localSystem.ts +2 -2
- package/src/store/chat/slices/builtinTool/actions/search.ts +8 -8
- package/src/store/chat/slices/message/action.test.ts +79 -68
- package/src/store/chat/slices/message/actions/index.ts +39 -0
- package/src/store/chat/slices/message/actions/internals.ts +77 -0
- package/src/store/chat/slices/message/actions/optimisticUpdate.ts +260 -0
- package/src/store/chat/slices/message/actions/publicApi.ts +224 -0
- package/src/store/chat/slices/message/actions/query.ts +120 -0
- package/src/store/chat/slices/message/actions/runtimeState.ts +108 -0
- package/src/store/chat/slices/message/initialState.ts +13 -0
- package/src/store/chat/slices/message/reducer.test.ts +48 -370
- package/src/store/chat/slices/message/reducer.ts +17 -81
- package/src/store/chat/slices/message/selectors/chat.test.ts +13 -50
- package/src/store/chat/slices/message/selectors/chat.ts +78 -242
- package/src/store/chat/slices/message/selectors/dbMessage.ts +140 -0
- package/src/store/chat/slices/message/selectors/displayMessage.ts +301 -0
- package/src/store/chat/slices/message/selectors/messageState.ts +5 -2
- package/src/store/chat/slices/plugin/action.test.ts +62 -64
- package/src/store/chat/slices/plugin/action.ts +34 -28
- package/src/store/chat/slices/thread/action.test.ts +28 -31
- package/src/store/chat/slices/thread/action.ts +13 -10
- package/src/store/chat/slices/thread/selectors/index.ts +8 -6
- package/src/store/chat/slices/topic/reducer.ts +11 -3
- package/src/store/chat/store.ts +1 -1
- package/src/store/user/slices/preference/selectors/labPrefer.ts +0 -3
- package/packages/database/src/models/__tests__/message.grouping.test.ts +0 -812
- package/packages/database/src/utils/__tests__/groupMessages.test.ts +0 -1132
- package/packages/database/src/utils/groupMessages.ts +0 -361
- package/packages/utils/src/tokenizer/client.ts +0 -35
- package/packages/utils/src/tokenizer/estimated.ts +0 -4
- package/packages/utils/src/tokenizer/server.ts +0 -11
- package/packages/utils/src/tokenizer/tokenizer.worker.ts +0 -12
- package/src/app/(backend)/webapi/tokenizer/index.test.ts +0 -32
- package/src/app/(backend)/webapi/tokenizer/route.ts +0 -8
- package/src/features/Conversation/Error/InvalidAccessCode.tsx +0 -79
- package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChat.test.ts +0 -975
- package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChatV2.test.ts +0 -1050
- package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +0 -720
- package/src/store/chat/slices/aiChat/actions/generateAIChatV2.ts +0 -849
- package/src/store/chat/slices/message/action.ts +0 -629
|
@@ -7,9 +7,9 @@ const log = debug('context-engine:processor:GroupMessageFlattenProcessor');
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Group Message Flatten Processor
|
|
10
|
-
* Responsible for flattening role=
|
|
10
|
+
* Responsible for flattening role=assistantGroup messages into standard assistant + tool message sequences
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* AssistantGroup messages are created when assistant messages with tools are merged with their tool results.
|
|
13
13
|
* This processor converts them back to a flat structure that AI models can understand.
|
|
14
14
|
*/
|
|
15
15
|
export class GroupMessageFlattenProcessor extends BaseProcessor {
|
|
@@ -31,8 +31,8 @@ export class GroupMessageFlattenProcessor extends BaseProcessor {
|
|
|
31
31
|
|
|
32
32
|
// Process each message
|
|
33
33
|
for (const message of clonedContext.messages) {
|
|
34
|
-
// Check if this is
|
|
35
|
-
if (message.role === '
|
|
34
|
+
// Check if this is an assistantGroup message with children field
|
|
35
|
+
if (message.role === 'assistantGroup' && message.children) {
|
|
36
36
|
// If children array is empty, skip this message entirely (no content to flatten)
|
|
37
37
|
if (message.children.length === 0) {
|
|
38
38
|
continue;
|
|
@@ -41,7 +41,9 @@ export class GroupMessageFlattenProcessor extends BaseProcessor {
|
|
|
41
41
|
processedCount++;
|
|
42
42
|
groupMessagesFlattened++;
|
|
43
43
|
|
|
44
|
-
log(
|
|
44
|
+
log(
|
|
45
|
+
`Flattening assistantGroup message ${message.id} with ${message.children.length} children`,
|
|
46
|
+
);
|
|
45
47
|
|
|
46
48
|
// Flatten each child
|
|
47
49
|
for (const child of message.children) {
|
|
@@ -146,7 +148,7 @@ export class GroupMessageFlattenProcessor extends BaseProcessor {
|
|
|
146
148
|
clonedContext.metadata.toolMessagesCreated = toolMessagesCreated;
|
|
147
149
|
|
|
148
150
|
log(
|
|
149
|
-
`
|
|
151
|
+
`AssistantGroup message flatten processing completed: ${groupMessagesFlattened} groups flattened, ${assistantMessagesCreated} assistant messages created, ${toolMessagesCreated} tool messages created`,
|
|
150
152
|
);
|
|
151
153
|
|
|
152
154
|
return this.markAsExecuted(clonedContext);
|
|
@@ -18,7 +18,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
18
18
|
const input: any[] = [
|
|
19
19
|
{
|
|
20
20
|
id: 'msg-group-1',
|
|
21
|
-
role: '
|
|
21
|
+
role: 'assistantGroup',
|
|
22
22
|
content: '',
|
|
23
23
|
createdAt: '2025-10-27T10:00:00.000Z',
|
|
24
24
|
updatedAt: '2025-10-27T10:00:10.000Z',
|
|
@@ -98,7 +98,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
98
98
|
const input: any[] = [
|
|
99
99
|
{
|
|
100
100
|
id: 'msg-group-1',
|
|
101
|
-
role: '
|
|
101
|
+
role: 'assistantGroup',
|
|
102
102
|
content: '',
|
|
103
103
|
children: [
|
|
104
104
|
{
|
|
@@ -168,7 +168,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
168
168
|
const input: any[] = [
|
|
169
169
|
{
|
|
170
170
|
id: 'msg-group-1',
|
|
171
|
-
role: '
|
|
171
|
+
role: 'assistantGroup',
|
|
172
172
|
content: '',
|
|
173
173
|
children: [
|
|
174
174
|
{
|
|
@@ -207,7 +207,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
207
207
|
const input: any[] = [
|
|
208
208
|
{
|
|
209
209
|
id: 'msg-group-1',
|
|
210
|
-
role: '
|
|
210
|
+
role: 'assistantGroup',
|
|
211
211
|
content: '',
|
|
212
212
|
children: [
|
|
213
213
|
{
|
|
@@ -255,7 +255,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
id: 'msg-group-1',
|
|
258
|
-
role: '
|
|
258
|
+
role: 'assistantGroup',
|
|
259
259
|
content: '',
|
|
260
260
|
children: [
|
|
261
261
|
{
|
|
@@ -307,7 +307,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
307
307
|
const input: any[] = [
|
|
308
308
|
{
|
|
309
309
|
id: 'msg-group-1',
|
|
310
|
-
role: '
|
|
310
|
+
role: 'assistantGroup',
|
|
311
311
|
content: '',
|
|
312
312
|
children: [],
|
|
313
313
|
},
|
|
@@ -326,7 +326,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
326
326
|
const input: any[] = [
|
|
327
327
|
{
|
|
328
328
|
id: 'msg-group-1',
|
|
329
|
-
role: '
|
|
329
|
+
role: 'assistantGroup',
|
|
330
330
|
content: '',
|
|
331
331
|
// No children field
|
|
332
332
|
},
|
|
@@ -346,7 +346,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
346
346
|
const input: any[] = [
|
|
347
347
|
{
|
|
348
348
|
id: 'msg-group-1',
|
|
349
|
-
role: '
|
|
349
|
+
role: 'assistantGroup',
|
|
350
350
|
content: '',
|
|
351
351
|
children: [
|
|
352
352
|
{
|
|
@@ -378,7 +378,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
378
378
|
const input: any[] = [
|
|
379
379
|
{
|
|
380
380
|
id: 'msg-group-1',
|
|
381
|
-
role: '
|
|
381
|
+
role: 'assistantGroup',
|
|
382
382
|
content: '',
|
|
383
383
|
children: [
|
|
384
384
|
{
|
|
@@ -410,7 +410,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
410
410
|
const input: any[] = [
|
|
411
411
|
{
|
|
412
412
|
id: 'msg-group-1',
|
|
413
|
-
role: '
|
|
413
|
+
role: 'assistantGroup',
|
|
414
414
|
content: '',
|
|
415
415
|
children: [
|
|
416
416
|
{
|
|
@@ -442,7 +442,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
442
442
|
const input: any[] = [
|
|
443
443
|
{
|
|
444
444
|
id: 'msg-group-1',
|
|
445
|
-
role: '
|
|
445
|
+
role: 'assistantGroup',
|
|
446
446
|
content: '',
|
|
447
447
|
parentId: 'parent-1',
|
|
448
448
|
threadId: 'thread-1',
|
|
@@ -497,7 +497,7 @@ describe('GroupMessageFlattenProcessor', () => {
|
|
|
497
497
|
const input: any[] = [
|
|
498
498
|
{
|
|
499
499
|
id: 'msg_LnIlOyMUnX1ylf',
|
|
500
|
-
role: '
|
|
500
|
+
role: 'assistantGroup',
|
|
501
501
|
content: '',
|
|
502
502
|
createdAt: '2025-10-27T10:47:59.475Z',
|
|
503
503
|
updatedAt: '2025-10-27T10:48:10.768Z',
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "msg_6zcyh1hELkzOmu",
|
|
4
|
+
"role": "user",
|
|
5
|
+
"content": "你好",
|
|
6
|
+
"createdAt": "2025-11-07T07:19:44.264Z",
|
|
7
|
+
"updatedAt": "2025-11-07T07:19:44.264Z",
|
|
8
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
9
|
+
"chunksList": [],
|
|
10
|
+
"extra": {},
|
|
11
|
+
"fileList": [],
|
|
12
|
+
"imageList": [],
|
|
13
|
+
"meta": {},
|
|
14
|
+
"videoList": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "msg_xXSCL5uzwDANSn",
|
|
18
|
+
"role": "assistant",
|
|
19
|
+
"content": "你好!我是您的AI助手,很高兴为您服务!我可以帮您:\n\n🔍 **搜索网络信息** - 查找最新资讯、技术文档、学术资料等\n💻 **搜索GitHub代码** - 查找真实项目中的代码示例和实现模式\n📄 **浏览网页内容** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个技术概念或库的使用方法\n- 需要查找最新的新闻或资讯\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您提供帮助!",
|
|
20
|
+
"metadata": {
|
|
21
|
+
"tps": 21.633839199225054,
|
|
22
|
+
"cost": 0.000171,
|
|
23
|
+
"ttft": 1287,
|
|
24
|
+
"latency": 7481,
|
|
25
|
+
"duration": 6194,
|
|
26
|
+
"totalTokens": 3934,
|
|
27
|
+
"inputTextTokens": 3800,
|
|
28
|
+
"outputTextTokens": 134,
|
|
29
|
+
"totalInputTokens": 3800,
|
|
30
|
+
"inputCachedTokens": 3776,
|
|
31
|
+
"totalOutputTokens": 134,
|
|
32
|
+
"inputCacheMissTokens": 24
|
|
33
|
+
},
|
|
34
|
+
"createdAt": "2025-11-07T07:19:44.908Z",
|
|
35
|
+
"updatedAt": "2025-11-07T07:19:53.454Z",
|
|
36
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
37
|
+
"parentId": "msg_6zcyh1hELkzOmu",
|
|
38
|
+
"chunksList": [],
|
|
39
|
+
"extra": {
|
|
40
|
+
"model": "deepseek-chat",
|
|
41
|
+
"provider": "deepseek"
|
|
42
|
+
},
|
|
43
|
+
"fileList": [],
|
|
44
|
+
"imageList": [],
|
|
45
|
+
"meta": {},
|
|
46
|
+
"model": "deepseek-chat",
|
|
47
|
+
"provider": "deepseek",
|
|
48
|
+
"videoList": []
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "msg_HhaoxginXhbfU9",
|
|
52
|
+
"role": "user",
|
|
53
|
+
"content": "你好",
|
|
54
|
+
"metadata": {
|
|
55
|
+
"activeBranchIndex": 1
|
|
56
|
+
},
|
|
57
|
+
"createdAt": "2025-11-07T07:21:05.366Z",
|
|
58
|
+
"updatedAt": "2025-11-07T07:24:17.810Z",
|
|
59
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
60
|
+
"parentId": "msg_xXSCL5uzwDANSn",
|
|
61
|
+
"chunksList": [],
|
|
62
|
+
"extra": {},
|
|
63
|
+
"fileList": [],
|
|
64
|
+
"imageList": [],
|
|
65
|
+
"meta": {},
|
|
66
|
+
"videoList": []
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "msg_h5nXrbCVGj2uWy",
|
|
70
|
+
"role": "assistant",
|
|
71
|
+
"content": "你好!很高兴再次与您交流!😊\n\n我是您的AI助手,可以为您提供多种帮助:\n\n**我能做什么:**\n- 🔍 **网络搜索** - 查找最新资讯、技术文档、学术资料等\n- 💻 **GitHub代码搜索** - 查找真实项目中的代码示例和最佳实践\n- 📄 **网页内容获取** - 提取特定网页的详细信息\n\n**例如您可以问我:**\n- \"帮我搜索一下React Hooks的最佳实践\"\n- \"查找Python中如何处理异常的真实代码示例\"\n- \"获取某个技术博客的最新文章内容\"\n- \"了解当前热门的技术趋势\"\n\n请告诉我您今天需要什么帮助?我会根据您的具体需求选择最合适的工具来为您服务!",
|
|
72
|
+
"metadata": {
|
|
73
|
+
"tps": 20.645337708504236,
|
|
74
|
+
"cost": 0.000216,
|
|
75
|
+
"ttft": 1524,
|
|
76
|
+
"latency": 8838,
|
|
77
|
+
"duration": 7314,
|
|
78
|
+
"totalTokens": 4086,
|
|
79
|
+
"inputTextTokens": 3935,
|
|
80
|
+
"outputTextTokens": 151,
|
|
81
|
+
"totalInputTokens": 3935,
|
|
82
|
+
"inputCachedTokens": 3776,
|
|
83
|
+
"totalOutputTokens": 151,
|
|
84
|
+
"inputCacheMissTokens": 159
|
|
85
|
+
},
|
|
86
|
+
"createdAt": "2025-11-07T07:21:11.767Z",
|
|
87
|
+
"updatedAt": "2025-11-07T07:21:20.560Z",
|
|
88
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
89
|
+
"parentId": "msg_HhaoxginXhbfU9",
|
|
90
|
+
"chunksList": [],
|
|
91
|
+
"extra": {
|
|
92
|
+
"model": "deepseek-chat",
|
|
93
|
+
"provider": "deepseek"
|
|
94
|
+
},
|
|
95
|
+
"fileList": [],
|
|
96
|
+
"imageList": [],
|
|
97
|
+
"meta": {},
|
|
98
|
+
"model": "deepseek-chat",
|
|
99
|
+
"provider": "deepseek",
|
|
100
|
+
"videoList": []
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "msg_eEAXz3HLKeAmEQ",
|
|
104
|
+
"role": "assistant",
|
|
105
|
+
"content": "你好!😊 我是您的AI助手,很高兴再次与您交流!\n\n我可以为您提供多种帮助:\n\n🔍 **网络搜索** - 查找最新资讯、技术文档、学术资料等\n💻 **GitHub代码搜索** - 查找真实项目中的代码示例和实现模式\n📄 **网页内容抓取** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个编程概念或库的使用方法\n- 需要查找最新的技术资讯或新闻\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您服务!",
|
|
106
|
+
"metadata": {
|
|
107
|
+
"tps": 23.98775093569241,
|
|
108
|
+
"cost": 0.000179,
|
|
109
|
+
"ttft": 1522,
|
|
110
|
+
"latency": 7400,
|
|
111
|
+
"duration": 5878,
|
|
112
|
+
"totalTokens": 4076,
|
|
113
|
+
"inputTextTokens": 3935,
|
|
114
|
+
"outputTextTokens": 141,
|
|
115
|
+
"totalInputTokens": 3935,
|
|
116
|
+
"inputCachedTokens": 3904,
|
|
117
|
+
"totalOutputTokens": 141,
|
|
118
|
+
"inputCacheMissTokens": 31
|
|
119
|
+
},
|
|
120
|
+
"createdAt": "2025-11-07T07:21:41.587Z",
|
|
121
|
+
"updatedAt": "2025-11-07T07:21:48.866Z",
|
|
122
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
123
|
+
"parentId": "msg_HhaoxginXhbfU9",
|
|
124
|
+
"chunksList": [],
|
|
125
|
+
"extra": {
|
|
126
|
+
"model": "deepseek-chat",
|
|
127
|
+
"provider": "deepseek"
|
|
128
|
+
},
|
|
129
|
+
"fileList": [],
|
|
130
|
+
"imageList": [],
|
|
131
|
+
"meta": {},
|
|
132
|
+
"model": "deepseek-chat",
|
|
133
|
+
"provider": "deepseek",
|
|
134
|
+
"videoList": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "msg_GjcBeBlQ69teA7",
|
|
138
|
+
"role": "assistant",
|
|
139
|
+
"content": "你好!我是您的AI助手,很高兴为您服务!\n\n我可以为您提供以下帮助:\n\n🔍 **网络搜索** - 查找最新的新闻、技术文档、学术资料等\n💻 **GitHub代码搜索** - 查找真实项目中的代码示例和最佳实践\n📄 **网页内容获取** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个技术概念或库的使用方法\n- 需要查找最新的新闻或资讯\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您提供帮助!",
|
|
140
|
+
"metadata": {
|
|
141
|
+
"tps": 23.99573409171703,
|
|
142
|
+
"cost": 0.000176,
|
|
143
|
+
"ttft": 1194,
|
|
144
|
+
"latency": 6820,
|
|
145
|
+
"duration": 5626,
|
|
146
|
+
"totalTokens": 4070,
|
|
147
|
+
"inputTextTokens": 3935,
|
|
148
|
+
"outputTextTokens": 135,
|
|
149
|
+
"totalInputTokens": 3935,
|
|
150
|
+
"inputCachedTokens": 3904,
|
|
151
|
+
"totalOutputTokens": 135,
|
|
152
|
+
"inputCacheMissTokens": 31
|
|
153
|
+
},
|
|
154
|
+
"createdAt": "2025-11-07T07:22:25.223Z",
|
|
155
|
+
"updatedAt": "2025-11-07T07:22:32.162Z",
|
|
156
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
157
|
+
"parentId": "msg_HhaoxginXhbfU9",
|
|
158
|
+
"chunksList": [],
|
|
159
|
+
"extra": {
|
|
160
|
+
"model": "deepseek-chat",
|
|
161
|
+
"provider": "deepseek"
|
|
162
|
+
},
|
|
163
|
+
"fileList": [],
|
|
164
|
+
"imageList": [],
|
|
165
|
+
"meta": {},
|
|
166
|
+
"model": "deepseek-chat",
|
|
167
|
+
"provider": "deepseek",
|
|
168
|
+
"videoList": []
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "msg_nSG0QuSDSmYlXj",
|
|
172
|
+
"role": "user",
|
|
173
|
+
"content": "你好",
|
|
174
|
+
"createdAt": "2025-11-07T07:23:33.255Z",
|
|
175
|
+
"updatedAt": "2025-11-07T07:23:33.255Z",
|
|
176
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
177
|
+
"parentId": "msg_eEAXz3HLKeAmEQ",
|
|
178
|
+
"chunksList": [],
|
|
179
|
+
"extra": {},
|
|
180
|
+
"fileList": [],
|
|
181
|
+
"imageList": [],
|
|
182
|
+
"meta": {},
|
|
183
|
+
"videoList": []
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "msg_VMXrVH9hXeCP1R",
|
|
187
|
+
"role": "user",
|
|
188
|
+
"content": "你是谁?",
|
|
189
|
+
"createdAt": "2025-11-07T07:23:49.990Z",
|
|
190
|
+
"updatedAt": "2025-11-07T07:23:49.990Z",
|
|
191
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
192
|
+
"parentId": "msg_GjcBeBlQ69teA7",
|
|
193
|
+
"chunksList": [],
|
|
194
|
+
"extra": {},
|
|
195
|
+
"fileList": [],
|
|
196
|
+
"imageList": [],
|
|
197
|
+
"meta": {},
|
|
198
|
+
"videoList": []
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "msg_wpUElxuYslyASJ",
|
|
202
|
+
"role": "assistant",
|
|
203
|
+
"content": "今天天气怎么样?",
|
|
204
|
+
"createdAt": "2025-11-07T07:24:15.934Z",
|
|
205
|
+
"updatedAt": "2025-11-07T07:24:15.934Z",
|
|
206
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
207
|
+
"chunksList": [],
|
|
208
|
+
"extra": {},
|
|
209
|
+
"fileList": [],
|
|
210
|
+
"imageList": [],
|
|
211
|
+
"meta": {},
|
|
212
|
+
"videoList": []
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "msg_LHG8QeuqpcFZml",
|
|
216
|
+
"role": "user",
|
|
217
|
+
"content": "你好",
|
|
218
|
+
"createdAt": "2025-11-07T07:35:12.401Z",
|
|
219
|
+
"updatedAt": "2025-11-07T07:35:12.401Z",
|
|
220
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
221
|
+
"parentId": "msg_wpUElxuYslyASJ",
|
|
222
|
+
"chunksList": [],
|
|
223
|
+
"extra": {},
|
|
224
|
+
"fileList": [],
|
|
225
|
+
"imageList": [],
|
|
226
|
+
"meta": {},
|
|
227
|
+
"videoList": []
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "msg_jEKKxHQbz5duC6",
|
|
231
|
+
"role": "assistant",
|
|
232
|
+
"content": "...",
|
|
233
|
+
"createdAt": "2025-11-07T07:35:13.056Z",
|
|
234
|
+
"updatedAt": "2025-11-07T07:35:13.056Z",
|
|
235
|
+
"topicId": "tpc_ruVgxvO16Ljh",
|
|
236
|
+
"parentId": "msg_LHG8QeuqpcFZml",
|
|
237
|
+
"chunksList": [],
|
|
238
|
+
"extra": {
|
|
239
|
+
"model": "deepseek-chat",
|
|
240
|
+
"provider": "deepseek"
|
|
241
|
+
},
|
|
242
|
+
"fileList": [],
|
|
243
|
+
"imageList": [],
|
|
244
|
+
"meta": {},
|
|
245
|
+
"model": "deepseek-chat",
|
|
246
|
+
"provider": "deepseek",
|
|
247
|
+
"videoList": []
|
|
248
|
+
}
|
|
249
|
+
]
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { Message } from '../../../../types';
|
|
2
2
|
import activeIndex1 from './active-index-1.json';
|
|
3
3
|
import assistantBranch from './assistant-branch.json';
|
|
4
|
+
import assistantGroupBranches from './assistant-group-branches.json';
|
|
4
5
|
import assistantUserBranch from './assistant-user-branch.json';
|
|
5
6
|
import conversation from './conversation.json';
|
|
7
|
+
import multiAssistantGroup from './multi-assistant-group.json';
|
|
6
8
|
import nested from './nested.json';
|
|
7
9
|
|
|
8
10
|
export const branch = {
|
|
9
11
|
activeIndex1: activeIndex1 as Message[],
|
|
10
12
|
assistantBranch: assistantBranch as Message[],
|
|
13
|
+
assistantGroupBranches: assistantGroupBranches as unknown as Message[],
|
|
11
14
|
assistantUserBranch: assistantUserBranch as Message[],
|
|
12
15
|
conversation: conversation as Message[],
|
|
16
|
+
multiAssistantGroup: multiAssistantGroup as Message[],
|
|
13
17
|
nested: nested as Message[],
|
|
14
18
|
};
|
package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/multi-assistant-group.json
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "msg-user-1",
|
|
4
|
+
"role": "user",
|
|
5
|
+
"content": "杭州和北京天气如何",
|
|
6
|
+
"parentId": null,
|
|
7
|
+
"createdAt": 1704067200000,
|
|
8
|
+
"updatedAt": 1704067200000,
|
|
9
|
+
"meta": {},
|
|
10
|
+
"metadata": {
|
|
11
|
+
"activeBranchIndex": 2
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "msg-assistant-1",
|
|
16
|
+
"role": "assistant",
|
|
17
|
+
"content": "",
|
|
18
|
+
"parentId": "msg-user-1",
|
|
19
|
+
"createdAt": 1704067202000,
|
|
20
|
+
"updatedAt": 1704067202000,
|
|
21
|
+
"meta": {},
|
|
22
|
+
"metadata": {
|
|
23
|
+
"totalTokens": 3751,
|
|
24
|
+
"totalInputTokens": 3441,
|
|
25
|
+
"totalOutputTokens": 310
|
|
26
|
+
},
|
|
27
|
+
"tools": [
|
|
28
|
+
{
|
|
29
|
+
"id": "call-1",
|
|
30
|
+
"type": "builtin",
|
|
31
|
+
"apiName": "search",
|
|
32
|
+
"arguments": "{\"query\":\"杭州 北京 天气 现在\"}",
|
|
33
|
+
"identifier": "lobe-web-browsing"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "msg-tool-1",
|
|
39
|
+
"role": "tool",
|
|
40
|
+
"content": "<searchResults>\n <item title=\"Weather Site\" url=\"https://weather.example.com/\">Weather information...</item>\n</searchResults>",
|
|
41
|
+
"parentId": "msg-assistant-1",
|
|
42
|
+
"createdAt": 1704067205000,
|
|
43
|
+
"updatedAt": 1704067205000,
|
|
44
|
+
"meta": {},
|
|
45
|
+
"tool_call_id": "call-1",
|
|
46
|
+
"plugin": {
|
|
47
|
+
"apiName": "search",
|
|
48
|
+
"identifier": "lobe-web-browsing",
|
|
49
|
+
"type": "builtin"
|
|
50
|
+
},
|
|
51
|
+
"pluginState": {
|
|
52
|
+
"query": "杭州 北京 天气 现在",
|
|
53
|
+
"results": [
|
|
54
|
+
{
|
|
55
|
+
"url": "https://weather.example.com/",
|
|
56
|
+
"title": "Weather Site",
|
|
57
|
+
"content": "Weather information..."
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "msg-assistant-2",
|
|
64
|
+
"role": "assistant",
|
|
65
|
+
"content": "",
|
|
66
|
+
"parentId": "msg-tool-1",
|
|
67
|
+
"createdAt": 1704067208000,
|
|
68
|
+
"updatedAt": 1704067208000,
|
|
69
|
+
"meta": {},
|
|
70
|
+
"metadata": {
|
|
71
|
+
"totalTokens": 4311,
|
|
72
|
+
"totalInputTokens": 4128,
|
|
73
|
+
"totalOutputTokens": 183
|
|
74
|
+
},
|
|
75
|
+
"tools": [
|
|
76
|
+
{
|
|
77
|
+
"id": "call-2",
|
|
78
|
+
"type": "builtin",
|
|
79
|
+
"apiName": "search",
|
|
80
|
+
"arguments": "{\"query\":\"杭州 天气 北京 天气\"}",
|
|
81
|
+
"identifier": "lobe-web-browsing"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "msg-tool-2",
|
|
87
|
+
"role": "tool",
|
|
88
|
+
"content": "<searchResults>\n <item title=\"Weather Info\" url=\"https://weather2.example.com/\">More weather...</item>\n</searchResults>",
|
|
89
|
+
"parentId": "msg-assistant-2",
|
|
90
|
+
"createdAt": 1704067211000,
|
|
91
|
+
"updatedAt": 1704067211000,
|
|
92
|
+
"meta": {},
|
|
93
|
+
"tool_call_id": "call-2",
|
|
94
|
+
"plugin": {
|
|
95
|
+
"apiName": "search",
|
|
96
|
+
"identifier": "lobe-web-browsing",
|
|
97
|
+
"type": "builtin"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "msg-assistant-3",
|
|
102
|
+
"role": "assistant",
|
|
103
|
+
"content": "你是想看现在的实时天气,还是未来几天的天气预报?",
|
|
104
|
+
"parentId": "msg-tool-2",
|
|
105
|
+
"createdAt": 1704067214000,
|
|
106
|
+
"updatedAt": 1704067214000,
|
|
107
|
+
"meta": {},
|
|
108
|
+
"metadata": {
|
|
109
|
+
"totalTokens": 6643,
|
|
110
|
+
"totalInputTokens": 6135,
|
|
111
|
+
"totalOutputTokens": 508
|
|
112
|
+
},
|
|
113
|
+
"reasoning": {
|
|
114
|
+
"content": "用户询问天气,我需要确认他们想要的是实时天气还是预报。"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "msg-assistant-4",
|
|
119
|
+
"role": "assistant",
|
|
120
|
+
"content": "",
|
|
121
|
+
"parentId": "msg-user-1",
|
|
122
|
+
"createdAt": 1704067220000,
|
|
123
|
+
"updatedAt": 1704067220000,
|
|
124
|
+
"meta": {},
|
|
125
|
+
"metadata": {
|
|
126
|
+
"totalTokens": 3809,
|
|
127
|
+
"totalInputTokens": 3440,
|
|
128
|
+
"totalOutputTokens": 369
|
|
129
|
+
},
|
|
130
|
+
"tools": [
|
|
131
|
+
{
|
|
132
|
+
"id": "call-3",
|
|
133
|
+
"type": "builtin",
|
|
134
|
+
"apiName": "search",
|
|
135
|
+
"arguments": "{\"query\":\"!google 杭州 天气\"}",
|
|
136
|
+
"identifier": "lobe-web-browsing"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "call-4",
|
|
140
|
+
"type": "builtin",
|
|
141
|
+
"apiName": "search",
|
|
142
|
+
"arguments": "{\"query\":\"!google 北京 天气\"}",
|
|
143
|
+
"identifier": "lobe-web-browsing"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "msg-tool-3",
|
|
149
|
+
"role": "tool",
|
|
150
|
+
"content": "<searchResults />",
|
|
151
|
+
"parentId": "msg-assistant-4",
|
|
152
|
+
"createdAt": 1704067223000,
|
|
153
|
+
"updatedAt": 1704067223000,
|
|
154
|
+
"meta": {},
|
|
155
|
+
"tool_call_id": "call-3",
|
|
156
|
+
"plugin": {
|
|
157
|
+
"apiName": "search",
|
|
158
|
+
"identifier": "lobe-web-browsing",
|
|
159
|
+
"type": "builtin"
|
|
160
|
+
},
|
|
161
|
+
"pluginState": {
|
|
162
|
+
"query": "!google 杭州 天气",
|
|
163
|
+
"results": []
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "msg-tool-4",
|
|
168
|
+
"role": "tool",
|
|
169
|
+
"content": "<searchResults />",
|
|
170
|
+
"parentId": "msg-assistant-4",
|
|
171
|
+
"createdAt": 1704067226000,
|
|
172
|
+
"updatedAt": 1704067226000,
|
|
173
|
+
"meta": {},
|
|
174
|
+
"tool_call_id": "call-4",
|
|
175
|
+
"plugin": {
|
|
176
|
+
"apiName": "search",
|
|
177
|
+
"identifier": "lobe-web-browsing",
|
|
178
|
+
"type": "builtin"
|
|
179
|
+
},
|
|
180
|
+
"pluginState": {
|
|
181
|
+
"query": "!google 北京 天气",
|
|
182
|
+
"results": []
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "msg-assistant-5",
|
|
187
|
+
"role": "assistant",
|
|
188
|
+
"content": "我可以帮你查天气 —— 想确认一下你的偏好再去查实时数据。",
|
|
189
|
+
"parentId": "msg-tool-4",
|
|
190
|
+
"createdAt": 1704067229000,
|
|
191
|
+
"updatedAt": 1704067229000,
|
|
192
|
+
"meta": {},
|
|
193
|
+
"metadata": {
|
|
194
|
+
"totalTokens": 7100,
|
|
195
|
+
"totalInputTokens": 6425,
|
|
196
|
+
"totalOutputTokens": 675
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "msg-assistant-6",
|
|
201
|
+
"role": "assistant",
|
|
202
|
+
"content": "",
|
|
203
|
+
"parentId": "msg-user-1",
|
|
204
|
+
"createdAt": 1704067240000,
|
|
205
|
+
"updatedAt": 1704067240000,
|
|
206
|
+
"meta": {},
|
|
207
|
+
"metadata": {
|
|
208
|
+
"totalTokens": 3627,
|
|
209
|
+
"totalInputTokens": 3441,
|
|
210
|
+
"totalOutputTokens": 186
|
|
211
|
+
},
|
|
212
|
+
"tools": [
|
|
213
|
+
{
|
|
214
|
+
"id": "call-5",
|
|
215
|
+
"type": "builtin",
|
|
216
|
+
"apiName": "search",
|
|
217
|
+
"arguments": "{\"query\":\"杭州 天气 现在 北京 天气 现在\"}",
|
|
218
|
+
"identifier": "lobe-web-browsing"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "msg-tool-5",
|
|
224
|
+
"role": "tool",
|
|
225
|
+
"content": "<searchResults>\n <item title=\"Weather Portal\" url=\"https://weather3.example.com/\">Weather data...</item>\n</searchResults>",
|
|
226
|
+
"parentId": "msg-assistant-6",
|
|
227
|
+
"createdAt": 1704067243000,
|
|
228
|
+
"updatedAt": 1704067243000,
|
|
229
|
+
"meta": {},
|
|
230
|
+
"tool_call_id": "call-5",
|
|
231
|
+
"plugin": {
|
|
232
|
+
"apiName": "search",
|
|
233
|
+
"identifier": "lobe-web-browsing",
|
|
234
|
+
"type": "builtin"
|
|
235
|
+
},
|
|
236
|
+
"pluginState": {
|
|
237
|
+
"query": "杭州 天气 现在 北京 天气 现在",
|
|
238
|
+
"results": [
|
|
239
|
+
{
|
|
240
|
+
"url": "https://weather3.example.com/",
|
|
241
|
+
"title": "Weather Portal"
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "msg-assistant-7",
|
|
248
|
+
"role": "assistant",
|
|
249
|
+
"content": "好的——我可以立刻去查并把结果发给你。",
|
|
250
|
+
"parentId": "msg-tool-5",
|
|
251
|
+
"createdAt": 1704067246000,
|
|
252
|
+
"updatedAt": 1704067246000,
|
|
253
|
+
"meta": {},
|
|
254
|
+
"metadata": {
|
|
255
|
+
"totalTokens": 8188,
|
|
256
|
+
"totalInputTokens": 7604,
|
|
257
|
+
"totalOutputTokens": 584
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
]
|