Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 78352df

Browse files
authored
support gpt-4-32k (#97)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI Release Notes: - New Feature: Increased token limit and timeout limit for `gpt-4-32k` model. > "GPT-4-32k, oh so grand<br> > With more tokens at our command<br> > And longer timeouts to withstand<br> > Our language models will expand!" <!-- end of auto-generated comment: release notes by openai -->
1 parent ecc3aad commit 78352df

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

dist/index.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/node": "^18.15.10",
3939
"@typescript-eslint/parser": "^5.57.0",
4040
"@vercel/ncc": "^0.36.1",
41-
"chatgpt": "^5.1.2",
41+
"chatgpt": "^5.1.3",
4242
"eslint": "^8.36.0",
4343
"eslint-plugin-github": "^4.6.1",
4444
"eslint-plugin-jest": "^27.2.1",

src/options.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export class Options {
215215
openai_model = 'gpt-3.5-turbo',
216216
openai_model_temperature = '0.0',
217217
openai_retries = '3',
218-
openai_timeout_ms = '60000',
218+
openai_timeout_ms = '120000',
219219
openai_concurrency_limit = '4'
220220
) {
221221
this.debug = debug
@@ -230,8 +230,10 @@ export class Options {
230230
this.openai_timeout_ms = parseInt(openai_timeout_ms)
231231
this.openai_concurrency_limit = parseInt(openai_concurrency_limit)
232232

233-
if (this.openai_model === 'gpt-4') {
234-
this.max_tokens_for_extra_content = 4000
233+
if (this.openai_model === 'gpt-4-32k') {
234+
this.max_tokens_for_extra_content = 30000
235+
} else if (this.openai_model === 'gpt-4') {
236+
this.max_tokens_for_extra_content = 6000
235237
} else if (this.openai_model === 'gpt-3.5-turbo') {
236238
this.max_tokens_for_extra_content = 2000
237239
} else {

0 commit comments

Comments
 (0)