Skip to content

Commit

Permalink
Merge pull request #64 from keiththomps/main
Browse files Browse the repository at this point in the history
Enable use of custom basePath
  • Loading branch information
ferrislucas authored May 22, 2024
2 parents 4c5be2e + aca2d45 commit ecea566
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 ecea566

Please sign in to comment.