Skip to content

Commit

Permalink
feat: default poll values
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaczan committed Feb 26, 2024
1 parent d6c9e83 commit f351945
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tmlc/openai-polling",
"version": "0.0.3",
"version": "0.0.4",
"description": "Polling library for OpenAI Threads API",
"main": "./lib/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function poll(
openai: OpenAI,
thread: OpenAI.Beta.Threads.Thread,
run: OpenAI.Beta.Threads.Runs.Run,
options: Partial<PollOptions>
options: Partial<PollOptions> = defaultPollOptions
): Promise<OpenAI.Beta.Threads.Runs.Run> {
const mergedOptions: PollOptions = { ...defaultPollOptions, ...options };
const maxAttempts = mergedOptions.maxAttempts;
Expand Down

0 comments on commit f351945

Please sign in to comment.