Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
ff2cd25
1
Parent(s):
a9e1c12
duh
Browse files- src/pages/api/llm.js +2 -6
src/pages/api/llm.js
CHANGED
@@ -19,12 +19,8 @@ const handler = async (req, res) => {
|
|
19 |
};
|
20 |
|
21 |
let promptToSend = "You are a helpful assistant";
|
22 |
-
|
23 |
-
|
24 |
-
const stream = await LLMStream({ id: "gpt-3.5-turbo-0613" }, promptToSend, 0.8, messages, functions);
|
25 |
-
console.log(stream);
|
26 |
-
|
27 |
-
res.status(200).send(stream);
|
28 |
} catch (error) {
|
29 |
console.error(error);
|
30 |
if (error instanceof LLMError) {
|
|
|
19 |
};
|
20 |
|
21 |
let promptToSend = "You are a helpful assistant";
|
22 |
+
const stream = LLMStream({ id: "gpt-3.5-turbo-0613" }, promptToSend, 0.8, messages, functions);
|
23 |
+
return new Response(stream);
|
|
|
|
|
|
|
|
|
24 |
} catch (error) {
|
25 |
console.error(error);
|
26 |
if (error instanceof LLMError) {
|