aichatにGeminiを使用したときにうまく返答できないバグを修正

This commit is contained in:
jj1guj 2025-01-05 19:33:06 +09:00
parent 24ef7e6e94
commit ba4c920d00

View file

@ -127,7 +127,6 @@ export default class extends Module {
try { try {
res_data = await got.post(options, res_data = await got.post(options,
{parseJson: (res: string) => JSON.parse(res)}).json(); {parseJson: (res: string) => JSON.parse(res)}).json();
{parseJson: res => JSON.parse(res)}).json();
this.log(JSON.stringify(res_data)); this.log(JSON.stringify(res_data));
if (res_data.hasOwnProperty('candidates')) { if (res_data.hasOwnProperty('candidates')) {
if (res_data.candidates.length > 0) { if (res_data.candidates.length > 0) {