@lobehub/lobehub 2.0.0-next.190 → 2.0.0-next.191
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 +9 -0
- package/package.json +1 -1
- package/packages/const/src/utils/merge.test.ts +679 -0
- package/packages/context-engine/src/processors/__tests__/AgentCouncilFlatten.test.ts +0 -20
- package/packages/context-engine/src/processors/__tests__/MessageContent.test.ts +5 -23
- package/packages/context-engine/src/providers/SystemRoleInjector.ts +0 -1
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/agentCouncil/simple.json +4 -19
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/agentCouncil/with-supervisor-reply.json +4 -23
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/agentGroup/speak-different-agent.json +3 -13
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/assistant-chain-with-followup.json +3 -8
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/assistantGroup/assistant-with-tools.json +21 -17
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/assistantGroup/tools-with-branches.json +15 -15
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/active-index-1.json +3 -13
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/assistant-branch.json +2 -9
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/assistant-group-branches.json +0 -11
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/assistant-user-branch.json +5 -15
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/conversation.json +4 -14
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/multi-assistant-group.json +0 -13
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/nested.json +2 -15
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/compare/simple.json +4 -9
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/compare/with-tools.json +8 -17
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/linear-conversation.json +3 -7
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/tasks/simple.json +1 -7
- package/packages/conversation-flow/src/__tests__/fixtures/inputs/tasks/with-summary.json +10 -11
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/agentCouncil/simple.json +2 -32
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/agentCouncil/with-supervisor-reply.json +8 -46
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/agentGroup/speak-different-agent.json +5 -24
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/assistant-chain-with-followup.json +5 -13
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/assistantGroup/assistant-with-tools.json +6 -16
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/assistantGroup/tools-with-branches.json +6 -17
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/active-index-1.json +4 -18
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/assistant-branch.json +4 -16
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/assistant-group-branches.json +0 -19
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/assistant-user-branch.json +8 -24
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/conversation.json +7 -23
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/multi-assistant-group.json +0 -15
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/nested.json +4 -25
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/compare/simple.json +2 -13
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/compare/with-tools.json +4 -20
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/linear-conversation.json +4 -12
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/tasks/simple.json +2 -14
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/tasks/with-summary.json +20 -22
- package/packages/conversation-flow/src/__tests__/indexing.test.ts +0 -35
- package/packages/conversation-flow/src/__tests__/structuring.test.ts +0 -41
- package/packages/conversation-flow/src/transformation/FlatListBuilder.ts +0 -4
- package/packages/conversation-flow/src/transformation/__tests__/BranchResolver.test.ts +0 -10
- package/packages/conversation-flow/src/transformation/__tests__/ContextTreeBuilder.test.ts +0 -19
- package/packages/conversation-flow/src/transformation/__tests__/FlatListBuilder.test.ts +0 -37
- package/packages/conversation-flow/src/transformation/__tests__/MessageCollector.test.ts +0 -12
- package/packages/conversation-flow/src/transformation/__tests__/MessageTransformer.test.ts +0 -2
- package/packages/database/src/models/message.ts +0 -1
- package/packages/prompts/src/prompts/chatMessages/index.test.ts +0 -1
- package/packages/prompts/src/prompts/groupChat/__snapshots__/index.test.ts.snap +0 -21
- package/packages/prompts/src/prompts/groupChat/index.test.ts +0 -3
- package/packages/types/src/message/ui/chat.ts +0 -2
- package/src/features/Conversation/store/slices/data/action.test.ts +0 -14
- package/src/features/Conversation/store/slices/data/reducer.test.ts +0 -21
- package/src/features/Conversation/store/slices/data/reducer.ts +1 -1
- package/src/features/Conversation/store/slices/message/action/crud.test.ts +0 -10
- package/src/server/modules/Mecha/ContextEngineering/__tests__/serverMessagesEngine.test.ts +3 -5
- package/src/server/routers/lambda/__tests__/message.test.ts +1 -2
- package/src/server/services/agentRuntime/AgentRuntimeService.ts +109 -109
- package/src/server/services/agentRuntime/types.ts +8 -8
- package/src/server/services/doc/index.tsx +2 -2
- package/src/server/services/generation/index.ts +2 -2
- package/src/server/services/message/index.ts +3 -3
- package/src/server/services/usage/index.ts +4 -4
- package/src/services/chat/chat.test.ts +0 -6
- package/src/services/chat/mecha/contextEngineering.test.ts +3 -29
- package/src/services/chat/mecha/modelParamsResolver.test.ts +803 -0
- package/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts +0 -2
- package/src/store/chat/agents/__tests__/createAgentExecutors/call-tool.test.ts +0 -6
- package/src/store/chat/agents/__tests__/createAgentExecutors/fixtures/mockMessages.ts +0 -3
- package/src/store/chat/agents/createAgentExecutors.ts +4 -4
- package/src/store/chat/slices/aiAgent/actions/__tests__/agentGroup.test.ts +0 -2
- package/src/store/chat/slices/aiAgent/actions/__tests__/runAgent.test.ts +0 -3
- package/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts +0 -1
- package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +0 -4
- package/src/store/chat/slices/message/reducer.test.ts +0 -5
- package/src/store/chat/slices/message/reducer.ts +1 -1
- package/src/store/chat/slices/message/selectors/displayMessage.test.ts +0 -13
- package/src/store/chat/slices/message/selectors/displayMessage.ts +3 -34
- package/src/store/chat/slices/portal/selectors.test.ts +0 -7
- package/src/store/chat/slices/thread/action.test.ts +0 -1
- package/src/store/chat/slices/translate/action.test.ts +0 -1
- package/src/store/tool/slices/oldStore/action.test.ts +0 -1
|
@@ -55,7 +55,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
|
-
meta: {},
|
|
59
58
|
role: 'agentCouncil',
|
|
60
59
|
updatedAt: 1704067206000,
|
|
61
60
|
},
|
|
@@ -112,7 +111,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
112
111
|
parentId: 'msg-broadcast-tool-1',
|
|
113
112
|
createdAt: 1704067205000,
|
|
114
113
|
updatedAt: 1704067205000,
|
|
115
|
-
meta: {},
|
|
116
114
|
tools: [
|
|
117
115
|
{
|
|
118
116
|
id: 'tool-1',
|
|
@@ -130,7 +128,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
130
128
|
],
|
|
131
129
|
},
|
|
132
130
|
],
|
|
133
|
-
meta: {},
|
|
134
131
|
role: 'agentCouncil',
|
|
135
132
|
updatedAt: 1704067206000,
|
|
136
133
|
},
|
|
@@ -206,7 +203,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
206
203
|
],
|
|
207
204
|
},
|
|
208
205
|
],
|
|
209
|
-
meta: {},
|
|
210
206
|
role: 'agentCouncil',
|
|
211
207
|
updatedAt: 1704067206000,
|
|
212
208
|
},
|
|
@@ -252,16 +248,13 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
252
248
|
id: 'msg-agent-1',
|
|
253
249
|
role: 'assistant',
|
|
254
250
|
content: 'Response from agent 1',
|
|
255
|
-
meta: {},
|
|
256
251
|
},
|
|
257
252
|
{
|
|
258
253
|
id: 'msg-agent-2',
|
|
259
254
|
role: 'assistant',
|
|
260
255
|
content: 'Response from agent 2',
|
|
261
|
-
meta: {},
|
|
262
256
|
},
|
|
263
257
|
],
|
|
264
|
-
meta: {},
|
|
265
258
|
role: 'agentCouncil',
|
|
266
259
|
updatedAt: 1704067206000,
|
|
267
260
|
},
|
|
@@ -297,7 +290,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
297
290
|
content: '',
|
|
298
291
|
id: 'agentCouncil-msg-1',
|
|
299
292
|
members: [],
|
|
300
|
-
meta: {},
|
|
301
293
|
role: 'agentCouncil',
|
|
302
294
|
},
|
|
303
295
|
];
|
|
@@ -316,7 +308,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
316
308
|
{
|
|
317
309
|
content: '',
|
|
318
310
|
id: 'agentCouncil-msg-1',
|
|
319
|
-
meta: {},
|
|
320
311
|
role: 'agentCouncil',
|
|
321
312
|
// No members field
|
|
322
313
|
},
|
|
@@ -346,10 +337,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
346
337
|
content: 'Thinking about the query...',
|
|
347
338
|
signature: 'sig-123',
|
|
348
339
|
},
|
|
349
|
-
meta: {},
|
|
350
340
|
},
|
|
351
341
|
],
|
|
352
|
-
meta: {},
|
|
353
342
|
role: 'agentCouncil',
|
|
354
343
|
},
|
|
355
344
|
];
|
|
@@ -380,10 +369,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
380
369
|
type: 'InvalidAPIKey',
|
|
381
370
|
message: 'API key is invalid',
|
|
382
371
|
},
|
|
383
|
-
meta: {},
|
|
384
372
|
},
|
|
385
373
|
],
|
|
386
|
-
meta: {},
|
|
387
374
|
role: 'agentCouncil',
|
|
388
375
|
},
|
|
389
376
|
];
|
|
@@ -414,10 +401,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
414
401
|
{ id: 'img-1', url: 'https://example.com/img1.jpg', alt: 'Image 1' },
|
|
415
402
|
{ id: 'img-2', url: 'https://example.com/img2.jpg', alt: 'Image 2' },
|
|
416
403
|
],
|
|
417
|
-
meta: {},
|
|
418
404
|
},
|
|
419
405
|
],
|
|
420
|
-
meta: {},
|
|
421
406
|
role: 'agentCouncil',
|
|
422
407
|
},
|
|
423
408
|
];
|
|
@@ -448,10 +433,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
448
433
|
threadId: 'thread-1',
|
|
449
434
|
groupId: 'group-1',
|
|
450
435
|
topicId: 'topic-1',
|
|
451
|
-
meta: {},
|
|
452
436
|
},
|
|
453
437
|
],
|
|
454
|
-
meta: {},
|
|
455
438
|
role: 'agentCouncil',
|
|
456
439
|
},
|
|
457
440
|
];
|
|
@@ -479,10 +462,8 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
479
462
|
role: 'assistantGroup',
|
|
480
463
|
content: '',
|
|
481
464
|
children: [],
|
|
482
|
-
meta: {},
|
|
483
465
|
},
|
|
484
466
|
],
|
|
485
|
-
meta: {},
|
|
486
467
|
role: 'agentCouncil',
|
|
487
468
|
},
|
|
488
469
|
];
|
|
@@ -585,7 +566,6 @@ describe('AgentCouncilFlattenProcessor', () => {
|
|
|
585
566
|
},
|
|
586
567
|
},
|
|
587
568
|
],
|
|
588
|
-
meta: {},
|
|
589
569
|
role: 'agentCouncil',
|
|
590
570
|
updatedAt: 1704067206000,
|
|
591
571
|
},
|
|
@@ -45,7 +45,6 @@ describe('MessageContentProcessor', () => {
|
|
|
45
45
|
imageList: [{ url: 'image_url', alt: '', id: 'test' } as ChatImageItem],
|
|
46
46
|
createdAt: Date.now(),
|
|
47
47
|
updatedAt: Date.now(),
|
|
48
|
-
meta: {},
|
|
49
48
|
},
|
|
50
49
|
];
|
|
51
50
|
|
|
@@ -75,7 +74,6 @@ describe('MessageContentProcessor', () => {
|
|
|
75
74
|
],
|
|
76
75
|
createdAt: Date.now(),
|
|
77
76
|
updatedAt: Date.now(),
|
|
78
|
-
meta: {},
|
|
79
77
|
},
|
|
80
78
|
];
|
|
81
79
|
|
|
@@ -108,7 +106,6 @@ describe('MessageContentProcessor', () => {
|
|
|
108
106
|
imageList: [{ url: 'image_url', alt: '', id: 'test' } as ChatImageItem],
|
|
109
107
|
createdAt: Date.now(),
|
|
110
108
|
updatedAt: Date.now(),
|
|
111
|
-
meta: {},
|
|
112
109
|
},
|
|
113
110
|
];
|
|
114
111
|
|
|
@@ -139,7 +136,6 @@ describe('MessageContentProcessor', () => {
|
|
|
139
136
|
],
|
|
140
137
|
createdAt: Date.now(),
|
|
141
138
|
updatedAt: Date.now(),
|
|
142
|
-
meta: {},
|
|
143
139
|
},
|
|
144
140
|
];
|
|
145
141
|
|
|
@@ -171,7 +167,6 @@ describe('MessageContentProcessor', () => {
|
|
|
171
167
|
],
|
|
172
168
|
createdAt: Date.now(),
|
|
173
169
|
updatedAt: Date.now(),
|
|
174
|
-
meta: {},
|
|
175
170
|
},
|
|
176
171
|
];
|
|
177
172
|
|
|
@@ -204,7 +199,6 @@ describe('MessageContentProcessor', () => {
|
|
|
204
199
|
],
|
|
205
200
|
createdAt: Date.now(),
|
|
206
201
|
updatedAt: Date.now(),
|
|
207
|
-
meta: {},
|
|
208
202
|
},
|
|
209
203
|
];
|
|
210
204
|
|
|
@@ -245,7 +239,6 @@ describe('MessageContentProcessor', () => {
|
|
|
245
239
|
],
|
|
246
240
|
createdAt: Date.now(),
|
|
247
241
|
updatedAt: Date.now(),
|
|
248
|
-
meta: {},
|
|
249
242
|
},
|
|
250
243
|
];
|
|
251
244
|
|
|
@@ -286,7 +279,6 @@ describe('MessageContentProcessor', () => {
|
|
|
286
279
|
],
|
|
287
280
|
createdAt: Date.now(),
|
|
288
281
|
updatedAt: Date.now(),
|
|
289
|
-
meta: {},
|
|
290
282
|
},
|
|
291
283
|
];
|
|
292
284
|
|
|
@@ -317,7 +309,6 @@ describe('MessageContentProcessor', () => {
|
|
|
317
309
|
},
|
|
318
310
|
createdAt: Date.now(),
|
|
319
311
|
updatedAt: Date.now(),
|
|
320
|
-
meta: {},
|
|
321
312
|
},
|
|
322
313
|
];
|
|
323
314
|
|
|
@@ -366,7 +357,6 @@ describe('MessageContentProcessor', () => {
|
|
|
366
357
|
],
|
|
367
358
|
createdAt: Date.now(),
|
|
368
359
|
updatedAt: Date.now(),
|
|
369
|
-
meta: {},
|
|
370
360
|
},
|
|
371
361
|
{
|
|
372
362
|
id: 'test2',
|
|
@@ -378,7 +368,6 @@ describe('MessageContentProcessor', () => {
|
|
|
378
368
|
},
|
|
379
369
|
createdAt: Date.now(),
|
|
380
370
|
updatedAt: Date.now(),
|
|
381
|
-
meta: {},
|
|
382
371
|
},
|
|
383
372
|
];
|
|
384
373
|
|
|
@@ -409,7 +398,6 @@ describe('MessageContentProcessor', () => {
|
|
|
409
398
|
videoList: [{ url: 'video_url', alt: 'test video', id: 'test' } as ChatVideoItem],
|
|
410
399
|
createdAt: Date.now(),
|
|
411
400
|
updatedAt: Date.now(),
|
|
412
|
-
meta: {},
|
|
413
401
|
},
|
|
414
402
|
];
|
|
415
403
|
|
|
@@ -440,7 +428,6 @@ describe('MessageContentProcessor', () => {
|
|
|
440
428
|
] as ChatVideoItem[],
|
|
441
429
|
createdAt: Date.now(),
|
|
442
430
|
updatedAt: Date.now(),
|
|
443
|
-
meta: {},
|
|
444
431
|
},
|
|
445
432
|
];
|
|
446
433
|
|
|
@@ -476,7 +463,6 @@ describe('MessageContentProcessor', () => {
|
|
|
476
463
|
] as ChatVideoItem[],
|
|
477
464
|
createdAt: Date.now(),
|
|
478
465
|
updatedAt: Date.now(),
|
|
479
|
-
meta: {},
|
|
480
466
|
},
|
|
481
467
|
];
|
|
482
468
|
|
|
@@ -510,7 +496,6 @@ describe('MessageContentProcessor', () => {
|
|
|
510
496
|
] as ChatVideoItem[],
|
|
511
497
|
createdAt: Date.now(),
|
|
512
498
|
updatedAt: Date.now(),
|
|
513
|
-
meta: {},
|
|
514
499
|
},
|
|
515
500
|
];
|
|
516
501
|
|
|
@@ -550,7 +535,6 @@ describe('MessageContentProcessor', () => {
|
|
|
550
535
|
] as ChatVideoItem[],
|
|
551
536
|
createdAt: Date.now(),
|
|
552
537
|
updatedAt: Date.now(),
|
|
553
|
-
meta: {},
|
|
554
538
|
},
|
|
555
539
|
];
|
|
556
540
|
|
|
@@ -590,7 +574,6 @@ describe('MessageContentProcessor', () => {
|
|
|
590
574
|
},
|
|
591
575
|
createdAt: Date.now(),
|
|
592
576
|
updatedAt: Date.now(),
|
|
593
|
-
meta: {},
|
|
594
577
|
},
|
|
595
578
|
];
|
|
596
579
|
|
|
@@ -631,7 +614,6 @@ describe('MessageContentProcessor', () => {
|
|
|
631
614
|
},
|
|
632
615
|
createdAt: Date.now(),
|
|
633
616
|
updatedAt: Date.now(),
|
|
634
|
-
meta: {},
|
|
635
617
|
},
|
|
636
618
|
];
|
|
637
619
|
|
|
@@ -675,7 +657,6 @@ describe('MessageContentProcessor', () => {
|
|
|
675
657
|
},
|
|
676
658
|
createdAt: Date.now(),
|
|
677
659
|
updatedAt: Date.now(),
|
|
678
|
-
meta: {},
|
|
679
660
|
},
|
|
680
661
|
];
|
|
681
662
|
|
|
@@ -717,7 +698,6 @@ describe('MessageContentProcessor', () => {
|
|
|
717
698
|
},
|
|
718
699
|
createdAt: Date.now(),
|
|
719
700
|
updatedAt: Date.now(),
|
|
720
|
-
meta: {},
|
|
721
701
|
},
|
|
722
702
|
];
|
|
723
703
|
|
|
@@ -753,7 +733,6 @@ describe('MessageContentProcessor', () => {
|
|
|
753
733
|
},
|
|
754
734
|
createdAt: Date.now(),
|
|
755
735
|
updatedAt: Date.now(),
|
|
756
|
-
meta: {},
|
|
757
736
|
},
|
|
758
737
|
];
|
|
759
738
|
|
|
@@ -778,7 +757,11 @@ describe('MessageContentProcessor', () => {
|
|
|
778
757
|
role: 'assistant',
|
|
779
758
|
content: JSON.stringify([
|
|
780
759
|
{ type: 'text', text: 'Analysis result:', thoughtSignature: 'sig-001' },
|
|
781
|
-
{
|
|
760
|
+
{
|
|
761
|
+
type: 'image',
|
|
762
|
+
image: 'https://s3.example.com/chart.png',
|
|
763
|
+
thoughtSignature: 'sig-002',
|
|
764
|
+
},
|
|
782
765
|
{ type: 'text', text: 'Conclusion' },
|
|
783
766
|
]),
|
|
784
767
|
metadata: {
|
|
@@ -786,7 +769,6 @@ describe('MessageContentProcessor', () => {
|
|
|
786
769
|
},
|
|
787
770
|
createdAt: Date.now(),
|
|
788
771
|
updatedAt: Date.now(),
|
|
789
|
-
meta: {},
|
|
790
772
|
},
|
|
791
773
|
];
|
|
792
774
|
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
|
6
6
|
"parentId": null,
|
|
7
7
|
"createdAt": 1704067200000,
|
|
8
|
-
"updatedAt": 1704067200000
|
|
9
|
-
"meta": {}
|
|
8
|
+
"updatedAt": 1704067200000
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"id": "msg-supervisor-1",
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
"parentId": "msg-user-1",
|
|
17
16
|
"createdAt": 1704067201000,
|
|
18
17
|
"updatedAt": 1704067201000,
|
|
19
|
-
"meta": {},
|
|
20
18
|
"tools": [
|
|
21
19
|
{
|
|
22
20
|
"id": "call_broadcast_1",
|
|
@@ -38,7 +36,6 @@
|
|
|
38
36
|
"tool_call_id": "call_broadcast_1",
|
|
39
37
|
"createdAt": 1704067202000,
|
|
40
38
|
"updatedAt": 1704067202000,
|
|
41
|
-
"meta": {},
|
|
42
39
|
"metadata": {
|
|
43
40
|
"agentCouncil": true
|
|
44
41
|
}
|
|
@@ -53,15 +50,11 @@
|
|
|
53
50
|
"provider": "openai",
|
|
54
51
|
"createdAt": 1704067205000,
|
|
55
52
|
"updatedAt": 1704067205000,
|
|
56
|
-
"meta": {
|
|
57
|
-
"avatar": "backend-dev",
|
|
58
|
-
"title": "Backend Developer"
|
|
59
|
-
},
|
|
60
53
|
"metadata": {
|
|
61
54
|
"totalInputTokens": 50,
|
|
62
55
|
"totalOutputTokens": 120,
|
|
63
56
|
"totalTokens": 170,
|
|
64
|
-
"tps": 45
|
|
57
|
+
"tps": 45,
|
|
65
58
|
"ttft": 350,
|
|
66
59
|
"duration": 2667,
|
|
67
60
|
"latency": 3017
|
|
@@ -77,15 +70,11 @@
|
|
|
77
70
|
"provider": "anthropic",
|
|
78
71
|
"createdAt": 1704067205500,
|
|
79
72
|
"updatedAt": 1704067205500,
|
|
80
|
-
"meta": {
|
|
81
|
-
"avatar": "devops",
|
|
82
|
-
"title": "DevOps Engineer"
|
|
83
|
-
},
|
|
84
73
|
"metadata": {
|
|
85
74
|
"totalInputTokens": 50,
|
|
86
75
|
"totalOutputTokens": 130,
|
|
87
76
|
"totalTokens": 180,
|
|
88
|
-
"tps": 52
|
|
77
|
+
"tps": 52,
|
|
89
78
|
"ttft": 280,
|
|
90
79
|
"duration": 2500,
|
|
91
80
|
"latency": 2780
|
|
@@ -101,15 +90,11 @@
|
|
|
101
90
|
"provider": "openai",
|
|
102
91
|
"createdAt": 1704067206000,
|
|
103
92
|
"updatedAt": 1704067206000,
|
|
104
|
-
"meta": {
|
|
105
|
-
"avatar": "architect",
|
|
106
|
-
"title": "Software Architect"
|
|
107
|
-
},
|
|
108
93
|
"metadata": {
|
|
109
94
|
"totalInputTokens": 50,
|
|
110
95
|
"totalOutputTokens": 125,
|
|
111
96
|
"totalTokens": 175,
|
|
112
|
-
"tps": 48
|
|
97
|
+
"tps": 48,
|
|
113
98
|
"ttft": 320,
|
|
114
99
|
"duration": 2604,
|
|
115
100
|
"latency": 2924
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
"content": "Please have everyone discuss the pros and cons of microservices architecture.",
|
|
6
6
|
"parentId": null,
|
|
7
7
|
"createdAt": 1704067200000,
|
|
8
|
-
"updatedAt": 1704067200000
|
|
9
|
-
"meta": {}
|
|
8
|
+
"updatedAt": 1704067200000
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"id": "msg-supervisor-1",
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
"parentId": "msg-user-1",
|
|
17
16
|
"createdAt": 1704067201000,
|
|
18
17
|
"updatedAt": 1704067201000,
|
|
19
|
-
"meta": {},
|
|
20
18
|
"metadata": {
|
|
21
19
|
"isSupervisor": true
|
|
22
20
|
},
|
|
@@ -41,7 +39,6 @@
|
|
|
41
39
|
"tool_call_id": "call_broadcast_1",
|
|
42
40
|
"createdAt": 1704067202000,
|
|
43
41
|
"updatedAt": 1704067202000,
|
|
44
|
-
"meta": {},
|
|
45
42
|
"metadata": {
|
|
46
43
|
"agentCouncil": true
|
|
47
44
|
}
|
|
@@ -55,11 +52,7 @@
|
|
|
55
52
|
"model": "gpt-4",
|
|
56
53
|
"provider": "openai",
|
|
57
54
|
"createdAt": 1704067205000,
|
|
58
|
-
"updatedAt": 1704067205000
|
|
59
|
-
"meta": {
|
|
60
|
-
"avatar": "backend-dev",
|
|
61
|
-
"title": "Backend Developer"
|
|
62
|
-
}
|
|
55
|
+
"updatedAt": 1704067205000
|
|
63
56
|
},
|
|
64
57
|
{
|
|
65
58
|
"id": "msg-agent-devops-1",
|
|
@@ -70,11 +63,7 @@
|
|
|
70
63
|
"model": "claude-3-5-sonnet-20241022",
|
|
71
64
|
"provider": "anthropic",
|
|
72
65
|
"createdAt": 1704067205500,
|
|
73
|
-
"updatedAt": 1704067205500
|
|
74
|
-
"meta": {
|
|
75
|
-
"avatar": "devops",
|
|
76
|
-
"title": "DevOps Engineer"
|
|
77
|
-
}
|
|
66
|
+
"updatedAt": 1704067205500
|
|
78
67
|
},
|
|
79
68
|
{
|
|
80
69
|
"id": "msg-agent-architect-1",
|
|
@@ -85,11 +74,7 @@
|
|
|
85
74
|
"model": "gpt-4",
|
|
86
75
|
"provider": "openai",
|
|
87
76
|
"createdAt": 1704067206000,
|
|
88
|
-
"updatedAt": 1704067206000
|
|
89
|
-
"meta": {
|
|
90
|
-
"avatar": "architect",
|
|
91
|
-
"title": "Software Architect"
|
|
92
|
-
}
|
|
77
|
+
"updatedAt": 1704067206000
|
|
93
78
|
},
|
|
94
79
|
{
|
|
95
80
|
"id": "msg-supervisor-summary",
|
|
@@ -101,10 +86,6 @@
|
|
|
101
86
|
"provider": "openai",
|
|
102
87
|
"createdAt": 1704067210000,
|
|
103
88
|
"updatedAt": 1704067210000,
|
|
104
|
-
"meta": {
|
|
105
|
-
"avatar": "supervisor",
|
|
106
|
-
"title": "Supervisor"
|
|
107
|
-
},
|
|
108
89
|
"metadata": {
|
|
109
90
|
"isSupervisor": true
|
|
110
91
|
}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
"content": "Can you ask the backend developer about the API design?",
|
|
6
6
|
"parentId": null,
|
|
7
7
|
"createdAt": 1704067200000,
|
|
8
|
-
"updatedAt": 1704067200000
|
|
9
|
-
"meta": {}
|
|
8
|
+
"updatedAt": 1704067200000
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"id": "msg-supervisor-1",
|
|
@@ -28,10 +27,6 @@
|
|
|
28
27
|
],
|
|
29
28
|
"createdAt": 1704067201000,
|
|
30
29
|
"updatedAt": 1704067201000,
|
|
31
|
-
"meta": {
|
|
32
|
-
"avatar": "supervisor",
|
|
33
|
-
"title": "Supervisor"
|
|
34
|
-
},
|
|
35
30
|
"metadata": {
|
|
36
31
|
"isSupervisor": true
|
|
37
32
|
}
|
|
@@ -43,8 +38,7 @@
|
|
|
43
38
|
"parentId": "msg-supervisor-1",
|
|
44
39
|
"tool_call_id": "call_speak_1",
|
|
45
40
|
"createdAt": 1704067202000,
|
|
46
|
-
"updatedAt": 1704067202000
|
|
47
|
-
"meta": {}
|
|
41
|
+
"updatedAt": 1704067202000
|
|
48
42
|
},
|
|
49
43
|
{
|
|
50
44
|
"id": "msg-agent-backend-1",
|
|
@@ -55,10 +49,6 @@
|
|
|
55
49
|
"model": "gpt-4",
|
|
56
50
|
"provider": "openai",
|
|
57
51
|
"createdAt": 1704067205000,
|
|
58
|
-
"updatedAt": 1704067205000
|
|
59
|
-
"meta": {
|
|
60
|
-
"avatar": "backend-dev",
|
|
61
|
-
"title": "Backend Developer"
|
|
62
|
-
}
|
|
52
|
+
"updatedAt": 1704067205000
|
|
63
53
|
}
|
|
64
54
|
]
|
package/packages/conversation-flow/src/__tests__/fixtures/inputs/assistant-chain-with-followup.json
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
"role": "user",
|
|
5
5
|
"content": "What's the weather?",
|
|
6
6
|
"createdAt": 1000,
|
|
7
|
-
"updatedAt": 1000
|
|
8
|
-
"meta": {}
|
|
7
|
+
"updatedAt": 1000
|
|
9
8
|
},
|
|
10
9
|
{
|
|
11
10
|
"id": "msg-2",
|
|
@@ -14,7 +13,6 @@
|
|
|
14
13
|
"createdAt": 2000,
|
|
15
14
|
"updatedAt": 2000,
|
|
16
15
|
"parentId": "msg-1",
|
|
17
|
-
"meta": {},
|
|
18
16
|
"tools": [
|
|
19
17
|
{
|
|
20
18
|
"id": "tool-1",
|
|
@@ -32,7 +30,6 @@
|
|
|
32
30
|
"createdAt": 3000,
|
|
33
31
|
"updatedAt": 3000,
|
|
34
32
|
"parentId": "msg-2",
|
|
35
|
-
"meta": {},
|
|
36
33
|
"tool_call_id": "tool-1"
|
|
37
34
|
},
|
|
38
35
|
{
|
|
@@ -41,8 +38,7 @@
|
|
|
41
38
|
"content": "The weather in New York is 72F and sunny.",
|
|
42
39
|
"createdAt": 4000,
|
|
43
40
|
"updatedAt": 4000,
|
|
44
|
-
"parentId": "tool-1"
|
|
45
|
-
"meta": {}
|
|
41
|
+
"parentId": "tool-1"
|
|
46
42
|
},
|
|
47
43
|
{
|
|
48
44
|
"id": "msg-4",
|
|
@@ -50,7 +46,6 @@
|
|
|
50
46
|
"content": "Thanks! How about tomorrow?",
|
|
51
47
|
"createdAt": 5000,
|
|
52
48
|
"updatedAt": 5000,
|
|
53
|
-
"parentId": "msg-3"
|
|
54
|
-
"meta": {}
|
|
49
|
+
"parentId": "msg-3"
|
|
55
50
|
}
|
|
56
51
|
]
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
"content": "What's the weather like in San Francisco and Beijing today?",
|
|
6
6
|
"parentId": null,
|
|
7
7
|
"createdAt": 1704067200000,
|
|
8
|
-
"updatedAt": 1704067200000
|
|
9
|
-
"meta": {}
|
|
8
|
+
"updatedAt": 1704067200000
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"id": "msg-102",
|
|
@@ -31,7 +30,6 @@
|
|
|
31
30
|
],
|
|
32
31
|
"createdAt": 1704067202000,
|
|
33
32
|
"updatedAt": 1704067202000,
|
|
34
|
-
"meta": {},
|
|
35
33
|
"metadata": {
|
|
36
34
|
"totalInputTokens": 28,
|
|
37
35
|
"totalOutputTokens": 45,
|
|
@@ -48,22 +46,26 @@
|
|
|
48
46
|
"role": "tool",
|
|
49
47
|
"tool_call_id": "tool-sf",
|
|
50
48
|
"content": "{\"location\": \"San Francisco, CA\", \"temperature\": 18, \"conditions\": \"Partly Cloudy\", \"humidity\": 72, \"wind_speed\": 15}",
|
|
51
|
-
"pluginState": {
|
|
49
|
+
"pluginState": {
|
|
50
|
+
"cached": false,
|
|
51
|
+
"executionTime": 234
|
|
52
|
+
},
|
|
52
53
|
"parentId": "msg-102",
|
|
53
54
|
"createdAt": 1704067203000,
|
|
54
|
-
"updatedAt": 1704067203000
|
|
55
|
-
"meta": {}
|
|
55
|
+
"updatedAt": 1704067203000
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"id": "msg-104",
|
|
59
59
|
"role": "tool",
|
|
60
60
|
"tool_call_id": "tool-bj",
|
|
61
61
|
"content": "{\"location\": \"Beijing, China\", \"temperature\": 12, \"conditions\": \"Clear\", \"humidity\": 45, \"wind_speed\": 8}",
|
|
62
|
-
"pluginState": {
|
|
62
|
+
"pluginState": {
|
|
63
|
+
"cached": false,
|
|
64
|
+
"executionTime": 189
|
|
65
|
+
},
|
|
63
66
|
"parentId": "msg-102",
|
|
64
67
|
"createdAt": 1704067203100,
|
|
65
|
-
"updatedAt": 1704067203100
|
|
66
|
-
"meta": {}
|
|
68
|
+
"updatedAt": 1704067203100
|
|
67
69
|
},
|
|
68
70
|
{
|
|
69
71
|
"id": "msg-105",
|
|
@@ -88,7 +90,6 @@
|
|
|
88
90
|
],
|
|
89
91
|
"createdAt": 1704067205000,
|
|
90
92
|
"updatedAt": 1704067205000,
|
|
91
|
-
"meta": {},
|
|
92
93
|
"metadata": {
|
|
93
94
|
"totalInputTokens": 156,
|
|
94
95
|
"totalOutputTokens": 42,
|
|
@@ -106,22 +107,26 @@
|
|
|
106
107
|
"role": "tool",
|
|
107
108
|
"tool_call_id": "tool-sf-forecast",
|
|
108
109
|
"content": "{\"location\": \"San Francisco, CA\", \"date\": \"2024-01-02\", \"high\": 20, \"low\": 14, \"conditions\": \"Sunny\"}",
|
|
109
|
-
"pluginState": {
|
|
110
|
+
"pluginState": {
|
|
111
|
+
"cached": false,
|
|
112
|
+
"executionTime": 198
|
|
113
|
+
},
|
|
110
114
|
"parentId": "msg-105",
|
|
111
115
|
"createdAt": 1704067206000,
|
|
112
|
-
"updatedAt": 1704067206000
|
|
113
|
-
"meta": {}
|
|
116
|
+
"updatedAt": 1704067206000
|
|
114
117
|
},
|
|
115
118
|
{
|
|
116
119
|
"id": "msg-107",
|
|
117
120
|
"role": "tool",
|
|
118
121
|
"tool_call_id": "tool-bj-forecast",
|
|
119
122
|
"content": "{\"location\": \"Beijing, China\", \"date\": \"2024-01-02\", \"high\": 15, \"low\": 8, \"conditions\": \"Partly Cloudy\"}",
|
|
120
|
-
"pluginState": {
|
|
123
|
+
"pluginState": {
|
|
124
|
+
"cached": false,
|
|
125
|
+
"executionTime": 176
|
|
126
|
+
},
|
|
121
127
|
"parentId": "msg-105",
|
|
122
128
|
"createdAt": 1704067206100,
|
|
123
|
-
"updatedAt": 1704067206100
|
|
124
|
-
"meta": {}
|
|
129
|
+
"updatedAt": 1704067206100
|
|
125
130
|
},
|
|
126
131
|
{
|
|
127
132
|
"id": "msg-108",
|
|
@@ -130,7 +135,6 @@
|
|
|
130
135
|
"parentId": "msg-106",
|
|
131
136
|
"createdAt": 1704067208000,
|
|
132
137
|
"updatedAt": 1704067208000,
|
|
133
|
-
"meta": {},
|
|
134
138
|
"metadata": {
|
|
135
139
|
"totalInputTokens": 245,
|
|
136
140
|
"totalOutputTokens": 112,
|