Skip to content

Commit 3f737cf

Browse files
authored
Fix: comply with the field change of agent framework (#137)
* feat: update field Signed-off-by: SuZhou-Joe <[email protected]> * feat: add document Signed-off-by: SuZhou-Joe <[email protected]> * feat: update field Signed-off-by: SuZhou-Joe <[email protected]> * feat: add section Bug fixes Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]>
1 parent 0de2c9b commit 3f737cf

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
99
- Add interactions into ChatState and pass specific interaction into message_bubble ([#12](https://github.com/opensearch-project/dashboards-assistant/pull/12))
1010
- Refactor the code to get root agent id by calling the API in ml-commons plugin ([#128](https://github.com/opensearch-project/dashboards-assistant/pull/128))
1111
- Set verbose to false ([#131](https://github.com/opensearch-project/dashboards-assistant/pull/131))
12+
- Fix: comply with the field change of agent framework ([#137](https://github.com/opensearch-project/dashboards-assistant/pull/137))

release-notes/dashboards-assistant.release-notes-2.12.0.0.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ Compatible with OpenSearch and OpenSearch Dashboards Version 2.12.0
1212
- Support save conversation to notebook ([3010362](https://github.com/opensearch-project/dashboards-assistant/commit/3010362))([#93](https://github.com/opensearch-project/dashboards-assistant/pull/93))
1313

1414
### Feature
15-
- Set verbose to false ([#131](https://github.com/opensearch-project/dashboards-assistant/pull/131))
15+
- Set verbose to false ([#131](https://github.com/opensearch-project/dashboards-assistant/pull/131))
16+
17+
### Bug Fixes
18+
- Fix: comply with the field change of agent framework ([#137](https://github.com/opensearch-project/dashboards-assistant/pull/137))

server/services/storage/agent_framework_storage_service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('AgentFrameworkStorageService', () => {
2626
if (params.path.includes('/messages?max_results=1000')) {
2727
return {
2828
body: {
29-
interactions: [
29+
messages: [
3030
{
3131
input: 'input',
3232
response: 'response',

server/services/storage/agent_framework_storage_service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class AgentFrameworkStorageService implements StorageService {
3838
path: `${ML_COMMONS_BASE_API}/memory/${conversationId}/messages?max_results=1000`,
3939
}) as TransportRequestPromise<
4040
ApiResponse<{
41-
interactions: InteractionFromAgentFramework[];
41+
messages: InteractionFromAgentFramework[];
4242
}>
4343
>,
4444
this.client.transport.request({
@@ -53,7 +53,7 @@ export class AgentFrameworkStorageService implements StorageService {
5353
}>
5454
>,
5555
]);
56-
const finalInteractions = interactionsResp.body.interactions.map((item) =>
56+
const finalInteractions = interactionsResp.body.messages.map((item) =>
5757
formatInteractionFromBackend(item)
5858
);
5959

0 commit comments

Comments
 (0)