-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: add openai compatible baseURL endpoint #1167
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
base: main
Are you sure you want to change the base?
Conversation
…epo-to-fit-openai-compatible-api-key feat: add support for custom OpenAI base URL in service adapters
|
@itskylechung is attempting to deploy a commit to the Listinai Team on Vercel. A member of the Team first needs to authorize it. |
| runtime: new CopilotRuntime(), | ||
| serviceAdapter: new OpenAIAdapter({ | ||
| model: 'gpt-4.1', | ||
| ...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }), | ||
| }), | ||
| }); | ||
|
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| temperature: 0.7, | ||
| ...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }), | ||
| }); | ||
|
|
||
| const dalle = new DallEAPIWrapper({ | ||
| apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', | ||
| model: 'dall-e-3', | ||
| ...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }), | ||
| }); | ||
|
|
||
| interface WorkflowChannelsState { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', | ||
| model: 'gpt-4o-2024-08-06', | ||
| temperature: 0, | ||
| ...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }), | ||
| }); | ||
|
|
||
| interface WorkflowChannelsState { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| const dalle = new DallEAPIWrapper({ | ||
| apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', | ||
| model: 'gpt-image-1', | ||
| ...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }), | ||
| }); | ||
|
|
||
| const generateContent = z.object({ |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
Please I need this feature! we don't use OpenAI but we use self hosted models in our GPU cluster. It would be fantastic is you merge this PR |
What kind of change does this PR introduce?
eg: Bug fix, feature, docs update, ...
Why was this change needed?
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;