Skip to content

Commit

Permalink
Enable use of custom basePath
Browse files Browse the repository at this point in the history
  • Loading branch information
keiththomps committed May 20, 2024
1 parent 4c5be2e commit aca2d45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/OpenAiGptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export default class OpenAiGptService {
if (model == "gpt4") model = "gpt-4o";

const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY
apiKey: process.env.OPENAI_API_KEY,
basePath: process.env.OPENAI_API_BASE || "https://api.openai.com/v1"
})
const verbose = CliState.verbose()
const openai = new OpenAIApi(configuration)
Expand Down Expand Up @@ -61,4 +62,4 @@ export default class OpenAiGptService {
return responseBody
}

}
}

0 comments on commit aca2d45

Please sign in to comment.