import { SpeechProvider, ChatProvider, EmbedProvider, TranscriptionProvider, ModelProvider } from '../utils/index.js'; import { a as AzureModels, C as CloudflareWorkersAiModels } from '../types-B5XRh4v5.js'; import '@xsai/shared'; interface CreateAzureOptions { /** * The static API key or AD access token fetcher for authorization. * * If passed in as a function, it is treated as an accessTokenFetcher. * * @see {@link https://learn.microsoft.com/en-us/azure/api-management/api-management-authenticate-authorize-azure-openai} */ apiKey: (() => Promise | string) | string; /** * The Azure API version to use (`api-version` param). * * Notice: Different deployment over different time may have different API versions, please * follow the exact prompt from either [Azure AI Foundry](https://ai.azure.com/) or Azure OpenAI service * to get the correct API version from the Azure OpenAI Service endpoint. * * On Azure AI Foundry portal, you can go to https://ai.azure.com/build/overview > Choose the project > * Overview > Endpoints and keys > Included capabilities > Azure OpenAI Service to get the correct endpoint. * * @see {@link https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning} */ apiVersion?: string; /** * Azure resource name. * * On Azure AI Foundry portal, you can go to https://ai.azure.com/build/overview > Choose the project > * Overview > Endpoints and keys > Included capabilities > Azure OpenAI Service to get the correct endpoint. * * @see {@link https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#uri-parameters} */ resourceName: string; } /** * Create a Azure Provider * @see {@link https://ai.azure.com/explore/models} * @see {@link https://learn.microsoft.com/en-us/azure/ai-foundry/model-inference/concepts/endpoints?tabs=rest#routing} * @remarks * For Azure AI services, you can have multiple deployments of the same model with different names. * * Please pass your deployment name as the `model` parameter. By default, Azure will use the model name * as the deployment name when deploying a model. */ declare const createAzure: (options: CreateAzureOptions) => Promise & ChatProvider & EmbedProvider & TranscriptionProvider & ModelProvider>; /** * Create a Player2 Provider * @see {@link https://player2.game} */ declare const createPlayer2: (baseURL?: string, gameKey?: string) => ChatProvider & SpeechProvider; /** * Create a Workers AI Provider * @see {@link https://developers.cloudflare.com/workers-ai} */ declare const createWorkersAI: (apiKey: string, accountId: string) => EmbedProvider & ChatProvider; export { createAzure, createPlayer2, createWorkersAI };