Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Mar 17, 2023
1 parent 62ad535 commit 43aa58e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions cogs/text_service_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,14 @@ async def converse_command(
)
if target.id in self.conversation_threads:
self.awaiting_responses.append(user_id_normalized)
self.awaiting_target_responses.append(target.id)
if not self.pinecone_service:
self.conversation_threads[target.id].history.append(
EmbeddedConversationItem(
f"\n{ctx.author.display_name}: {opener} <|endofstatement|>\n",
0,
)
)
self.awaiting_thread_responses.append(target.id)

# ... (no other changes in the middle part of the function)

Expand All @@ -1199,8 +1206,8 @@ async def converse_command(
custom_api_key=user_api_key,
)
self.awaiting_responses.remove(user_id_normalized)
if target.id in self.awaiting_target_responses:
self.awaiting_target_responses.remove(target.id)
if target.id in self.awaiting_thread_responses:
self.awaiting_thread_responses.remove(target.id)

async def end_command(self, ctx: discord.ApplicationContext):
"""Command handler. Gets the user's thread and ends it"""
Expand Down
2 changes: 1 addition & 1 deletion gpt3discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from models.openai_model import Model


__version__ = "11.1.0"
__version__ = "11.1.1"


PID_FILE = Path("bot.pid")
Expand Down

0 comments on commit 43aa58e

Please sign in to comment.