|
|
|
@ -31,11 +31,9 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"):
|
|
|
|
|
DEBUG_GUILD,
|
|
|
|
|
DEBUG_CHANNEL,
|
|
|
|
|
data_path: Path,
|
|
|
|
|
share_path: Path,
|
|
|
|
|
):
|
|
|
|
|
super().__init__()
|
|
|
|
|
self.data_path = data_path
|
|
|
|
|
self.share_path = share_path
|
|
|
|
|
self.debug_channel = None
|
|
|
|
|
self.bot = bot
|
|
|
|
|
self._last_member_ = None
|
|
|
|
@ -59,7 +57,7 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"):
|
|
|
|
|
self.awaiting_responses = []
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
conversation_file_path = share_path / "conversation_starter_pretext.txt"
|
|
|
|
|
conversation_file_path = EnvService.find_shared_file("conversation_starter_pretext.txt")
|
|
|
|
|
# Attempt to read a conversation starter text string from the file.
|
|
|
|
|
with conversation_file_path.open("r") as f:
|
|
|
|
|
self.CONVERSATION_STARTER_TEXT = f.read()
|
|
|
|
@ -68,9 +66,7 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"):
|
|
|
|
|
)
|
|
|
|
|
assert self.CONVERSATION_STARTER_TEXT is not None
|
|
|
|
|
|
|
|
|
|
conversation_file_path_minimal = (
|
|
|
|
|
share_path / "conversation_starter_pretext_minimal.txt"
|
|
|
|
|
)
|
|
|
|
|
conversation_file_path_minimal = EnvService.find_shared_file("conversation_starter_pretext_minimal.txt")
|
|
|
|
|
with conversation_file_path_minimal.open("r") as f:
|
|
|
|
|
self.CONVERSATION_STARTER_TEXT_MINIMAL = f.read()
|
|
|
|
|
print(
|
|
|
|
|