Skip to content

Commit

Permalink
feat: using global openai endpoint (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
okisdev committed Mar 15, 2024
1 parent ec8b852 commit b947cdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ GOOGLE_CLIENT_SECRET=

## OpenAI
OPENAI_API_KEY=
OPENAI_API_ENDPOINT=
2 changes: 1 addition & 1 deletion app/api/messages/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function POST(req: Request): Promise<Response> {
default:
case 'OpenAI':
const openAIAPIKey = (config?.apiKey || process.env.OPENAI_API_KEY) as string;
const openAIAPIEndpoint = config?.apiEndpoint as string;
const openAIAPIEndpoint = (config?.apiEndpoint || process.env.OPENAI_API_ENDPOINT) as string;
const openAIAPIModel = (config?.apiModel as OpenAIModel) || 'gpt-3.5-turbo';
const openAIAPITemperature = (config?.apiTemperature as number) || 0.3;

Expand Down

0 comments on commit b947cdb

Please sign in to comment.