From 867c6d7e3302bf81441e3a4c4d07f03e06024310 Mon Sep 17 00:00:00 2001 From: Webifi Date: Wed, 7 Jun 2023 11:52:08 -0500 Subject: [PATCH] Fix endpoint --- .env | 2 +- src/lib/ApiUtil.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 8b9c4bf..38f7106 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ # Uncomment the following line to use the mocked API #VITE_API_BASE=http://localhost:5174 #VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions -#VITE_ENDPOINT_COMPLETIONS=/v1/models +#VITE_ENDPOINT_MODELS=/v1/models diff --git a/src/lib/ApiUtil.svelte b/src/lib/ApiUtil.svelte index afd59d1..7beff67 100644 --- a/src/lib/ApiUtil.svelte +++ b/src/lib/ApiUtil.svelte @@ -2,7 +2,7 @@ // 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 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 getEndpointCompletions = ():string => endpointCompletions