Skip to content
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

Merged
merged 15 commits into from
Jul 31, 2024

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Jul 26, 2024

Summary

  • Fixed Regenerate button for Gemini
  • Fixed auto title functionality
  • Enabled assistantBedrockChat by default

@patrykkopycinski patrykkopycinski added the ci:cloud-deploy Create or update a Cloud deployment label Jul 26, 2024
@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski patrykkopycinski self-assigned this Jul 29, 2024
@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski patrykkopycinski marked this pull request as ready for review July 30, 2024 20:52
@patrykkopycinski patrykkopycinski requested review from a team as code owners July 30, 2024 20:52
@patrykkopycinski patrykkopycinski changed the title Fix/langgraph issues [Security Assistant] Fix langgraph issues Jul 30, 2024
@patrykkopycinski patrykkopycinski added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.15.0 v8.16.0 labels Jul 30, 2024
Copy link
Contributor

@adcoelho adcoelho left a 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 👍

Comment on lines +44 to +45
const steps = await Promise.all(
castArray(state.agentOutcome as AgentAction)?.map(async (action) => {
Copy link
Member

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.

Copy link
Member

@spong spong left a 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!

@spong spong enabled auto-merge (squash) July 31, 2024 19:27
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jul 31, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @patrykkopycinski

@spong spong merged commit 0be8295 into elastic:main Jul 31, 2024
43 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 31, 2024
## 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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 31, 2024
# 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience ci:cloud-deploy Create or update a Cloud deployment release_note:skip Skip the PR/issue when compiling release notes v8.15.0 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants