Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
b4f7005
1
Parent(s):
b84247b
fix baseUrl
Browse files- pages/api/chat/index.ts +2 -3
pages/api/chat/index.ts
CHANGED
|
@@ -11,10 +11,9 @@ export default async function(req: Request) {
|
|
| 11 |
|
| 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);
|
| 19 |
|
| 20 |
// Prepend the system message if it's not already there
|
|
|
|
| 11 |
|
| 12 |
// Set up configurations for OpenAI
|
| 13 |
const openaiConfig = new Configuration({
|
| 14 |
+
apiKey: process.env.OPENAI_API_KEY
|
|
|
|
| 15 |
} as any);
|
| 16 |
+
const openai = new OpenAIApi(openaiConfig, url ? url : undefined);
|
| 17 |
const Hf = new HfInference(process.env.HUGGINGFACE_API_KEY);
|
| 18 |
|
| 19 |
// Prepend the system message if it's not already there
|