Skip to content

Commit

Permalink
fix: restrict pinned openai types (named only)
Browse files Browse the repository at this point in the history
Older TS versions throw for `export type *`.

Fixes #48.
  • Loading branch information
ctjlewis committed Jun 20, 2023
1 parent 55a192a commit f26f66c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
"ava": "^5.2.0",
"dotenv": "^16.0.3",
"eslint": "^8.41.0",
"openai": "^3.3.0",
"typedoc": "^0.24.7",
"typescript": "^5.0.4"
},
"dependencies": {
"eventsource-parser": "^1.0.0",
"node-fetch": "^3.3.1",
"openai": "^3.2.1",
"yield-stream": "^3.0.0"
},
"keywords": [
Expand All @@ -73,4 +73,4 @@
"releaseName": "v${version}"
}
}
}
}
36 changes: 18 additions & 18 deletions pnpm-lock.yaml

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

9 changes: 8 additions & 1 deletion src/lib/pinned.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export type * from "openai";
export type {
CreateChatCompletionRequest,
CreateCompletionRequest,
CreateEditRequest,
CreateEmbeddingRequest,
CreateFineTuneRequest,
CreateImageRequest,
} from "openai";

1 comment on commit f26f66c

@vercel
Copy link

@vercel vercel bot commented on f26f66c Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.