mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-09-10 11:47:08 +00:00
build and deploy new version
This commit is contained in:
parent
5f1b591f6f
commit
794702202f
2 changed files with 21 additions and 9 deletions
28
dist/index.js
vendored
28
dist/index.js
vendored
|
@ -139,14 +139,26 @@ ${chunk.changes
|
||||||
function getAIResponse(prompt) {
|
function getAIResponse(prompt) {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const queryConfig = {
|
function getQueryConfig() {
|
||||||
model: OPENAI_API_MODEL,
|
if (OPENAI_API_MODEL === "o3-mini") {
|
||||||
temperature: 0.2,
|
return {
|
||||||
max_completion_tokens: 1400,
|
model: "o3-mini",
|
||||||
top_p: 1,
|
// o3-mini supports only a few options:
|
||||||
frequency_penalty: 0,
|
max_completion_tokens: 1400,
|
||||||
presence_penalty: 0,
|
};
|
||||||
};
|
}
|
||||||
|
else {
|
||||||
|
return {
|
||||||
|
model: OPENAI_API_MODEL,
|
||||||
|
temperature: 0.2,
|
||||||
|
max_tokens: 1400,
|
||||||
|
top_p: 1,
|
||||||
|
frequency_penalty: 0,
|
||||||
|
presence_penalty: 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const queryConfig = getQueryConfig();
|
||||||
try {
|
try {
|
||||||
const response = yield openai.chat.completions.create(Object.assign(Object.assign(Object.assign({}, queryConfig), (OPENAI_API_MODEL === "o3-mini"
|
const response = yield openai.chat.completions.create(Object.assign(Object.assign(Object.assign({}, queryConfig), (OPENAI_API_MODEL === "o3-mini"
|
||||||
? { response_format: { type: "json_object" } }
|
? { response_format: { type: "json_object" } }
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue