Skip to content

Commit

Permalink
fix: adjust timeouts to comply with Vercel limits
Browse files Browse the repository at this point in the history
  • Loading branch information
NubsCarson committed Jan 1, 2025
1 parent 2607c17 commit f9ffdd3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions website/pages/api/ai/create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { Octokit } from '@octokit/rest';
// Initialize OpenAI client with timeout
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
timeout: 120000,
maxRetries: 3,
timeout: 50000,
maxRetries: 2,
});

// Initialize GitHub client
const octokit = new Octokit({
auth: process.env.GITHUB_ACCESS_TOKEN,
request: {
timeout: 60000
timeout: 50000
}
});

Expand All @@ -25,7 +25,7 @@ export const config = {
},
responseLimit: false,
},
maxDuration: 300,
maxDuration: 60,
};

async function createRepository(name: string, description: string) {
Expand Down

0 comments on commit f9ffdd3

Please sign in to comment.