Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for gpt-4-1106-preview #325

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
2 changes: 1 addition & 1 deletion packages/code-review-gpt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-review-gpt",
"version": "0.1.5",
"version": "0.1.6",
"description": "Your AI code reviewer. Improve code quality and catch bugs before you break production",
"bin": {
"code-review-gpt": "./dist/index.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const isIFeedbackArray = (input: unknown): input is IFeedback[] =>
Array.isArray(input) && input.every((entry) => isIFeedback(entry));

export const parseAttributes = (jsonString: string): IFeedback[] => {
let encodedJsonString = jsonString;
let encodedJsonString = jsonString.trim().startsWith('```json')?jsonString.trim().slice(8, -4): jsonString.trim()
encodedJsonString = encodeDetails(encodedJsonString);

// Parse the JSON string
Expand Down
4 changes: 4 additions & 0 deletions packages/code-review-gpt/src/review/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ export const signOff =
"#### Powered by [Code Review GPT](https://github.com/mattzcarey/code-review-gpt)";

export const modelInfo = [
{
model: "gpt-4-1106-preview",
maxPromptLength: 128000, //128k tokens
},
{
model: "gpt-4",
maxPromptLength: 21000, //8k tokens
Expand Down