[DOCS] Move preconfigured generative AI connector details (#165418)

This commit is contained in:
Lisa Cawley 2023-09-20 09:22:28 -07:00 committed by GitHub
parent 010f585996
commit 3f3a27b20a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 31 deletions

View file

@ -3,6 +3,11 @@
++++
<titleabbrev>Generative AI</titleabbrev>
++++
:frontmatter-description: Add a connector that can send requests to an OpenAI provider.
:frontmatter-tags-products: [kibana]
:frontmatter-tags-content-type: [how-to]
:frontmatter-tags-user-goals: [configure]
The Generative AI connector uses https://github.com/axios/axios[axios] to send a POST request to an OpenAI provider, either OpenAI or Azure OpenAI. The connector uses the <<execute-connector-api,run connector API>> to send the request.
@ -27,36 +32,6 @@ API Provider:: The OpenAI API provider, either OpenAI or Azure OpenAI.
API URL:: The OpenAI request URL.
API Key:: The OpenAI or Azure OpenAI API key for authentication.
[float]
[[preconfigured-gen-ai-configuration]]
=== Create preconfigured connectors
If you are running {kib} on-prem, you can define connectors by
adding `xpack.actions.preconfigured` settings to your `kibana.yml` file.
For example:
[source,text]
--
xpack.actions.preconfigured:
my-gen-ai:
name: preconfigured-gen-ai-connector-type
actionTypeId: .gen-ai
config:
apiUrl: https://api.openai.com/v1/chat/completions
apiProvider: 'Azure OpenAI'
secrets:
apiKey: superlongapikey
--
Config defines information for the connector type.
`apiProvider`:: A string that corresponds to *OpenAI API Provider*.
`apiUrl`:: A URL string that corresponds to the *OpenAI API URL*.
Secrets defines sensitive information for the connector type.
`apiKey`:: A string that corresponds to *OpenAI API Key*.
[float]
[[gen-ai-action-configuration]]
=== Test connectors

View file

@ -108,8 +108,9 @@ Index names must start with `kibana-alert-history-` to take advantage of the pre
=== Examples
* <<preconfigured-d3security-configuration>>
* <<preconfigured-resilient-configuration>>
* <<preconfigured-email-configuration>>
* <<preconfigured-gen-ai-configuration>>
* <<preconfigured-resilient-configuration>>
* <<preconfigured-index-configuration>>
* <<preconfigured-jira-configuration>>
* <<preconfigured-opsgenie-configuration>>
@ -276,6 +277,30 @@ secrets:
password: <password>
--------------------------------------------------
[float]
[[preconfigured-gen-ai-configuration]]
==== Generative AI connectors
The following example creates a <<gen-ai-action-type,generative AI connector>>:
[source,text]
--
xpack.actions.preconfigured:
my-gen-ai:
name: preconfigured-gen-ai-connector-type
actionTypeId: .gen-ai
config:
apiUrl: https://api.openai.com/v1/chat/completions <1>
apiProvider: 'OpenAI' <2>
defaultModel: gpt-4 <3>
secrets:
apiKey: superlongapikey <4>
--
<1> The OpenAI request URL
<2> The OpenAI API provider, either `OpenAI` or `Azure OpenAI`.
<3> The default model to use for requests. This setting is optional and applicable only when `apiProvider` is `OpenAI`.
<4> The OpenAI or Azure OpenAI API key for authentication.
[float]
[[preconfigured-resilient-configuration]]
==== {ibm-r} connectors

View file

@ -260,10 +260,14 @@ For example: `.email`, `.index`, `.opsgenie`, `.server-log`, `.resilient`, `.sla
`xpack.actions.preconfigured.<connector-id>.config`::
The configuration details, which are specific to the type of preconfigured connector.
`xpack.actions.preconfigured.<connector-id>.config.apiProvider`::
For a <<gen-ai-action-type,generative AI connector>>, specifies the OpenAI API provider, either `OpenAI` or `Azure OpenAI`.
`xpack.actions.preconfigured.<connector-id>.config.apiUrl`::
A configuration URL that varies by connector:
+
--
* For a <<gen-ai-action-type,generative AI connector>>, specifies the OpenAI request URL.
* For a <<resilient-action-type,{ibm-r} connector>>, specifies the {ibm-r} instance URL.
* For a <<jira-action-type,Jira connector>>, specifies the Jira instance URL.
* For an <<opsgenie-action-type,{opsgenie} connector>>, specifies the {opsgenie} URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`.
@ -316,6 +320,9 @@ NOTE: If you are using the `xpack.actions.allowedHosts` setting, make sure the h
`xpack.actions.preconfigured.<connector-id>.config.createIncidentResponseKey`::
For a <<cases-webhook-action-type,{webhook-cm} connector>>, specifies a string from the response body of the create case method that corresponds to the external service identifier.
`xpack.actions.preconfigured.<connector-id>.config.defaultModel`::
For a <<gen-ai-action-type,generative AI connector>>, specifies the default model to use for requests. It is optional and applicable only when `xpack.actions.preconfigured.<connector-id>.config.apiProvider` is `OpenAI`.
`xpack.actions.preconfigured.<connector-id>.config.executionTimeField`::
For an <<index-action-type,index connector>>, a field that indicates when the document was indexed.
@ -437,6 +444,7 @@ TIP: Sensitive properties, such as passwords, should be stored in the <<creating
An API key secret that varies by connector:
+
--
* For a <<gen-ai-action-type,generative AI connector>>, specifies the OpenAI or Azure OpenAI API key for authentication.
* For an <<opsgenie-action-type,{opsgenie} connector>>, specifies the {opsgenie} API authentication key for HTTP basic authentication.
--