Skip to content

Commit

Permalink
fix: collect workflow's assistant content (#8373)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Sep 24, 2024
1 parent 789e593 commit ed8e4e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/backend/server/src/plugins/copilot/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ export class CopilotController {
concatMap(values => {
session.push({
role: 'assistant',
content: values.join(''),
content: values
.filter(v => v.status === GraphExecutorState.EmitContent)
.map(v => v.content)
.join(''),
createdAt: new Date(),
});
return from(session.save());
Expand Down

0 comments on commit ed8e4e3

Please sign in to comment.