From 6dadaeb4ff982e9299e8461b7044e13b44267373 Mon Sep 17 00:00:00 2001 From: A-Baji Date: Tue, 16 Jul 2024 13:04:38 -0500 Subject: [PATCH 1/2] 3.0.1 prep --- CHANGELOG.md | 10 +++++++++- discordai/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf1cb37..8f926ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. -## [3.0.0] - 07-xx-2024 +## [3.0.1] - 07-16-2024 + +### Fixed + +- log downloading for non linux operating systems + + +## [3.0.0] - 07-12-2024 ### Added @@ -106,6 +113,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and - modified readme +[3.0.1]: https://github.com/A-Baji/discordAI/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/A-Baji/discordAI/compare/2.0.1...3.0.0 [2.0.1]: https://github.com/A-Baji/discordAI/compare/1.3.2...2.0.1 [2.0.0]: https://github.com/A-Baji/discordAI/compare/1.3.2...2.0.0 diff --git a/discordai/version.py b/discordai/version.py index 528787c..0552768 100644 --- a/discordai/version.py +++ b/discordai/version.py @@ -1 +1 @@ -__version__ = "3.0.0" +__version__ = "3.0.1" From 5057f495da00d0f84250f74ac58c8c8fedf2166f Mon Sep 17 00:00:00 2001 From: A-Baji Date: Tue, 16 Jul 2024 13:55:45 -0500 Subject: [PATCH 2/2] fix empy prompt bug and update error output --- CHANGELOG.md | 6 ++++++ discordai/bot/cogs/chatgpt.py | 2 +- discordai/bot/cogs/customai.py | 2 +- discordai/bot/cogs/imageai.py | 2 +- discordai/bot/cogs/openai.py | 2 +- discordai/template.py | 4 ++-- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f926ab..4e937f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,15 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and ## [3.0.1] - 07-16-2024 +### Changed + +- updated modelizer to version [3.0.11](https://github.com/A-Baji/discordAI-modelizer/releases/tag/3.0.11) +- slash command error output is more descriptive + ### Fixed - log downloading for non linux operating systems +- bug where empty prompts would print "**" when bold was true ## [3.0.0] - 07-12-2024 diff --git a/discordai/bot/cogs/chatgpt.py b/discordai/bot/cogs/chatgpt.py index 72d0ed9..1710bab 100644 --- a/discordai/bot/cogs/chatgpt.py +++ b/discordai/bot/cogs/chatgpt.py @@ -77,7 +77,7 @@ async def chatgpt( f"Failed to generate valid response with parameters: {params}\nError: {error}" ) await context.send( - f"Failed to generate valid response with paramaters: {params}\nError: {error}"[ + f"Failed to generate valid response with paramaters: {params}\nException: {type(error).__name__}\nError: {error}"[ :2000 ] ) diff --git a/discordai/bot/cogs/customai.py b/discordai/bot/cogs/customai.py index 5960837..27e48b2 100644 --- a/discordai/bot/cogs/customai.py +++ b/discordai/bot/cogs/customai.py @@ -77,7 +77,7 @@ async def customai( f"Failed to generate valid response with parameters: {params}\nError: {error}" ) await context.send( - f"Failed to generate valid response with paramaters: {params}\nError: {error}"[ + f"Failed to generate valid response with paramaters: {params}\nException: {type(error).__name__}\nError: {error}"[ :2000 ] ) diff --git a/discordai/bot/cogs/imageai.py b/discordai/bot/cogs/imageai.py index 0f420f2..25ec978 100644 --- a/discordai/bot/cogs/imageai.py +++ b/discordai/bot/cogs/imageai.py @@ -73,7 +73,7 @@ async def openai( ) print(f"Failed to generate image with parameters: {prompt}\nError: {error}") await context.send( - f"Failed to generate image with parameters: {prompt}\nError: {error}"[ + f"Failed to generate image with parameters: {prompt}\nException: {type(error).__name__}\nError: {error}"[ :2000 ] ) diff --git a/discordai/bot/cogs/openai.py b/discordai/bot/cogs/openai.py index 6467d56..6d6c5ca 100644 --- a/discordai/bot/cogs/openai.py +++ b/discordai/bot/cogs/openai.py @@ -68,7 +68,7 @@ async def openai( f"Failed to generate valid response with parameters: {params}\nError: {error}" ) await context.send( - f"Failed to generate valid response with paramaters: {params}\nError: {error}"[ + f"Failed to generate valid response with paramaters: {params}\nException: {type(error).__name__}\nError: {error}"[ :2000 ] ) diff --git a/discordai/template.py b/discordai/template.py index f26678c..e8f74ec 100644 --- a/discordai/template.py +++ b/discordai/template.py @@ -67,7 +67,7 @@ async def {command_name}( echo=False, stop="." if stop else None, ) - prompt = f"**{{prompt}}**" if bold else prompt + prompt = f"**{{prompt}}**" if bold and prompt else prompt emojied_response = re.sub( r":(\\w+):", lambda match: replace_emoji(match.group(1), context.bot.emoji_map), @@ -155,7 +155,7 @@ def gen_new_command( stop_default=stop_default, bold_default=bold_default, class_name=command_name.capitalize(), - error='f"Failed to generate valid response with parameters: {params}\\nError: {error}"', + error='f"Failed to generate valid response with parameters: {params}\\nException: {type(error).__name__}\\nError: {error}"', ) ) print(