Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Sep 29, 2023
1 parent 9a9be5d commit 7557251
Show file tree
Hide file tree
Showing 87 changed files with 257 additions and 303 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1212,9 +1212,9 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users @elastic/security-threat-hunting-explore

## Explore owner connectors
/x-pack/plugins/stack_connectors/public/connector_types/gen_ai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/server/connector_types/gen_ai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/common/gen_ai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/public/connector_types/openai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/server/connector_types/openai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/common/openai @elastic/security-threat-hunting-explore

## Defend Workflows owner connectors
/x-pack/plugins/stack_connectors/public/connector_types/sentinelone @elastic/security-defend-workflows
Expand Down
16 changes: 8 additions & 8 deletions api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5273,10 +5273,10 @@
},
{
"parentPluginId": "actions",
"id": "def-common.GeneralConnectorFeatureId",
"id": "def-common.GenerativeAIConnectorFeatureId",
"type": "string",
"tags": [],
"label": "GeneralConnectorFeatureId",
"label": "GenerativeAIConnectorFeatureId",
"description": [],
"signature": [
"\"general\""
Expand Down Expand Up @@ -5613,18 +5613,18 @@
},
{
"parentPluginId": "actions",
"id": "def-common.GeneralFeature",
"id": "def-common.GenerativeAIFeature",
"type": "Object",
"tags": [],
"label": "GeneralFeature",
"label": "GenerativeAIFeature",
"description": [],
"path": "x-pack/plugins/actions/common/connector_feature_config.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "actions",
"id": "def-common.GeneralFeature.id",
"id": "def-common.GenerativeAIFeature.id",
"type": "string",
"tags": [],
"label": "id",
Expand All @@ -5635,7 +5635,7 @@
},
{
"parentPluginId": "actions",
"id": "def-common.GeneralFeature.name",
"id": "def-common.GenerativeAIFeature.name",
"type": "string",
"tags": [],
"label": "name",
Expand All @@ -5646,7 +5646,7 @@
},
{
"parentPluginId": "actions",
"id": "def-common.GeneralFeature.compatibility",
"id": "def-common.GenerativeAIFeature.compatibility",
"type": "string",
"tags": [],
"label": "compatibility",
Expand Down Expand Up @@ -5769,4 +5769,4 @@
}
]
}
}
}
14 changes: 7 additions & 7 deletions docs/api-generated/connectors/connector-apis-passthru.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion docs/management/action-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[[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]
: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.
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]]
Expand All @@ -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.
Expand All @@ -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:
+
Expand All @@ -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.
2 changes: 1 addition & 1 deletion docs/management/connectors/index.asciidoc
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
8 changes: 4 additions & 4 deletions docs/management/connectors/pre-configured-connectors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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>>.
8 changes: 4 additions & 4 deletions docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
--

Expand Down
4 changes: 2 additions & 2 deletions x-pack/examples/gen_ai_streaming_response_example/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Generative AI Connector Streaming Response Example
## OpenAI Connector Streaming Response Example

This example plugin shows you how to stream a response from a Generative AI connector.
This example plugin shows you how to stream a response from a OpenAI connector.

To run this example, use the command `yarn start --run-examples`.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ListConnectors = ({
label={i18n.translate(
'genAiStreamingResponseExample.app.component.selectConnectorLabel',
{
defaultMessage: 'Select a Generative AI Connector',
defaultMessage: 'Select an OpenAI Connector',
}
)}
labelAppend={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import { GenAiLogo } from '@kbn/stack-connectors-plugin/public/common';
import { OpenAILogo } from '@kbn/stack-connectors-plugin/public/common';
import { EuiFlexGroup, EuiCard, EuiFlexItem, EuiIcon } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

Expand All @@ -20,11 +20,11 @@ export const SetupConnector = ({ setIsConnectorModalVisible }: SetupConnectorPro
<EuiFlexItem grow={false}>
<EuiCard
layout="horizontal"
icon={<EuiIcon size="xl" type={GenAiLogo} />}
icon={<EuiIcon size="xl" type={OpenAILogo} />}
title={i18n.translate(
'genAiStreamingResponseExample.app.component.addConnectorCardTitle',
{
defaultMessage: 'Add Generative AI Connector',
defaultMessage: 'Add OpenAI Connector',
}
)}
description={i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const GenAiStreamingResponseExampleApp = ({
minimumLicenseRequired: 'platinum',
supportedFeatureIds: ['general'],
id: '.gen-ai',
name: 'Generative AI',
name: 'OpenAI',
enabled: true,
});
const [loading, setLoading] = useState<boolean>(true);
Expand Down
Loading

0 comments on commit 7557251

Please sign in to comment.