diff --git a/src/handlers/ai21.ts b/src/handlers/ai21.ts index 5e42e5f..732d793 100644 --- a/src/handlers/ai21.ts +++ b/src/handlers/ai21.ts @@ -133,14 +133,14 @@ export async function AI21Handler( params: HandlerParams, ): Promise { const baseUrl = params.baseUrl ?? 'https://api.ai21.com'; - const apiKey = params. apiKey ?? process.env.AI21_API_KEY!; + const apiKey = params.apiKey ?? process.env.AI21_API_KEY!; const model = params.model; const prompt = combinePrompts(params.messages); const res = await getAI21Response(model, prompt, baseUrl, apiKey); if (!res.ok) { - throw new Error(`Recieved an error with code ${res.status} from AI21 API.`); + throw new Error(`Received an error with code ${res.status} from AI21 API.`); } const body = (await res.json()) as AI21Response; diff --git a/src/handlers/anthropic.ts b/src/handlers/anthropic.ts index 8ce5335..1684c5a 100644 --- a/src/handlers/anthropic.ts +++ b/src/handlers/anthropic.ts @@ -87,7 +87,7 @@ export async function AnthropicHandler( export async function AnthropicHandler( params: HandlerParams, ): Promise { - const apiKey = params. apiKey ?? process.env.ANTHROPIC_API_KEY; + const apiKey = params.apiKey ?? process.env.ANTHROPIC_API_KEY; const anthropic = new Anthropic({ apiKey: apiKey, diff --git a/src/handlers/cohere.ts b/src/handlers/cohere.ts index 8d64ab0..7223edc 100644 --- a/src/handlers/cohere.ts +++ b/src/handlers/cohere.ts @@ -51,7 +51,7 @@ export async function CohereHandler( export async function CohereHandler( params: HandlerParams, ): Promise { - const apiKey = params. apiKey ?? process.env.COHERE_API_KEY!; + const apiKey = params.apiKey ?? process.env.COHERE_API_KEY!; cohere.init(apiKey); const textsCombined = combinePrompts(params.messages); diff --git a/src/handlers/deepinfra.ts b/src/handlers/deepinfra.ts index d1b19d5..6d7f6c0 100644 --- a/src/handlers/deepinfra.ts +++ b/src/handlers/deepinfra.ts @@ -69,7 +69,7 @@ export async function DeepInfraHandler( params: HandlerParams, ): Promise { const baseUrl = params.baseUrl ?? 'https://api.deepinfra.com'; - const apiKey = params. apiKey ?? process.env.DEEPINFRA_API_KEY!; + const apiKey = params.apiKey ?? process.env.DEEPINFRA_API_KEY!; const model = params.model.split('deepinfra/')[1]; const res = await getDeepInfraResponse( diff --git a/src/handlers/mistral.ts b/src/handlers/mistral.ts index 52af9de..a92559a 100644 --- a/src/handlers/mistral.ts +++ b/src/handlers/mistral.ts @@ -70,7 +70,7 @@ export async function MistralHandler( params: HandlerParams, ): Promise { const baseUrl = params.baseUrl ?? 'https://api.mistral.ai'; - const apiKey = params. apiKey ?? process.env.MISTRAL_API_KEY!; + const apiKey = params.apiKey ?? process.env.MISTRAL_API_KEY!; const model = params.model.split('mistral/')[1]; const res = await getMistralResponse( diff --git a/src/handlers/mistralEmbedding.ts b/src/handlers/mistralEmbedding.ts index 47273fa..f0d1435 100644 --- a/src/handlers/mistralEmbedding.ts +++ b/src/handlers/mistralEmbedding.ts @@ -25,7 +25,7 @@ export async function MistralEmbeddingHandler( ): Promise { const model = params.model.split('mistral/')[1]; const baseUrl = params.baseUrl ?? 'https://api.mistral.ai'; - const apiKey = params. apiKey ?? process.env.MISTRAL_API_KEY!; + const apiKey = params.apiKey ?? process.env.MISTRAL_API_KEY!; const response = await getMistralResponse( model, params.input, @@ -35,7 +35,7 @@ export async function MistralEmbeddingHandler( if (!response.ok) { throw new Error( - `Recieved an error with code ${response.status} from Mistral API.`, + `Received an error with code ${response.status} from Mistral API.`, ); } const body = (await response.json()) as CreateEmbeddingResponse; diff --git a/src/handlers/ollama.ts b/src/handlers/ollama.ts index 187a661..a423243 100644 --- a/src/handlers/ollama.ts +++ b/src/handlers/ollama.ts @@ -122,7 +122,7 @@ export async function OllamaHandler( if (!res.ok) { throw new Error( - `Recieved an error with code ${res.status} from Ollama API.`, + `Received an error with code ${res.status} from Ollama API.`, ); } diff --git a/src/handlers/ollamaEmbedding.ts b/src/handlers/ollamaEmbedding.ts index 8a24d1e..30a584d 100644 --- a/src/handlers/ollamaEmbedding.ts +++ b/src/handlers/ollamaEmbedding.ts @@ -37,7 +37,7 @@ export async function OllamaEmbeddingHandler( if (!response.ok) { throw new Error( - `Recieved an error with code ${response.status} from Ollama API.`, + `Received an error with code ${response.status} from Ollama API.`, ); } const body = (await response.json()) as OllamaEmbeddingsResponseChunk; diff --git a/src/handlers/openai.ts b/src/handlers/openai.ts index 6cf6f2b..ee4b621 100644 --- a/src/handlers/openai.ts +++ b/src/handlers/openai.ts @@ -45,7 +45,7 @@ export async function OpenAIHandler( export async function OpenAIHandler( params: HandlerParams, ): Promise { - const apiKey = params. apiKey ?? process.env.OPENAI_API_KEY; + const apiKey = params.apiKey ?? process.env.OPENAI_API_KEY; const openai = new OpenAI({ apiKey: apiKey, diff --git a/src/handlers/replicate.ts b/src/handlers/replicate.ts index 4d039d0..4e71bc5 100644 --- a/src/handlers/replicate.ts +++ b/src/handlers/replicate.ts @@ -120,7 +120,7 @@ export async function ReplicateHandler( export async function ReplicateHandler( params: HandlerParams, ): Promise { - const apiKey = params. apiKey ?? process.env.REPLICATE_API_KEY; + const apiKey = params.apiKey ?? process.env.REPLICATE_API_KEY; const replicate = new Replicate({ auth: apiKey, });