-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 langgraph issues #189287
Conversation
/ci |
/ci |
…bana into fix/langgraph-issues
/ci |
/ci |
x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/prompts.ts
Outdated
Show resolved
Hide resolved
x-pack/packages/kbn-langchain/server/language_models/gemini_chat.ts
Outdated
Show resolved
Hide resolved
/ci |
/ci |
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.
ResponseOps changes look ok 👍
const steps = await Promise.all( | ||
castArray(state.agentOutcome as AgentAction)?.map(async (action) => { |
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.
note: This fixes the multiple tool call code path which was previously not working. So now if the LLM chooses multiple tools at once (only Bedrock right now, OpenAI supports it as well, but not via langchain chatmodel IIRC), both will execute.
x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts
Show resolved
Hide resolved
x-pack/packages/kbn-langchain/server/language_models/bedrock_chat.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.
Checked out, tested locally, code reviewed, and paired a bit with @patrykkopycinski on the changes here -- LGTM!
Thanks for being strategic here with these fixes Patryk, appreciate it!
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
## Summary - Fixed `Regenerate` button for Gemini - Fixed auto title functionality - Enabled `assistantBedrockChat` by default --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 0be8295)
💚 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.15`: - [[Security Assistant] Fix langgraph issues (#189287)](#189287) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Patryk Kopyciński","email":"contact@patrykkopycinski.com"},"sourceCommit":{"committedDate":"2024-07-31T20:32:29Z","message":"[Security Assistant] Fix langgraph issues (#189287)\n\n## Summary\r\n\r\n- Fixed `Regenerate` button for Gemini\r\n- Fixed auto title functionality\r\n- Enabled `assistantBedrockChat` by default\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0be8295ed0028870074772c8d82093376482c4eb","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","ci:cloud-deploy","v8.15.0","v8.16.0"],"title":"[Security Assistant] Fix langgraph issues","number":189287,"url":"https://github.com/elastic/kibana/pull/189287","mergeCommit":{"message":"[Security Assistant] Fix langgraph issues (#189287)\n\n## Summary\r\n\r\n- Fixed `Regenerate` button for Gemini\r\n- Fixed auto title functionality\r\n- Enabled `assistantBedrockChat` by default\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0be8295ed0028870074772c8d82093376482c4eb"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189287","number":189287,"mergeCommit":{"message":"[Security Assistant] Fix langgraph issues (#189287)\n\n## Summary\r\n\r\n- Fixed `Regenerate` button for Gemini\r\n- Fixed auto title functionality\r\n- Enabled `assistantBedrockChat` by default\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0be8295ed0028870074772c8d82093376482c4eb"}}]}] BACKPORT--> Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
Summary
Regenerate
button for GeminiassistantBedrockChat
by default