Skip to content

Commit

Permalink
feat: update agent id into config index
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Feb 5, 2024
1 parent abb5701 commit b766400
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/assistant-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
with:
test-name: dashboards assistant
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
osd-serve-args: --assistant.chat.enabled=true --assistant.chat.rootAgentName="Cypress test agent"
osd-serve-args: --assistant.chat.enabled=true
10 changes: 10 additions & 0 deletions cypress/utils/plugins/dashboards-assistant/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ Cypress.Commands.add('registerRootAgent', () => {
})
.then((resp) => {
agentParameters.rootAgentId = resp.body.agent_id;
return cy.request(
'POST',
`${BACKEND_BASE_PATH}${ML_COMMONS_API.UPDATE_ROOT_AGENT_CONFIG}`,
{
type: 'os_chat_root_agent',
configuration: {
agent_id: agentParameters.rootAgentId,
},
}
);
});
});

Expand Down
1 change: 1 addition & 0 deletions cypress/utils/plugins/dashboards-assistant/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ML_COMMONS_API = {
CREATE_CONNECTOR: `${ML_COMMONS_API_PREFIX}/connectors/_create`,
CREATE_MODEL: `${ML_COMMONS_API_PREFIX}/models/_register`,
CREATE_AGENT: `${ML_COMMONS_API_PREFIX}/agents/_register`,
UPDATE_ROOT_AGENT_CONFIG: `.plugins-ml-config/_doc/os_chat`,
};

export const ASSISTANT_API_BASE = '/api/assistant';
Expand Down

0 comments on commit b766400

Please sign in to comment.