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 Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints #190783

Merged
merged 15 commits into from
Oct 1, 2024
Merged
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 @@ -265,6 +265,19 @@ export type InferenceServiceSettings =
url: string;
};
}
| {
service: 'alibabacloud-ai-search';
service_settings: {
sphilipse marked this conversation as resolved.
Show resolved Hide resolved
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