-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OPENAI_BASE_PATH into env #188
Comments
Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect. Potential solutionThe task requires us to allow a custom API endpoint by adding an environment variable CodeIn the OPENAI_BASE_PATH=your_custom_api_endpoint Replace In the const OPENAI_BASE_PATH = process.env.OPENAI_BASE_PATH; Then, modify the const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
}); to: const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
basePath: OPENAI_BASE_PATH,
}); In the Changes on ui.jsThe To ensure the new environment variable If the Changes on modules/gpt.jsTo solve this task, we need to modify the Here is a step-by-step plan:
const OPENAI_BASE_PATH = process.env.OPENAI_BASE_PATH;
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
}); to: const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
basePath: OPENAI_BASE_PATH,
}); This will set the base path for the OpenAI API to the value of the Please note that this change assumes that the Changes on .envTo solve this task, you need to add the new environment variable Here is how you can do it:
Replace Please note that the Current plan usage: 88.13% Have feedback or need help? |
Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect. 🤖 I'm working on a solution for this issue. Please don't create new issues or edit this one until I reply back. Current plan usage: 81.74% Have feedback or need help? |
Background story explaining the current situation:
Can't change the API endpoint.
Desired new situation:
Alow custom API endpoint.
Implementation details:
Add OPENAI_BASE_PATH into ,env file.
The text was updated successfully, but these errors were encountered: