Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed incorrect message id field used #378

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## Unreleased

### Features

### Enhancements

- feat: Hide navigate to discover button if alert is not from visual editor monitor([#368](https://github.com/opensearch-project/dashboards-assistant/pull/368))

### Bug Fixes

- Optimize the response of AI agent APIs ([#373](https://github.com/opensearch-project/dashboards-assistant/pull/373))
- fixed incorrect message id field used ([#378](https://github.com/opensearch-project/dashboards-assistant/pull/378))

### Infrastructure

### Documentation

### Maintenance

### Refactoring
6 changes: 4 additions & 2 deletions server/services/chat/olly_chat_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface AgentRunPayload {
}

const MEMORY_ID_FIELD = 'memory_id';
const INTERACTION_ID_FIELD = 'parent_interaction_id';
const INTERACTION_ID_FIELDS = ['parent_message_id', 'parent_interaction_id'];

export class OllyChatService implements ChatService {
static abortControllers: Map<string, AbortController> = new Map();
Expand Down Expand Up @@ -67,7 +67,9 @@ export class OllyChatService implements ChatService {
}>;
const outputBody = agentFrameworkResponse.body.inference_results?.[0]?.output;
const conversationIdItem = outputBody?.find((item) => item.name === MEMORY_ID_FIELD);
const interactionIdItem = outputBody?.find((item) => item.name === INTERACTION_ID_FIELD);
const interactionIdItem = outputBody?.find((item) =>
INTERACTION_ID_FIELDS.includes(item.name)
);
return {
/**
* Interactions will be stored in Agent framework,
Expand Down
Loading