UNPKG

portkey-ai

Version:
28 lines (27 loc) 1.74 kB
import OpenAI from 'openai'; import type { Portkey } from './index'; import { UserInviteListParams, UsersListParams, WorkspaceMemberListParams, WorkspacesListParams } from './apis/admin'; import { VirtualKeysListParams } from './apis/virtualKeys'; import { ApiKeysListParams } from './apis/apiKeys'; import { CongfigsListParams } from './apis/configs'; import { LogsExportListParams } from './apis/logsExport'; type PlatformProperties = { 'x-portkey-runtime'?: string; 'x-portkey-runtime-version'?: string; }; export declare const getPlatformProperties: () => PlatformProperties; export declare const readEnv: (env: string) => string | undefined; export declare const castToError: (err: any) => Error; export declare const isEmpty: (value: unknown) => boolean; export declare const getPortkeyHeader: (key: string) => string; type Config = Record<string, any> | string | null | undefined; export declare const overrideConfig: (initialConfig?: Config, updatedConfig?: Config) => Config; export declare const parseBody: (data: Record<string, unknown> | undefined | null) => Record<string, unknown>; export declare function finalResponse(response: any): any; export declare function portkeyHeaders(headers: any): any; export declare function defaultHeadersBuilder(client: any): any; export declare function initOpenAIClient(client: Portkey): OpenAI; export declare function toQueryParams(params?: UsersListParams | UserInviteListParams | WorkspacesListParams | WorkspaceMemberListParams | VirtualKeysListParams | ApiKeysListParams | CongfigsListParams | LogsExportListParams | any): string; export declare function setBaseURL(baseURL: any, apiKey: any): any; export declare function setApiKey(baseURL: any, apiKey: any): any; export {};