diff --git a/speech.mp3 b/speech.mp3 deleted file mode 100644 index df852d6..0000000 Binary files a/speech.mp3 and /dev/null differ diff --git a/src/_types/generalTypes.ts b/src/_types/generalTypes.ts index e3bc544..ce66db2 100644 --- a/src/_types/generalTypes.ts +++ b/src/_types/generalTypes.ts @@ -24,12 +24,15 @@ export interface ApiClientInterface { azureResourceName?: string | null | undefined; azureDeploymentId?: string | null | undefined; azureApiVersion?: string | null | undefined; + azureEndpointName?: string | null | undefined; huggingfaceBaseUrl?: string | null | undefined; forwardHeaders?: Array | null | undefined; cacheNamespace?: string | null | undefined; requestTimeout?: number | null | undefined; strictOpenAiCompliance?: boolean | null | undefined; anthropicBeta?: string | null | undefined; + anthropicVersion?: string | null | undefined; + mistralFimCompletion?: string | null | undefined; } export interface APIResponseType { diff --git a/src/baseClient.ts b/src/baseClient.ts index 12092ea..0545761 100644 --- a/src/baseClient.ts +++ b/src/baseClient.ts @@ -120,10 +120,10 @@ export abstract class ApiClient { portkeyHeaders: Record private fetch: Fetch; - constructor({ apiKey, baseURL, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta }: ApiClientInterface) { + constructor({ apiKey, baseURL, config, virtualKey, traceID, metadata, provider, 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 }: ApiClientInterface) { this.apiKey = apiKey ?? ""; this.baseURL = baseURL ?? ""; - this.customHeaders = createHeaders({ apiKey, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, cacheNamespace, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, huggingfaceBaseUrl, forwardHeaders, requestTimeout, strictOpenAiCompliance, anthropicBeta }) + this.customHeaders = createHeaders({ apiKey, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, cacheNamespace, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion }) this.portkeyHeaders = this.defaultHeaders() this.fetch = fetch; this.responseHeaders = {} diff --git a/src/client.ts b/src/client.ts index de30ebd..2c1e928 100644 --- a/src/client.ts +++ b/src/client.ts @@ -30,12 +30,15 @@ export class Portkey extends ApiClient { azureResourceName?: string | null | undefined; azureDeploymentId?: string | null | undefined; azureApiVersion?: string | null | undefined; + azureEndpointName?: string | null | undefined; huggingfaceBaseUrl?: string | null | undefined; forwardHeaders?: Array | 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; constructor({ apiKey = readEnv("PORTKEY_API_KEY") ?? null, baseURL = readEnv("PORTKEY_BASE_URL") ?? null, @@ -60,12 +63,15 @@ export class Portkey extends ApiClient { azureResourceName, azureDeploymentId, azureApiVersion, + azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, + anthropicVersion, + mistralFimCompletion }: ApiClientInterface) { super({ @@ -93,11 +99,14 @@ export class Portkey extends ApiClient { azureResourceName, azureDeploymentId, azureApiVersion, + azureEndpointName, huggingfaceBaseUrl, forwardHeaders, requestTimeout, strictOpenAiCompliance, anthropicBeta, + anthropicVersion, + mistralFimCompletion }); this.apiKey = apiKey; @@ -126,11 +135,14 @@ export class Portkey extends ApiClient { this.azureResourceName = azureResourceName; this.azureDeploymentId = azureDeploymentId; this.azureApiVersion = azureApiVersion; + this.azureEndpointName = azureEndpointName; this.huggingfaceBaseUrl = huggingfaceBaseUrl; this.forwardHeaders = forwardHeaders; this.requestTimeout = requestTimeout; this.strictOpenAiCompliance = strictOpenAiCompliance; this.anthropicBeta = anthropicBeta; + this.anthropicVersion = anthropicVersion; + this.mistralFimCompletion = mistralFimCompletion; } completions: API.Completions = new API.Completions(this);