feat: language support updated.

feat: Language updated.
This commit is contained in:
chkdmin 2024-02-28 18:06:32 +09:00
parent a9a064dfa1
commit 2cdefb1001
4 changed files with 1312 additions and 1298 deletions

View file

@ -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

File diff suppressed because it is too large Load diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -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})`
}
],
});