Skip to content

Commit

Permalink
feat: support for gpt-4-1106-preview (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
danleyb2 authored Mar 20, 2024
1 parent 87bce4d commit 316110f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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

0 comments on commit 316110f

Please sign in to comment.