Skip to content

Commit

Permalink
fix(options): whisper use custom configuration (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
usoonees committed Oct 11, 2023
1 parent c3294d7 commit 162a4a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const retryOptions = {

export async function whisper(file: File,openAiOptions:OpenAIOptions): Promise<string> {
const apiKey = openAiOptions.apiKey;
const baseUrl = openAiOptions.completionEndpoint ? "https://api.openai.com/v1" : openAiOptions.completionEndpoint;
const baseUrl = openAiOptions.completionEndpoint ? openAiOptions.completionEndpoint : "https://api.openai.com/v1";
const model = 'whisper-1';

// Create a FormData object and append the file
Expand Down
2 changes: 1 addition & 1 deletion src/lib/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const settingsSchema: SettingSchemaDesc[] = [
{
key: "chatCompletionEndpoint",
type: "string",
default: "http://api.openai.com/v1/",
default: "http://api.openai.com/v1",
title: "OpenAI API Completion Endpoint",
description: "The endpoint to use for OpenAI API completion requests. You shouldn't need to change this."
},
Expand Down

0 comments on commit 162a4a8

Please sign in to comment.