diff --git a/SecondBotEvents/Services/ChatGptService.cs b/SecondBotEvents/Services/ChatGptService.cs index 13fe73e..856e0e5 100644 --- a/SecondBotEvents/Services/ChatGptService.cs +++ b/SecondBotEvents/Services/ChatGptService.cs @@ -302,7 +302,7 @@ namespace SecondBotEvents.Services // are we using redis? if (RedisLive() == false) { - return null; + return new List>(); } // is redis enabled for this message type? if ((myConfig.GetRedisImchat() == true) && (avatarchat == true)) @@ -321,7 +321,7 @@ namespace SecondBotEvents.Services return ReadChatFromRedis(store); } // Redis is not enabled for this message type, use local storage - return null; + return new List>(); } @@ -399,6 +399,10 @@ namespace SecondBotEvents.Services return history; } } + else + { + history = chatHistoryAI[store]; + } return history; } return history;