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