Skip to content
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

[Inference AI Connector] Added elastic provider for EIS #205672

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,31 @@ import * as i18n from '../translations';

const getProviders = (http: HttpSetup): InferenceProvider[] => {
return [
{
service: 'elastic',
name: 'Elastic',
task_types: ['sparse_embedding', 'completion'],
configurations: {
'rate_limit.requests_per_minute': {
default_value: null,
description: 'Minimize the number of rate limit errors.',
label: 'Rate Limit',
required: false,
sensitive: false,
updatable: true,
type: FieldType.INTEGER,
},
model_id: {
default_value: null,
description: 'The name of the model to use for the inference task.',
label: 'Model ID',
required: true,
sensitive: false,
updatable: true,
type: FieldType.STRING,
},
},
},
{
service: 'alibabacloud-ai-search',
name: 'AlibabaCloud AI Search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ async function getAllHelper({
id: inMemoryConnector.id,
actionTypeId: inMemoryConnector.actionTypeId,
name: inMemoryConnector.name,
config: inMemoryConnector.config,
isPreconfigured: inMemoryConnector.isPreconfigured,
isDeprecated: isConnectorDeprecated(inMemoryConnector),
isSystemAction: inMemoryConnector.isSystemAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum ServiceProviderKeys {
anthropic = 'anthropic',
watsonxai = 'watsonxai',
'alibabacloud-ai-search' = 'alibabacloud-ai-search',
elastic = 'elastic',
}

export const INFERENCE_CONNECTOR_ID = '.inference';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const InferenceServiceParamsFields: React.FunctionComponent<
if (!subAction) {
editAction(
'subAction',
provider === 'openai' && taskType === 'completion'
(provider === 'openai' || provider === 'elastic') && taskType === 'completion'
? SUB_ACTION.UNIFIED_COMPLETION
: taskType,
index
Expand All @@ -50,7 +50,7 @@ const InferenceServiceParamsFields: React.FunctionComponent<
'subActionParams',
{
...(DEFAULTS_BY_TASK_TYPE[
provider === 'openai' && taskType === 'completion'
(provider === 'openai' || provider === 'elastic') && taskType === 'completion'
? SUB_ACTION.UNIFIED_COMPLETION
: taskType
] ?? {}),
Expand Down