Skip to content

Commit

Permalink
chore: Add maxDuration constant for thread runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Unlok-Simon committed May 23, 2024
1 parent 4feb4c5 commit cc834fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/api/assistants/threads/[threadId]/messages/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { assistantId } from "@/app/assistant-config";
import { openai } from "@/app/openai";

export const maxDuration = 60; // This function can run for a maximum of 60 seconds
export const runtime = "nodejs";


// Send a new message to a thread
export async function POST(request, { params: { threadId } }) {
const { content } = await request.json();
Expand Down

0 comments on commit cc834fe

Please sign in to comment.