Skip to content

Commit

Permalink
feat: add missing endpoints for AI services
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaymatrosov committed Oct 19, 2023
1 parent 79ac104 commit 891f93d
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/service-endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ServiceClientConstructor,
ServiceDefinition,
} from '@grpc/grpc-js';
import { ServiceClientConstructor, ServiceDefinition } from '@grpc/grpc-js';
import { GeneratedServiceClientCtor } from './types';

interface ServiceEndpoint {
Expand All @@ -17,6 +14,15 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [
serviceIds: ['yandex.cloud.operation.OperationService'],
endpoint: 'operation.api.cloud.yandex.net:443',
},
{
serviceIds: [
'yandex.cloud.ai.llm.v1alpha.EmbeddingsService',
'yandex.cloud.ai.llm.v1alpha.TextGenerationAsyncService',
'yandex.cloud.ai.llm.v1alpha.TextGenerationService',
'yandex.cloud.ai.llm.v1alpha.TokenizerService',
],
endpoint: 'llm.api.cloud.yandex.net:443',
},
{
serviceIds: [
'yandex.cloud.backup.v1.BackupService',
Expand Down Expand Up @@ -287,6 +293,7 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [
{
serviceIds: [
'yandex.cloud.ai.ocr.v1.TextRecognitionService',
'yandex.cloud.ai.ocr.v1.TextRecognitionAsyncService',
],
endpoint: 'ocr.api.cloud.yandex.net:443',
},
Expand Down Expand Up @@ -412,6 +419,13 @@ export const SERVICE_ENDPOINTS_LIST: ServiceEndpointsList = [
],
endpoint: 'loadtesting.api.cloud.yandex.net:443',
},
{
serviceIds: [
'speechkit.stt.v3.AsyncRecognizer',
'speechkit.stt.v3.Recognizer',
],
endpoint: 'stt.api.cloud.yandex.net:443',
},
];

export const getServiceClientEndpoint = <T extends ServiceDefinition>(generatedClientCtor: GeneratedServiceClientCtor<T>): string => {
Expand Down

0 comments on commit 891f93d

Please sign in to comment.