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

[Epic] AI Insights + Assistant - Add "Other" option to the existing OpenAI Connector dropdown list (#8936) #194831

Merged
merged 16 commits into from
Oct 9, 2024

Conversation

e40pud
Copy link
Contributor

@e40pud e40pud commented Oct 3, 2024

Summary

Epic https://github.com/elastic/security-team/issues/8936

At the moment, our users are able to host local LLMs via an inference server that follows OpenAI's API spec using our OpenAI connector by changing the URL to their own server. Whilst this works just fine, it's not evident that this is something we support.

With these changes we add "Other" option to the existing OpenAI Connector dropdown list to provide a way for users to know that this is possible. Having an "Other" option in the current drop down list, with no pre-populated text in the URL, Model and Auth input sections.

All the underlying requests and data are identical for the existing OpenAI option in the dropdown.

Recording

Screen.Recording.2024-10-03.at.14.35.26.mov

Testing

To test the workflow follow these steps:

  1. Create a new OpenAI connector
  2. Select Other (OpenAI Compatible Service) provider
  3. Fill out required fields
  4. Save new connector
  5. Now you can use it as a service in AI Assistance to send requests to.

Credentials
Use these credentials for testing LLama 3.1 70B and Mistral Large 2407:

https://p.elstc.co/paste/ofqxUGiW#RR1Pedserj9hWKm3vOw5oVEHWuwbX7i9Jl2rS7q7MRP

Checklist

Delete any items that are not applicable to this PR.

@e40pud e40pud added v9.0.0 release_note:feature Makes this part of the condensed release notes Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI v8.16.0 backport:version Backport to applied version labels labels Oct 3, 2024
@e40pud e40pud self-assigned this Oct 3, 2024
@e40pud e40pud marked this pull request as ready for review October 3, 2024 17:43
@e40pud e40pud requested review from a team as code owners October 3, 2024 17:43
Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Telemetry changes LGTM

@e40pud
Copy link
Contributor Author

e40pud commented Oct 7, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchPlayground 165.2KB 165.8KB +627.0B
securitySolution 20.6MB 20.6MB +104.0B
stackConnectors 580.4KB 584.1KB +3.7KB
total +4.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
stackConnectors 56.1KB 56.1KB +16.0B

History

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

cc @e40pud

Copy link
Member

@pmuellr pmuellr 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 LGTM

Standard warning about config/secrets schema changes in serverless: if we ship this code in serverless, and someone creates a connector using the new schema, and then we have to roll back the serverless release, this connector will fail to validate, and won't be able to execute. It should be deletable and editable in the UX, so could be edited to match the older schema, and would then start working again. Low risk in that happening. A safer approach is to just release the schema changes without anything else, wait a week, then the rest of the PR. That way on a rollback, the schema will be valid ...

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@joemcelroy joemcelroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works really well! Thank you.

@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

@stephmilovic stephmilovic enabled auto-merge (squash) October 9, 2024 15:19
@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

@stephmilovic stephmilovic merged commit 83a701e into elastic:main Oct 9, 2024
41 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11263805561

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchPlayground 165.4KB 165.9KB +591.0B
securitySolution 20.6MB 20.6MB +104.0B
stackConnectors 580.4KB 584.1KB +3.7KB
total +4.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
stackConnectors 56.1KB 56.1KB +16.0B

History

cc @e40pud

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Oct 9, 2024
…o the existing OpenAI Connector dropdown list (#8936) (#194831) (#195688)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Epic] AI Insights + Assistant - Add "Other" option to the
existing OpenAI Connector dropdown list (#8936)
(#194831)](#194831)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2024-10-09T22:07:31Z","message":"[Epic]
AI Insights + Assistant - Add \"Other\" option to the existing OpenAI
Connector dropdown list (#8936)
(#194831)","sha":"83a701e837a7a84a86dcc8d359154f900f69676a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","Feature:Security
Assistant","Team:Security Generative
AI","v8.16.0","backport:version"],"title":"[Epic] AI Insights +
Assistant - Add \"Other\" option to the existing OpenAI Connector
dropdown list
(#8936)","number":194831,"url":"https://github.com/elastic/kibana/pull/194831","mergeCommit":{"message":"[Epic]
AI Insights + Assistant - Add \"Other\" option to the existing OpenAI
Connector dropdown list (#8936)
(#194831)","sha":"83a701e837a7a84a86dcc8d359154f900f69676a"}},"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/194831","number":194831,"mergeCommit":{"message":"[Epic]
AI Insights + Assistant - Add \"Other\" option to the existing OpenAI
Connector dropdown list (#8936)
(#194831)","sha":"83a701e837a7a84a86dcc8d359154f900f69676a"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
@leemthompo
Copy link
Contributor

@e40pud was there plans to update documentation for this change?

@e40pud
Copy link
Contributor Author

e40pud commented Oct 21, 2024

@leemthompo I think we should update this section https://www.elastic.co/guide/en/security/current/connect-to-byo-llm.html#_configure_the_connector_in_your_elastic_deployment and mention that user should select Other (OpenAI Compatible Service) as OpenAI provider. Let me create a doc ticket for that.

cc @jamesspi

@e40pud
Copy link
Contributor Author

e40pud commented Oct 21, 2024

@leemthompo here is the docs ticket elastic/security-docs#5965, please let me know if there is any information needed.

@jamesspi
Copy link

@Charelzard to track docs and blog update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Security Assistant Security Assistant release_note:feature Makes this part of the condensed release notes Team:Security Generative AI Security Generative AI v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.