Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('AskAiAnswer Component', () => {
{
id: 'some-id-1',
timestamp: 0,
type: 'ai_message',
type: 'ai_message_chunk',
data: {
content:
'Elasticsearch is a distributed search engine...',
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('AskAiAnswer Component', () => {
{
id: 'some-id-1',
timestamp: 1,
type: 'ai_message',
type: 'ai_message_chunk',
data: {
content: 'Here is your answer about Elasticsearch.',
},
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('AskAiAnswer Component', () => {
{
id: 'some-id-1',
timestamp: 12345,
type: 'ai_message',
type: 'ai_message_chunk',
data: { content: 'Here is your answer.' },
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { v4 as uuidv4 } from 'uuid'
// Helper function to accumulate AI message content
const getAccumulatedContent = (messages: LlmGatewayMessage[]) => {
return messages
.filter((m) => m.type === 'ai_message' || m.type === 'ai_message_chunk')
.filter((m) => m.type === 'ai_message_chunk')
.map((m) => m.data.content)
.join('')
}
Expand Down
Loading