-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Connectors][GenAI] Inference Service Kibana connector #189027
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
Merged
YulNaumenko
merged 77 commits into
elastic:main
from
YulNaumenko:kibana-generic-inference-connector
Oct 13, 2024
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
689b966
[Connectors][GenAI] Inference Service connector
YulNaumenko dda4ccc
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko 7098133
Ui updates
YulNaumenko 1ae31ea
added support for preSaveConnector and postDeleteConnector handlers t…
YulNaumenko d14f562
task types service
YulNaumenko b47e981
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 952784d
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 424b791
-
YulNaumenko 6d0f7b4
reshuffle the ui
YulNaumenko 556b8a1
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 62adb55
Added provider select control
YulNaumenko 9d52a13
changes the form elements
YulNaumenko 04fb36e
complete inference endpoint CRUD
YulNaumenko ab2d2b9
added typed schema
YulNaumenko 080fc76
added subActions
YulNaumenko 8a847ae
checkable control
YulNaumenko cfd86f7
added tests
YulNaumenko 077fc92
-
YulNaumenko 71b01f7
more tests
YulNaumenko 5de8d82
more tests and validation
YulNaumenko 8f5c40a
test fixes
YulNaumenko 48167d6
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine fadd693
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 0acf784
-
YulNaumenko 6d12faa
integration tests
YulNaumenko cb60a3d
-
YulNaumenko 26268c2
cleaned up docs
YulNaumenko 3cb3556
translations fix
YulNaumenko 4139ccc
styles fix
YulNaumenko 68a33b8
fixed header linting
YulNaumenko c97afeb
tests
YulNaumenko 1ddf304
-
YulNaumenko d0d77f5
fixed validation for dynamic fields
YulNaumenko ce4465e
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko 7bfbe0b
added technical preview badge
YulNaumenko 6341c2f
Merge branch 'kibana-generic-inference-connector' of github.com:YulNa…
YulNaumenko d5ea270
-
YulNaumenko 1265bbf
use internal user for call inference
YulNaumenko 14b0fc4
use inference api
YulNaumenko e8825ac
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko 9987ca7
tests fix
YulNaumenko 35e9442
removed persistence for schema
YulNaumenko 6f9504f
uses post and pre save hooks
YulNaumenko a7eaae2
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko e9bfa27
fixed buttons group style, added alibabacloud
YulNaumenko b927fed
Merge branch 'kibana-generic-inference-connector' of github.com:YulNa…
YulNaumenko ce77db6
tests
YulNaumenko 9bbfa90
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko 299775d
-
YulNaumenko 766c28b
Merge branch 'kibana-generic-inference-connector' of github.com:YulNa…
YulNaumenko 47f71ae
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 3510dc2
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko dadf1cb
fixed due comments
YulNaumenko 97bf027
tests
YulNaumenko 4f450f4
fixed docs
YulNaumenko e222de3
Apply suggestions from code review
YulNaumenko 2e5a503
Apply suggestions from code review
YulNaumenko e8cdbdd
fixed bundle size
YulNaumenko 5da6285
Merge remote-tracking branch 'upstream/main' into kibana-generic-infe…
YulNaumenko 3977655
fixed build
YulNaumenko 653174a
-
YulNaumenko 80beb6d
fix due to comments
YulNaumenko 974cb28
fixed ui
YulNaumenko 2f402ea
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko 4c12619
no message
YulNaumenko 356e827
Merge branch 'kibana-generic-inference-connector' of github.com:YulNa…
YulNaumenko b1da30c
removed from security assistant cards
YulNaumenko f2fe300
Apply suggestions from code review
YulNaumenko 73432ee
build fix
YulNaumenko f75eb47
-
YulNaumenko 3fef5b8
Apply suggestions from code review
YulNaumenko 6553e80
tests
YulNaumenko d3a8933
Merge branch 'kibana-generic-inference-connector' of github.com:YulNa…
YulNaumenko 331e0dd
-
YulNaumenko 9c20a55
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko b870e1d
fixed update with numbers
YulNaumenko b829d6a
Merge branch 'main' into kibana-generic-inference-connector
YulNaumenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
docs/management/connectors/action-types/inference.asciidoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| [[inference-action-type]] | ||
| == {infer-cap} connector and action | ||
| ++++ | ||
| <titleabbrev>{inference}</titleabbrev> | ||
| ++++ | ||
| :frontmatter-description: Add a connector that can send requests to {inference}. | ||
| :frontmatter-tags-products: [kibana] | ||
| :frontmatter-tags-content-type: [how-to] | ||
| :frontmatter-tags-user-goals: [configure] | ||
|
|
||
|
|
||
| The {infer} connector uses the {es} client to send requests to an {infer} service. The connector uses the <<execute-connector-api,run connector API>> to send the request. | ||
|
|
||
| [float] | ||
| [[define-inference-ui]] | ||
| === Create connectors in {kib} | ||
|
|
||
| You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example: | ||
|
|
||
| [role="screenshot"] | ||
| image::management/connectors/images/inference-connector.png[{inference} connector] | ||
| // NOTE: This is an autogenerated screenshot. Do not edit it directly. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it really auto-generated or is this string a copy/paste error?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copy/paste |
||
|
|
||
| [float] | ||
| [[inference-connector-configuration]] | ||
| ==== Connector configuration | ||
|
|
||
| {infer-cap} connectors have the following configuration properties: | ||
|
|
||
| Name:: The name of the connector. | ||
| Service:: The supported {infer} service provider. | ||
| Task type:: The {infer} task type, it depends on the selected service. | ||
| Inference ID:: The unique identifier of the {infer} endpoint. | ||
| Provider configuration:: Settings for service configuration. | ||
| Provider secrets:: Configuration for authentication. | ||
| Task type configuration:: Settings for task type configuration. | ||
|
|
||
| [float] | ||
| [[inference-action-configuration]] | ||
| === Test connectors | ||
|
|
||
| You can test connectors using the <<execute-connector-api,run connector API>> or | ||
| while creating or editing the connector in {kib}. For example: | ||
|
|
||
| [role="screenshot"] | ||
| image::management/connectors/images/inference-completion-params.png[{infer} params test] | ||
| // NOTE: This is an autogenerated screenshot. Do not edit it directly. | ||
| [float] | ||
| [[inference-connector-actions]] | ||
| === {infer-cap} connector actions | ||
|
|
||
|
YulNaumenko marked this conversation as resolved.
|
||
| The {infer} actions have the following configuration properties. Properties depend on the selected task type. | ||
|
|
||
| [float] | ||
| [[inference-connector-perform-completion]] | ||
| ==== Completion | ||
|
|
||
| The following example performs a completion task on the example question. | ||
| Input:: | ||
| The text on which you want to perform the {infer} task. For example: | ||
| + | ||
| [source,text] | ||
| -- | ||
| { | ||
| input: 'What is Elastic?' | ||
| } | ||
| -- | ||
|
|
||
| [float] | ||
| [[inference-connector-perform-text-embedding]] | ||
| ==== Text embedding | ||
|
|
||
| The following example performs a text embedding task. | ||
| Input:: | ||
| The text on which you want to perform the {infer} task. For example: | ||
| + | ||
| [source,text] | ||
| -- | ||
| { | ||
| input: 'The sky above the port was the color of television tuned to a dead channel.', | ||
| task_settings: { | ||
| input_type: 'ingest' | ||
| } | ||
| } | ||
| -- | ||
| Input type:: | ||
| An optional string that overwrites the connector's default model. | ||
|
|
||
| [float] | ||
| [[inference-connector-perform-rerank]] | ||
| ==== Reranking | ||
|
|
||
| The following example performs a reranking task on the example input. | ||
| Input:: | ||
| The text on which you want to perform the {infer} task. Should be a string array. For example: | ||
| + | ||
| [source,text] | ||
| -- | ||
| { | ||
| input: ['luke', 'like', 'leia', 'chewy', 'r2d2', 'star', 'wars'], | ||
| query: 'star wars main character' | ||
| } | ||
| -- | ||
| Query:: | ||
| The search query text. | ||
|
|
||
| [float] | ||
| [[inference-connector-perform-sparse-embedding]] | ||
| ==== Sparse embedding | ||
|
|
||
| The following example performs a sparse embedding task on the example sentence. | ||
| Input:: | ||
| The text on which you want to perform the {infer} task. For example: | ||
| + | ||
| [source,text] | ||
| -- | ||
| { | ||
| input: 'The sky above the port was the color of television tuned to a dead channel.' | ||
| } | ||
| -- | ||
|
|
||
| [float] | ||
| [[inference-connector-networking-configuration]] | ||
| === Connector networking configuration | ||
|
|
||
| Use the <<action-settings, Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can apply these settings to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
x-pack/plugins/actions/docs/openapi/components/schemas/inference_config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| title: Connector request properties for an Inference API connector | ||
| description: Defines properties for connectors when type is `.inference`. | ||
| type: object | ||
| required: | ||
| - provider | ||
| - taskType | ||
| - inferenceId | ||
| properties: | ||
| provider: | ||
|
YulNaumenko marked this conversation as resolved.
|
||
| type: string | ||
| description: The Inference API service provider. | ||
| taskType: | ||
| type: string | ||
| description: The Inference task type supported by provider. | ||
| providerConfig: | ||
| type: object | ||
| description: The provider settings. | ||
| taskTypeConfig: | ||
| type: object | ||
| description: The task type settings. | ||
| inferenceId: | ||
| type: string | ||
|
YulNaumenko marked this conversation as resolved.
|
||
| description: The task type settings. | ||
9 changes: 9 additions & 0 deletions
9
x-pack/plugins/actions/docs/openapi/components/schemas/inference_secrets.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| title: Connector secrets properties for an AI Connector | ||
| description: Defines secrets for connectors when type is `.inference`. | ||
| type: object | ||
| required: | ||
| - providerSecrets | ||
| properties: | ||
| providerSecrets: | ||
| type: object | ||
| description: The service account credentials. The service account could have different type of properties to encode. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.