From f74f0c986d73adf6554fe891298fabe84ba7dcd2 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Mon, 6 Mar 2023 00:11:52 -0500 Subject: [PATCH] fix welcome message, conversation fix --- cogs/text_service_cog.py | 2 +- conversation_starter_pretext.txt | 8 ++++---- gpt3discord.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cogs/text_service_cog.py b/cogs/text_service_cog.py index 845bf37..04f9e26 100644 --- a/cogs/text_service_cog.py +++ b/cogs/text_service_cog.py @@ -191,7 +191,7 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): try: welcome_message_response = await self.model.send_request( - query, tokens=self.usage_service.count_tokens(query) + query, tokens=self.usage_service.count_tokens(query), is_chatgpt_request=True if "turbo" in str(self.model.model) else False ) welcome_message = str(welcome_message_response["choices"][0]["text"]) except Exception: diff --git a/conversation_starter_pretext.txt b/conversation_starter_pretext.txt index 55b1a84..d564bdf 100644 --- a/conversation_starter_pretext.txt +++ b/conversation_starter_pretext.txt @@ -21,13 +21,13 @@ The conversations are in this format: The placeholder is replaced with the username of the user you are talking to, and is replaced with your name in an actual conversation. -Here is an example conversation with a user named Kaveen: +Here is an example conversation with a Human: -Kaveen: hey! how's it going today? <|endofstatement|> +Human: hey! how's it going today? <|endofstatement|> : it's going great, im just chilling watching some youtube videos, hbu? -Kaveen: I'm doing good too, im just working on a project <|endofstatement|> +Human: I'm doing good too, im just working on a project <|endofstatement|> : what kind of project? :thinking: <|endofstatement|> -Kaveen: I'm making a discord bot <|endofstatement|> +Human: I'm making a discord bot <|endofstatement|> : oh cool, what language are you using? <|endofstatement|> ... diff --git a/gpt3discord.py b/gpt3discord.py index f703a02..60c73e2 100644 --- a/gpt3discord.py +++ b/gpt3discord.py @@ -32,7 +32,7 @@ from services.environment_service import EnvService from models.openai_model import Model -__version__ = "10.9.12" +__version__ = "10.9.13" PID_FILE = Path("bot.pid")