Added the oasstApiClient global var and init

This commit is contained in:
klotske
2023-01-06 13:44:46 +03:00
parent f5b49a952e
commit 3c330dcd13
4 changed files with 15 additions and 8 deletions
+1 -3
View File
@@ -1,5 +1,5 @@
import { getToken } from "next-auth/jwt";
import OasstApiClient from "src/lib/oasst_api_client";
import { oasstApiClient } from "src/lib/oasst_api_client";
import prisma from "src/lib/prismadb";
/**
@@ -19,8 +19,6 @@ const handler = async (req, res) => {
return;
}
const oasstApiClient = new OasstApiClient(process.env.FASTAPI_URL, process.env.FASTAPI_KEY);
// Parse out the local task ID and the interaction contents.
const { id, content, update_type } = await JSON.parse(req.body);