Begin to add tests for AIResponder.

This commit is contained in:
OK
2023-03-22 17:29:14 +01:00
parent 61a4cfde7e
commit 934ba62557
4 changed files with 36 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
from .discord_bot import FjerkroaBot, main
from .ai_responder import AIMessage, AIResponse, AIResponder
+1
View File
@@ -33,6 +33,7 @@ class AIResponder(object):
def __init__(self, config: Dict[str, Any]) -> None:
self.config = config
self.history: List[Dict[str, Any]] = []
openai.api_key = self.config['openai_token']
def _message(self, message: AIMessage, limit: Optional[int] = None) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]:
messages = []