[Security solution] Rename Generative AI connector to OpenAI (#167677)

[Redo this PR](https://github.com/elastic/kibana/pull/167220) because
[this PR](https://github.com/elastic/kibana/pull/167220) merged shortly
before broke it and I had to fix an import

---------

Co-authored-by: lcawl <lcawley@elastic.co>
This commit is contained in:
Steph Milovic 2023-09-29 10:54:55 -06:00 committed by GitHub
parent e1a280f602
commit b888ecb45c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 258 additions and 304 deletions

View file

@ -1004,7 +1004,7 @@ Any modifications made to this file will be overwritten.
<li><a href="#config_properties_cases_webhook"><code>config_properties_cases_webhook</code> - Connector request properties for Webhook - Case Management connector</a></li>
<li><a href="#config_properties_d3security"><code>config_properties_d3security</code> - Connector request properties for a D3 Security connector</a></li>
<li><a href="#config_properties_email"><code>config_properties_email</code> - Connector request properties for an email connector</a></li>
<li><a href="#config_properties_genai"><code>config_properties_genai</code> - Connector request properties for a generative AI connector</a></li>
<li><a href="#config_properties_genai"><code>config_properties_genai</code> - Connector request properties for an OpenAI connector</a></li>
<li><a href="#config_properties_genai_oneOf"><code>config_properties_genai_oneOf</code> - </a></li>
<li><a href="#config_properties_genai_oneOf_1"><code>config_properties_genai_oneOf_1</code> - </a></li>
<li><a href="#config_properties_index"><code>config_properties_index</code> - Connector request properties for an index connector</a></li>
@ -1044,7 +1044,7 @@ Any modifications made to this file will be overwritten.
<li><a href="#create_connector_request_cases_webhook"><code>create_connector_request_cases_webhook</code> - Create Webhook - Case Managment connector request</a></li>
<li><a href="#create_connector_request_d3security"><code>create_connector_request_d3security</code> - Create D3 Security connector request</a></li>
<li><a href="#create_connector_request_email"><code>create_connector_request_email</code> - Create email connector request</a></li>
<li><a href="#create_connector_request_genai"><code>create_connector_request_genai</code> - Create generative AI connector request</a></li>
<li><a href="#create_connector_request_genai"><code>create_connector_request_genai</code> - Create OpenAI connector request</a></li>
<li><a href="#create_connector_request_index"><code>create_connector_request_index</code> - Create index connector request</a></li>
<li><a href="#create_connector_request_jira"><code>create_connector_request_jira</code> - Create Jira connector request</a></li>
<li><a href="#create_connector_request_opsgenie"><code>create_connector_request_opsgenie</code> - Create Opsgenie connector request</a></li>
@ -1100,7 +1100,7 @@ Any modifications made to this file will be overwritten.
<li><a href="#secrets_properties_cases_webhook"><code>secrets_properties_cases_webhook</code> - Connector secrets properties for Webhook - Case Management connector</a></li>
<li><a href="#secrets_properties_d3security"><code>secrets_properties_d3security</code> - Connector secrets properties for a D3 Security connector</a></li>
<li><a href="#secrets_properties_email"><code>secrets_properties_email</code> - Connector secrets properties for an email connector</a></li>
<li><a href="#secrets_properties_genai"><code>secrets_properties_genai</code> - Connector secrets properties for a generative AI connector</a></li>
<li><a href="#secrets_properties_genai"><code>secrets_properties_genai</code> - Connector secrets properties for an OpenAI connector</a></li>
<li><a href="#secrets_properties_jira"><code>secrets_properties_jira</code> - Connector secrets properties for a Jira connector</a></li>
<li><a href="#secrets_properties_opsgenie"><code>secrets_properties_opsgenie</code> - Connector secrets properties for an Opsgenie connector</a></li>
<li><a href="#secrets_properties_pagerduty"><code>secrets_properties_pagerduty</code> - Connector secrets properties for a PagerDuty connector</a></li>
@ -1432,7 +1432,7 @@ Any modifications made to this file will be overwritten.
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="config_properties_genai"><code>config_properties_genai</code> - Connector request properties for a generative AI connector</a> <a class="up" href="#__Models">Up</a></h3>
<h3><a name="config_properties_genai"><code>config_properties_genai</code> - Connector request properties for an OpenAI connector</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'>Defines properties for connectors when type is <code>.gen-ai</code>.</div>
<div class="field-items">
<div class="param">apiProvider </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The OpenAI API provider. </div>
@ -1958,8 +1958,8 @@ Any modifications made to this file will be overwritten.
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="create_connector_request_genai"><code>create_connector_request_genai</code> - Create generative AI connector request</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'>The generative AI connector uses axios to send a POST request to either OpenAI or Azure OpenAPI.</div>
<h3><a name="create_connector_request_genai"><code>create_connector_request_genai</code> - Create OpenAI connector request</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'>The OpenAI connector uses axios to send a POST request to either OpenAI or Azure OpenAPI.</div>
<div class="field-items">
<div class="param">config </div><div class="param-desc"><span class="param-type"><a href="#config_properties_genai">config_properties_genai</a></span> </div>
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The type of connector. </div>
@ -2535,7 +2535,7 @@ Any modifications made to this file will be overwritten.
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="secrets_properties_genai"><code>secrets_properties_genai</code> - Connector secrets properties for a generative AI connector</a> <a class="up" href="#__Models">Up</a></h3>
<h3><a name="secrets_properties_genai"><code>secrets_properties_genai</code> - Connector secrets properties for an OpenAI connector</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'>Defines secrets for connectors when type is <code>.gen-ai</code>.</div>
<div class="field-items">
<div class="param">apiKey (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The OpenAI API key. </div>

View file

@ -35,7 +35,7 @@ a| <<teams-action-type,Microsoft Teams>>
| Send a message to a Microsoft Teams channel.
a| <<gen-ai-action-type,OpenAI>>
a| <<openai-action-type,OpenAI>>
| Send a request to OpenAI.

View file

@ -1,7 +1,7 @@
[[gen-ai-action-type]]
== Generative AI connector and action
[[openai-action-type]]
== OpenAI connector and action
++++
<titleabbrev>Generative AI</titleabbrev>
<titleabbrev>OpenAI</titleabbrev>
++++
:frontmatter-description: Add a connector that can send requests to an OpenAI provider.
:frontmatter-tags-products: [kibana]
@ -9,7 +9,7 @@
: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.
The OpenAI 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.
[float]
[[define-gen-ai-ui]]
@ -18,14 +18,14 @@ The Generative AI connector uses https://github.com/axios/axios[axios] to send a
You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example:
[role="screenshot"]
image::management/connectors/images/gen-ai-connector.png[Generative AI connector]
image::management/connectors/images/gen-ai-connector.png[OpenAI connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[float]
[[gen-ai-connector-configuration]]
[[openai-connector-configuration]]
==== Connector configuration
Generative AI connectors have the following configuration properties:
OpenAI connectors have the following configuration properties:
Name:: The name of the connector.
OpenAI provider:: The OpenAI API provider, either OpenAI or Azure OpenAI.
@ -41,10 +41,10 @@ You can test connectors with the <<execute-connector-api,run connector API>> or
as you're creating or editing the connector in {kib}. For example:
[role="screenshot"]
image::management/connectors/images/gen-ai-params-test.png[Generative AI params test]
image::management/connectors/images/gen-ai-params-test.png[OpenAI params test]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
The Generative AI actions have the following configuration properties.
The OpenAI actions have the following configuration properties.
Body:: A JSON payload sent to the OpenAI API URL. For example:
+
@ -61,15 +61,15 @@ Body:: A JSON payload sent to the OpenAI API URL. For example:
}
--
[float]
[[gen-ai-connector-networking-configuration]]
[[openai-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 set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.
[float]
[[gen-ai-connector-token-dashboard]]
[[openai-connector-token-dashboard]]
=== Token usage dashboard
Once you've created a Generative AI connector, you can monitor its token usage using the *Generative AI Token Usage* dashboard. Select the connector in *{stack-manage-app}* > *{connectors-ui}* to view its details, then click the *View OpenAI Usage Dashboard for "_<Name>_" Connector* link to open the dashboard.
Once you've created a OpenAI connector, you can monitor its token usage using the *OpenAI Token Usage* dashboard. Select the connector in *{stack-manage-app}* > *{connectors-ui}* to view its details, then click the *View OpenAI Usage Dashboard for "_<Name>_" Connector* link to open the dashboard.
NOTE: To view the dashboard, you need at least `read` and `view_index_metadata` privileges for the `.kibana-event-log-*` index and the `Read` feature privilege for {kib}. You can set up a role with these minimum privileges and assign it to non-admin users who need to view this dashboard.

View file

@ -1,11 +1,11 @@
include::action-types/bedrock.asciidoc[leveloffset=+1]
include::action-types/d3security.asciidoc[leveloffset=+1]
include::action-types/email.asciidoc[leveloffset=+1]
include::action-types/gen-ai.asciidoc[leveloffset=+1]
include::action-types/resilient.asciidoc[leveloffset=+1]
include::action-types/index.asciidoc[leveloffset=+1]
include::action-types/jira.asciidoc[leveloffset=+1]
include::action-types/teams.asciidoc[leveloffset=+1]
include::action-types/openai.asciidoc[leveloffset=+1]
include::action-types/opsgenie.asciidoc[leveloffset=+1]
include::action-types/pagerduty.asciidoc[leveloffset=+1]
include::action-types/server-log.asciidoc[leveloffset=+1]

View file

@ -282,15 +282,15 @@ secrets:
[float]
[[preconfigured-gen-ai-configuration]]
==== Generative AI connectors
==== OpenAI connectors
The following example creates a <<gen-ai-action-type,generative AI connector>>:
The following example creates a <<openai-action-type,OpenAI connector>>:
[source,text]
--
xpack.actions.preconfigured:
my-gen-ai:
name: preconfigured-gen-ai-connector-type
my-open-ai:
name: preconfigured-openai-connector-type
actionTypeId: .gen-ai
config:
apiUrl: https://api.openai.com/v1/chat/completions <1>

View file

@ -422,3 +422,8 @@ This page has been deleted. Refer to <<alerting-getting-started>>.
== Enhancements and bug fixes for 8.10.0
This content has moved. Refer to <<enhancements-and-bug-fixes-v8.10.0-revised>> for 8.10.0.
[role="exclude",id="gen-ai-action-type"]
== Generative AI connector and action
This connector was renamed. Refer to <<openai-action-type>>.

View file

@ -261,13 +261,13 @@ For example: `.email`, `.index`, `.opsgenie`, `.server-log`, `.resilient`, `.sla
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`.
For a <<openai-action-type,OpenAI 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 <<openai-action-type,OpenAI 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`.
@ -321,7 +321,7 @@ NOTE: If you are using the `xpack.actions.allowedHosts` setting, make sure the h
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`.
For a <<openai-action-type,OpenAI 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.
@ -448,7 +448,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 a <<openai-action-type,OpenAI 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.
--