-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Assistant] Fix ESQL tool availability #195827
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
x-pack/plugins/security_solution/server/assistant/tools/esql/nl_to_esql_tool.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks, Steph!
Starting backport for target branches: 8.x |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
|
(cherry picked from commit 2b995fa)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Assistant] Fix ESQL tool availability (#195827)](#195827) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T22:49:22Z","message":"[Security Assistant] Fix ESQL tool availability (#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Team:Security Generative AI","v8.16.0","backport:version"],"title":"[Security Assistant] Fix ESQL tool availability","number":195827,"url":"https://github.com/elastic/kibana/pull/195827","mergeCommit":{"message":"[Security Assistant] Fix ESQL tool availability (#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195827","number":195827,"mergeCommit":{"message":"[Security Assistant] Fix ESQL tool availability (#195827)","sha":"2b995fa86eb44a2bd54c44a74eb47a2a26ec0ed2"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <[email protected]>
Summary
Previously, Knowledge Base needed to be installed to use the ESQL tool. The NL to ESQL tool does not require Knowledge Base, so I removed this condition.
Additionally, I found that the chain input property
modelExists
is equal toisEnabledKnowledgeBase
. EverywheremodelExists
is checked also checksisEnabledKnowledgeBase
. Therefore, the condition is unnecessary and adds confusion. I removed it.Testing
To reproduce bug on main, start a fresh es + kibana (no elser/kb installed) and ask an ESQL question. Check your LangSmith trace to find the
NaturalLanguageESQLTool
tool was not provided. Check out this branch and ask another ESQL question. Check your LangSmith trace once more to find theNaturalLanguageESQLTool
tool was provided.