Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
b84247b
1
Parent(s):
b32fabf
fix basePath
Browse files- pages/api/chat/index.ts +1 -1
pages/api/chat/index.ts
CHANGED
@@ -12,7 +12,7 @@ export default async function(req: Request) {
|
|
12 |
// Set up configurations for OpenAI
|
13 |
const openaiConfig = new Configuration({
|
14 |
apiKey: process.env.OPENAI_API_KEY,
|
15 |
-
|
16 |
} as any);
|
17 |
const openai = new OpenAIApi(openaiConfig);
|
18 |
const Hf = new HfInference(process.env.HUGGINGFACE_API_KEY);
|
|
|
12 |
// Set up configurations for OpenAI
|
13 |
const openaiConfig = new Configuration({
|
14 |
apiKey: process.env.OPENAI_API_KEY,
|
15 |
+
basePath: url ? url : undefined, // Set baseURL to the provided 'url' if it exists
|
16 |
} as any);
|
17 |
const openai = new OpenAIApi(openaiConfig);
|
18 |
const Hf = new HfInference(process.env.HUGGINGFACE_API_KEY);
|