Skip to content

Commit

Permalink
fix timeout valiable name
Browse files Browse the repository at this point in the history
  • Loading branch information
ouchi2501 committed Sep 29, 2023
1 parent 20877aa commit 000b500
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function completionRequest(
): Promise<string> {
try {
const openai = new OpenAI({ apiKey })
const timeout = 300 * 1000 // 5 minutes
const requestTimeout = 300 * 1000 // 5 minutes
const response = await openai.chat.completions.create(
{
messages: [
Expand All @@ -17,7 +17,7 @@ export async function completionRequest(
model: 'gpt-3.5-turbo'
},
{
timeout: timeout
timeout: requestTimeout
}
)
if (
Expand Down

0 comments on commit 000b500

Please sign in to comment.