We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
how to set the default API key
I don't want people to enter the API, I added it by default so that the openai API is recognized automatically and everyone can chat.
The text was updated successfully, but these errors were encountered:
This issue is similar to #1.
This project does not support setting environment variables now. However, if your project (source code) is not public, you can try:
// src/providers/openai/api.ts export const fetchChatCompletion = async(payload: OpenAIFetchPayload) => { if (!payload.apiKey) { payload.apiKey = 'sk-xxx' } const initOptions = { // same } return fetch(`${payload.baseUrl}/v1/chat/completions`, initOptions) }
It will not display your key in web. And if the user enters his key, it will be used first.
Sorry, something went wrong.
No branches or pull requests
Describe the feature
how to set the default API key
Additional context
I don't want people to enter the API, I added it by default so that the openai API is recognized automatically and everyone can chat.
Participation
The text was updated successfully, but these errors were encountered: