Skip to content

Commit

Permalink
[8.x] [Inference Endpoints View] Adds Alibaba AI Search to Deletion, …
Browse files Browse the repository at this point in the history
…search and filtering of inference endpoints (#190783) (#194597)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search
and filtering of inference endpoints
(#190783)](#190783)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"weizijun","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-01T14:40:18Z","message":"[Inference
Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering
of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search
support to
the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints)
management list view.\r\n\r\nThe Elasticsearch PR
is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm
not very familiar with kibana. I made this PR
from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Dima
Arnautov <[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","💝community","v9.0.0","v8.16.0","backport:version"],"title":"[Inference
Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering
of inference
endpoints","number":190783,"url":"https://github.com/elastic/kibana/pull/190783","mergeCommit":{"message":"[Inference
Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering
of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search
support to
the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints)
management list view.\r\n\r\nThe Elasticsearch PR
is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm
not very familiar with kibana. I made this PR
from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Dima
Arnautov <[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190783","number":190783,"mergeCommit":{"message":"[Inference
Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering
of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search
support to
the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints)
management list view.\r\n\r\nThe Elasticsearch PR
is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm
not very familiar with kibana. I made this PR
from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Dima
Arnautov <[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: weizijun <[email protected]>
  • Loading branch information
kibanamachine and weizijun authored Oct 1, 2024
1 parent 9267266 commit 5f04936
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,19 @@ export type InferenceServiceSettings =
url: string;
};
}
| {
service: 'alibabacloud-ai-search';
service_settings: {
api_key: string;
service_id: string;
host: string;
workspace: string;
http_schema: 'https' | 'http';
rate_limit: {
requests_per_minute: number;
};
};
}
| {
service: 'amazonbedrock';
service_settings: {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,24 @@ describe('ServiceProvider component', () => {
expect(screen.getByText('model-bedrock-xyz')).toBeInTheDocument();
});
});

describe('with alibabacloud-ai-search service', () => {
const mockEndpoint = {
inference_id: 'alibabacloud-ai-search-1',
service: 'alibabacloud-ai-search',
service_settings: {
service_id: 'service-123',
host: 'host-123',
workspace: 'default-123',
},
} as any;

it('renders the component with endpoint details', () => {
render(<ServiceProvider providerEndpoint={mockEndpoint} />);

expect(screen.getByText('AlibabaCloud AI Search')).toBeInTheDocument();
const icon = screen.getByTestId('table-column-service-provider-alibabacloud-ai-search');
expect(icon).toBeInTheDocument();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import azureOpenAIIcon from '../../../../assets/images/providers/azure_open_ai.s
import googleAIStudioIcon from '../../../../assets/images/providers/google_ai_studio.svg';
import mistralIcon from '../../../../assets/images/providers/mistral.svg';
import amazonBedrockIcon from '../../../../assets/images/providers/amazon_bedrock.svg';
import alibabaCloudAISearchIcon from '../../../../assets/images/providers/alibaba_cloud_ai_search.svg';
import { ServiceProviderKeys } from '../../types';
import * as i18n from './translations';

Expand All @@ -33,6 +34,10 @@ interface ServiceProviderRecord {
}

export const SERVICE_PROVIDERS: Record<ServiceProviderKeys, ServiceProviderRecord> = {
[ServiceProviderKeys['alibabacloud-ai-search']]: {
icon: alibabaCloudAISearchIcon,
name: 'AlibabaCloud AI Search',
},
[ServiceProviderKeys.amazonbedrock]: {
icon: amazonBedrockIcon,
name: 'Amazon Bedrock',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { TaskTypes } from '../../types';
export const INFERENCE_ENDPOINTS_TABLE_PER_PAGE_VALUES = [25, 50, 100];

export enum ServiceProviderKeys {
'alibabacloud-ai-search' = 'alibabacloud-ai-search',
amazonbedrock = 'amazonbedrock',
azureopenai = 'azureopenai',
azureaistudio = 'azureaistudio',
Expand Down

0 comments on commit 5f04936

Please sign in to comment.