mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-28 20:14:14 +00:00
Added debug output.
This commit is contained in:
parent
a9a064dfa1
commit
cc6ffd8e44
1 changed files with 5 additions and 0 deletions
|
@ -138,7 +138,12 @@ async function getAIResponse(prompt: string): Promise<Array<{
|
|||
],
|
||||
});
|
||||
|
||||
console.log(`Completions Response Object: ${response}`);
|
||||
|
||||
const res = response.choices[0].message?.content?.trim() || "{}";
|
||||
|
||||
console.log(`Trimmed Response Message: ${res}`);
|
||||
|
||||
return JSON.parse(res).reviews;
|
||||
} catch (error) {
|
||||
console.error("Error:", error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue