mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-02-20 16:20:27 +00:00
feat: language support updated.
feat: Language updated.
This commit is contained in:
parent
a9a064dfa1
commit
2cdefb1001
4 changed files with 1312 additions and 1298 deletions
|
@ -11,6 +11,10 @@ inputs:
|
|||
description: "OpenAI API model."
|
||||
required: false
|
||||
default: "gpt-4"
|
||||
LANGUAGE:
|
||||
description: "Language for the code review."
|
||||
required: false
|
||||
default: "English"
|
||||
exclude:
|
||||
description: "Glob patterns to exclude files from the diff analysis"
|
||||
required: false
|
||||
|
|
2599
dist/index.js
vendored
2599
dist/index.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@ import minimatch from "minimatch";
|
|||
const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN");
|
||||
const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY");
|
||||
const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL");
|
||||
const LANGUAGE: string = core.getInput("LANGUAGE");
|
||||
|
||||
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
||||
|
||||
|
@ -135,6 +136,10 @@ async function getAIResponse(prompt: string): Promise<Array<{
|
|||
role: "system",
|
||||
content: prompt,
|
||||
},
|
||||
{
|
||||
role: "system",
|
||||
content: `(OOC: Answer in ${LANGUAGE})`
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue