From 3f91be334a50d6d8cc61f7bf1af5a9405b31255c Mon Sep 17 00:00:00 2001 From: "L.F. Severgnini" Date: Tue, 19 Sep 2023 12:31:46 -0300 Subject: [PATCH] chore: bump max tokens --- src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c3a596be..0619a1ef 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,6 +11,8 @@ const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL"); const REVIEW_MAX_COMMENTS: string = core.getInput("REVIEW_MAX_COMMENTS"); const REVIEW_PROJECT_CONTEXT: string = core.getInput("REVIEW_PROJECT_CONTEXT"); +const MAX_TOKENS = 32768; + const octokit = new Octokit({ auth: GITHUB_TOKEN }); const configuration = new Configuration({ @@ -151,7 +153,7 @@ async function getAIResponse( const queryConfig = { model: OPENAI_API_MODEL, temperature: 0.2, - max_tokens: 700, + max_tokens: MAX_TOKENS, top_p: 1, frequency_penalty: 0, presence_penalty: 0,