matt HOFFNER commited on
Commit
945f6e8
·
1 Parent(s): 3514880
Files changed (1) hide show
  1. src/pages/api/llm.js +2 -1
src/pages/api/llm.js CHANGED
@@ -2,6 +2,7 @@ import { GoogleCustomSearch } from "openai-function-calling-tools";
2
  import { LLMError, LLMStream } from './stream';
3
 
4
  const handler = async (req, res) => {
 
5
  try {
6
  const googleCustomSearch = new GoogleCustomSearch({
7
  apiKey: process.env.API_KEY,
@@ -10,7 +11,7 @@ const handler = async (req, res) => {
10
  const messages = [
11
  {
12
  role: "user",
13
- content: req.body.question
14
  },
15
  ];
16
 
 
2
  import { LLMError, LLMStream } from './stream';
3
 
4
  const handler = async (req, res) => {
5
+ const { question } = await req.json();
6
  try {
7
  const googleCustomSearch = new GoogleCustomSearch({
8
  apiKey: process.env.API_KEY,
 
11
  const messages = [
12
  {
13
  role: "user",
14
+ content: question
15
  },
16
  ];
17