mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-13 16:04:05 +09:00
Fix endpoint
This commit is contained in:
2
.env
2
.env
@@ -1,4 +1,4 @@
|
|||||||
# Uncomment the following line to use the mocked API
|
# Uncomment the following line to use the mocked API
|
||||||
#VITE_API_BASE=http://localhost:5174
|
#VITE_API_BASE=http://localhost:5174
|
||||||
#VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
|
#VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
|
||||||
#VITE_ENDPOINT_COMPLETIONS=/v1/models
|
#VITE_ENDPOINT_MODELS=/v1/models
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// This makes it possible to override the OpenAI API base URL in the .env file
|
// This makes it possible to override the OpenAI API base URL in the .env file
|
||||||
const apiBase = import.meta.env.VITE_API_BASE || 'https://api.openai.com'
|
const apiBase = import.meta.env.VITE_API_BASE || 'https://api.openai.com'
|
||||||
const endpointCompletions = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/chat/completions'
|
const endpointCompletions = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/chat/completions'
|
||||||
const endpointModels = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/models'
|
const endpointModels = import.meta.env.VITE_ENDPOINT_MODELS || '/v1/models'
|
||||||
|
|
||||||
export const getApiBase = ():string => apiBase
|
export const getApiBase = ():string => apiBase
|
||||||
export const getEndpointCompletions = ():string => endpointCompletions
|
export const getEndpointCompletions = ():string => endpointCompletions
|
||||||
|
|||||||
Reference in New Issue
Block a user