//スプレッドシートからAIのキャラクター設定を取得する function getAiSettings(){ try{ const ss = SpreadsheetApp.getActiveSpreadsheet(); const aiSettings = ss.getRangeByName("ai_settings").getValue(); return aiSettings; } catch(e){ return null; } } //promptの内容をキャラクター設定されたAI(ChatGPT API)に投げて回答を取得する function getReply(prompt){ const OPENAI_API_KEY = PropertiesService.getScriptProperties().getProperty("OPENAI_API_KEY"); let mes