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

Use gpt-4-turbo-preview model #524

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ inputs:
!**/*.pb.go
!**/*.lock
!**/*.ttf
!**/*.yaml
!**/*.yml
!**/*.cfg
!**/*.toml
!**/*.ini
Expand Down Expand Up @@ -136,6 +134,8 @@ inputs:
!**/*.min.js.css
!**/*.tfstate
!**/*.tfstate.backup
!**/vault.yml
!**/vault.yaml
pascal-zarrad marked this conversation as resolved.
Show resolved Hide resolved
disable_review:
required: false
description: 'Only provide the summary and skip the code review.'
Expand All @@ -156,7 +156,7 @@ inputs:
openai_heavy_model:
required: false
description: 'Model to use for complex tasks such as code reviews.'
default: 'gpt-4'
default: 'gpt-4-turbo-preview'
pascal-zarrad marked this conversation as resolved.
Show resolved Hide resolved
openai_model_temperature:
required: false
description: 'Temperature for GPT model'
Expand Down Expand Up @@ -212,9 +212,6 @@ inputs:
specific files within 80 words.
- **Changes**: A markdown table of files and their summaries. Group files
with similar changes together into a single row to save space.
- **Poem**: Below the changes, include a whimsical, short poem written by
a rabbit to celebrate the changes. Format the poem as a quote using
the ">" symbol and feel free to use emojis where relevant.

Avoid additional commentary as this summary will be added as a comment on the
GitHub pull request. Use the titles "Walkthrough" and "Changes" and they must be H2.
pascal-zarrad marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
37 changes: 22 additions & 15 deletions dist/index.js

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

35 changes: 23 additions & 12 deletions src/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@ export class TokenLimits {

constructor(model = 'gpt-3.5-turbo') {
this.knowledgeCutOff = '2021-09-01'
if (model === 'gpt-4-32k') {
this.maxTokens = 32600
this.responseTokens = 4000
} else if (model === 'gpt-3.5-turbo-16k') {
this.maxTokens = 16300
this.responseTokens = 3000
} else if (model === 'gpt-4') {
this.maxTokens = 8000
this.responseTokens = 2000
} else {
this.maxTokens = 4000
this.responseTokens = 1000
switch (model) {
case 'gpt-4-32k':
this.maxTokens = 32600
this.responseTokens = 4000
break
case 'gpt-3.5-turbo-16k':
this.maxTokens = 16300
this.responseTokens = 3000
break
case 'gpt-4':
this.maxTokens = 8000
this.responseTokens = 2000
break
case 'gpt-4-turbo-preview':
this.maxTokens = 128000
this.responseTokens = 4000
this.knowledgeCutOff = '2023-12-01'
break
default:
this.maxTokens = 4000
this.responseTokens = 1000
break
}
pascal-zarrad marked this conversation as resolved.
Show resolved Hide resolved

// provide some margin for the request tokens
this.requestTokens = this.maxTokens - this.responseTokens - 100
}
Expand Down
Loading