Skip to content

Commit

Permalink
remove reference to action plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jan 27, 2025
1 parent 2ad2052 commit dad02ea
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
* 2.0.
*/

import type { ActionResult as ActionConnector } from '@kbn/actions-plugin/server';
import { createInferenceRequestError } from '../errors';
import type { InferenceConnector } from './connectors';
import type { InferenceConnector, RawConnector } from './connectors';
import { isSupportedConnector } from './is_supported_connector';

/**
* Converts an action connector to the internal inference connector format.
*
* The function will throw if the provided connector is not compatible
*/
export const connectorToInference = (connector: ActionConnector): InferenceConnector => {
export const connectorToInference = (connector: RawConnector): InferenceConnector => {
if (!isSupportedConnector(connector)) {
throw createInferenceRequestError(
`Connector '${connector.id}' of type '${connector.actionTypeId}' not recognized as a supported connector`,
Expand Down

0 comments on commit dad02ea

Please sign in to comment.