Skip to content

Commit

Permalink
Fix assistant failed cases because of change of ml-commons (#1110)
Browse files Browse the repository at this point in the history
* feat: change matching prompt string

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add file

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: traces update

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: traces update

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: traces update

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
(cherry picked from commit 60e2503)
  • Loading branch information
SuZhou-Joe authored and github-actions[bot] committed Feb 19, 2024
1 parent 842fe0c commit c16c67d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/assistant-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
filters: |
tests:
- 'cypress/**/dashboards-assistant/**'
- 'cypress/support/assistant-dummy-llm.js'
tests-with-security:
needs: changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ if (Cypress.env('DASHBOARDS_ASSISTANT_ENABLED')) {
it('tools invocation displayed in trace steps', () => {
// trace
cy.get(`.llm-chat-flyout .llm-chat-flyout-body`).as('tracePage');
cy.get('@tracePage').find('.euiAccordion').should('have.length', 1);
cy.get('@tracePage').find('.euiAccordion').should('have.length', 3);

cy.get('@tracePage')
.find('.euiAccordion')
// tool name
.contains('Step 1 - CatIndexTool')
.contains('Step 2 - CatIndexTool')
.click({ force: true });

// tool output
cy.contains('Output: health status index');
cy.contains('row,health,status,index');
});

it('trace page display correctly in fullscreen mode', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/assistant-dummy-llm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const suggestionJson = require('../fixtures/plugins/dashboards-assistant/suggest
const MATCH_AGENT_FRAMEWORK_PROMPT =
'Assistant is designed to be able to assist with a wide range of tasks';
const MATCH_SUGGESTION_PROMPT = 'You are an AI that only speaks JSON';
const TOOL_RESPONSE = 'TOOL RESPONSE:';
const TOOL_RESPONSE = 'TOOL RESPONSE of CatIndexTool:';

const server = http.createServer((req, res) => {
// Set the content type to JSON
Expand Down

0 comments on commit c16c67d

Please sign in to comment.