Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
644a95f
1
Parent(s):
0892704
fix
Browse files- src/app/search/web/page.jsx +1 -1
- src/pages/api/llm.js +1 -6
src/app/search/web/page.jsx
CHANGED
|
@@ -52,5 +52,5 @@ export default function WebSearchPage({ searchParams }) {
|
|
| 52 |
|
| 53 |
console.log(aiResponse);
|
| 54 |
|
| 55 |
-
return <>{aiResponse
|
| 56 |
}
|
|
|
|
| 52 |
|
| 53 |
console.log(aiResponse);
|
| 54 |
|
| 55 |
+
return <>{aiResponse}</>;
|
| 56 |
}
|
src/pages/api/llm.js
CHANGED
|
@@ -2,12 +2,7 @@ import { Configuration, OpenAIApi } from "openai";
|
|
| 2 |
import { GoogleCustomSearch } from "openai-function-calling-tools";
|
| 3 |
|
| 4 |
export default function handler(req, res) {
|
| 5 |
-
|
| 6 |
-
res.status(405).send({ error: 'Method Not Allowed', method: req.method });
|
| 7 |
-
return;
|
| 8 |
-
}
|
| 9 |
-
|
| 10 |
-
const QUESTION = req.query.question;
|
| 11 |
|
| 12 |
if (!QUESTION) {
|
| 13 |
res.status(400).send({ error: 'Question is missing in request' });
|
|
|
|
| 2 |
import { GoogleCustomSearch } from "openai-function-calling-tools";
|
| 3 |
|
| 4 |
export default function handler(req, res) {
|
| 5 |
+
const QUESTION = req.body.question;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
if (!QUESTION) {
|
| 8 |
res.status(400).send({ error: 'Question is missing in request' });
|