Skip to content

Commit

Permalink
Silence TS warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterbryant committed Dec 11, 2023
1 parent ba18d79 commit 589db3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/api/chat/+server.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { env } from '$env/dynamic/private';
import { SupportedActions, type BotAction } from '$lib/types.d.js';
import { json } from '@sveltejs/kit';
import { json, type RequestHandler } from '@sveltejs/kit';
import OpenAI from 'openai';
import type { RequiredActionFunctionToolCall } from 'openai/resources/beta/threads/runs/runs.mjs';

// Initialize OpenAI API client
const openai = new OpenAI({ apiKey: env.OPENAI_API_KEY });
const assistantId = env.OPENAI_ASISTANT_ID;

export async function POST({ request }) {
export const POST: RequestHandler = async({ request }) => {
try {
// Add the user message to the chat thread
const { message, sessionId } = await request.json();
Expand Down

0 comments on commit 589db3d

Please sign in to comment.