diff --git a/dist/index.js b/dist/index.js index 29d2ed28..fb8a0d3f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5594,7 +5594,7 @@ class Options { openai_timeout_ms; openai_concurrency_limit; max_tokens_for_extra_content; - constructor(debug, max_files_to_summarize = '40', max_files_to_review = '0', review_comment_lgtm = false, path_filters = null, system_message = '', openai_model = 'gpt-3.5-turbo', openai_model_temperature = '0.0', openai_retries = '3', openai_timeout_ms = '60000', openai_concurrency_limit = '4') { + constructor(debug, max_files_to_summarize = '40', max_files_to_review = '0', review_comment_lgtm = false, path_filters = null, system_message = '', openai_model = 'gpt-3.5-turbo', openai_model_temperature = '0.0', openai_retries = '3', openai_timeout_ms = '120000', openai_concurrency_limit = '4') { this.debug = debug; this.max_files_to_summarize = parseInt(max_files_to_summarize); this.max_files_to_review = parseInt(max_files_to_review); @@ -5606,8 +5606,11 @@ class Options { this.openai_retries = parseInt(openai_retries); this.openai_timeout_ms = parseInt(openai_timeout_ms); this.openai_concurrency_limit = parseInt(openai_concurrency_limit); - if (this.openai_model === 'gpt-4') { - this.max_tokens_for_extra_content = 4000; + if (this.openai_model === 'gpt-4-32k') { + this.max_tokens_for_extra_content = 30000; + } + else if (this.openai_model === 'gpt-4') { + this.max_tokens_for_extra_content = 6000; } else if (this.openai_model === 'gpt-3.5-turbo') { this.max_tokens_for_extra_content = 2000; diff --git a/package-lock.json b/package-lock.json index 9e248c2f..df98716b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@types/node": "^18.15.10", "@typescript-eslint/parser": "^5.57.0", "@vercel/ncc": "^0.36.1", - "chatgpt": "^5.1.2", + "chatgpt": "^5.1.3", "eslint": "^8.36.0", "eslint-plugin-github": "^4.6.1", "eslint-plugin-jest": "^27.2.1", @@ -3109,9 +3109,9 @@ } }, "node_modules/chatgpt": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.1.2.tgz", - "integrity": "sha512-b/NnDQHDOpouK+gmhUCKcKuvnKEh+DotwXlP6Qgw1mqmkcfVl9Wt3/3noT8jbGJpMEpFOfzexXn5Rehpea1N0w==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.1.3.tgz", + "integrity": "sha512-RUroxNJdV4RSD3JKUINn/Dq3FQ+k4P3EwvAN+7wgnumlBcJx5DScRvI4wI3jUobQvk6Zb3n8IMgLQypsk0LmCQ==", "dev": true, "dependencies": { "@dqbd/tiktoken": "^1.0.2", diff --git a/package.json b/package.json index 88653014..a080472e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@types/node": "^18.15.10", "@typescript-eslint/parser": "^5.57.0", "@vercel/ncc": "^0.36.1", - "chatgpt": "^5.1.2", + "chatgpt": "^5.1.3", "eslint": "^8.36.0", "eslint-plugin-github": "^4.6.1", "eslint-plugin-jest": "^27.2.1", diff --git a/src/options.ts b/src/options.ts index 256ac6d2..9faf8889 100644 --- a/src/options.ts +++ b/src/options.ts @@ -215,7 +215,7 @@ export class Options { openai_model = 'gpt-3.5-turbo', openai_model_temperature = '0.0', openai_retries = '3', - openai_timeout_ms = '60000', + openai_timeout_ms = '120000', openai_concurrency_limit = '4' ) { this.debug = debug @@ -230,8 +230,10 @@ export class Options { this.openai_timeout_ms = parseInt(openai_timeout_ms) this.openai_concurrency_limit = parseInt(openai_concurrency_limit) - if (this.openai_model === 'gpt-4') { - this.max_tokens_for_extra_content = 4000 + if (this.openai_model === 'gpt-4-32k') { + this.max_tokens_for_extra_content = 30000 + } else if (this.openai_model === 'gpt-4') { + this.max_tokens_for_extra_content = 6000 } else if (this.openai_model === 'gpt-3.5-turbo') { this.max_tokens_for_extra_content = 2000 } else {