UNPKG

portkey-ai

Version:
80 lines (79 loc) 3.94 kB
import { ApiClientInterface } from './_types/generalTypes'; import * as API from './apis'; import { PostBodyParams, PostResponse } from './apis/postMethod'; import { ApiClient, APIPromise, RequestOptions } from './baseClient'; import { Stream } from './streaming'; export declare class Portkey extends ApiClient { apiKey: string | null; baseURL: string; virtualKey: string | null; config: Record<string, unknown> | string | null | undefined; provider: string | null | undefined; traceID: string | null | undefined; metadata: Record<string, unknown> | null | undefined; Authorization?: string; cacheForceRefresh?: boolean | null | undefined; debug?: boolean | null | undefined; customHost?: string | null | undefined; openaiProject?: string | null | undefined; openaiOrganization?: string | null | undefined; awsSecretAccessKey?: string | null | undefined; awsAccessKeyId?: string | null | undefined; awsSessionToken?: string | null | undefined; awsRegion?: string | null | undefined; vertexProjectId?: string | null | undefined; vertexRegion?: string | null | undefined; workersAiAccountId?: string | null | undefined; azureResourceName?: string | null | undefined; azureDeploymentId?: string | null | undefined; azureApiVersion?: string | null | undefined; azureEndpointName?: string | null | undefined; huggingfaceBaseUrl?: string | null | undefined; forwardHeaders?: Array<string> | null | undefined; requestTimeout?: number | null | undefined; cacheNamespace?: string | null | undefined; strictOpenAiCompliance?: boolean | null | undefined; anthropicBeta?: string | null | undefined; anthropicVersion?: string | null | undefined; mistralFimCompletion?: string | null | undefined; dangerouslyAllowBrowser?: boolean | null | undefined; vertexStorageBucketName?: string | null | undefined; providerFileName?: string | null | undefined; providerModel?: string | null | undefined; awsS3Bucket?: string | null | undefined; awsS3ObjectKey?: string | null | undefined; awsBedrockModel?: string | null | undefined; fireworksAccountId?: string | null | undefined; calculateAudioDuration: boolean | null | undefined; constructor({ apiKey, baseURL, config, virtualKey, provider, traceID, metadata, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, vertexStorageBucketName, providerFileName, providerModel, awsS3Bucket, awsS3ObjectKey, awsBedrockModel, fireworksAccountId, calculateAudioDuration, ...rest }: ApiClientInterface); completions: API.Completions; chat: API.Chat; embeddings: API.Embeddings; files: API.MainFiles; images: API.Images; models: API.Models; generations: API.Generations; prompts: API.Prompt; labels: API.Labels; collections: API.Collections; feedback: API.Feedback; batches: API.Batches; fineTuning: API.FineTuning; vectorStores: API.VectorStores; moderations: API.Moderations; audio: API.Audio; uploads: API.Uploads; responses: API.Responses; admin: API.Admin; virtualKeys: API.VirtualKeys; apiKeys: API.ApiKeys; configs: API.Configs; logs: API.Logs; beta: { assistants: API.Assistants; threads: API.Threads; chat: API.BetaChat; realtime: API.Realtime; }; post: (url: string, _body: PostBodyParams, params?: ApiClientInterface, opts?: RequestOptions) => APIPromise<Stream<PostResponse>> | APIPromise<PostResponse>; }