Adding some logging

This commit is contained in:
Aymeric Gaurat-Apelli 2024-10-02 15:55:38 +10:00
parent 7d720b5447
commit faa3cdc04d

View file

@ -148,6 +148,7 @@ async function getAIResponse(prompt: string): Promise<Array<{
return null; return null;
} }
const jsonRes = res.substring(jsonStart, jsonEnd + 1); const jsonRes = res.substring(jsonStart, jsonEnd + 1);
console.log("AI Response:", jsonRes);
return JSON.parse(jsonRes).reviews; return JSON.parse(jsonRes).reviews;
} catch (error) { } catch (error) {
console.error("Error:", error); console.error("Error:", error);