Skip to content

Commit

Permalink
- Minor bug fix. RawDog : generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Simatwa committed Feb 8, 2024
1 parent ca0ead7 commit 0d12a3c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
Binary file modified assets/Figure_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,10 @@ For instance:
1. RawDog:
- Give consent to script execution
- Execute script internally or externally
- Choose python interpreter name
- Choose python interpreter name

## v0.4.3

**What's new?**

- Minor bug fix. RawDog : *generate*
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ $ git diff | pytgpt generate "Here is a diff file: {{stream}} Make a concise com
### Introducing RawDog

RawDog is a masterpiece feature that exploits the versatile capabilities of Python to command and control your system as per your needs. You can do literally anything with it, since it generates and executes python codes, driven by **your prompts**! To have a bite of *rawdog* simply append the flag `--rawdog` *shortcut* `-rd` in *generate/interactive* mode. This introduces a never seen-before feature in the *tgpt ecosystem*. Thanks to [AbanteAI/rawdog](https://github.com/AbanteAI/rawdog) for the idea.
RawDog is a masterpiece feature that exploits the versatile capabilities of Python to command and control your system as per your needs. You can literally do anything with it, since it generates and executes python codes, driven by **your prompts**! To have a bite of *rawdog* simply append the flag `--rawdog` *shortcut* `-rd` in *generate/interactive* mode. This introduces a never seen-before feature in the *tgpt ecosystem*. Thanks to [AbanteAI/rawdog](https://github.com/AbanteAI/rawdog) for the idea.

This can be useful in some ways. For instance :

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

setup(
name="python-tgpt",
version="0.4.2",
version="0.4.3",
license="MIT",
author="Smartwa",
maintainer="Smartwa",
Expand Down Expand Up @@ -71,7 +71,8 @@
"chatgpt-api",
"llama-api",
"leo",
"openfake",
"llama2",
"blackboxai",
"opengpt",
"koboldai",
"openai",
Expand Down
2 changes: 1 addition & 1 deletion src/pytgpt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .utils import appdir
import g4f

__version__ = "0.4.2"
__version__ = "0.4.3"
__author__ = "Smartwa"
__repo__ = "https://github.com/Simatwa/python-tgpt"

Expand Down
2 changes: 1 addition & 1 deletion src/pytgpt/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,7 @@ def generate(
interpreter,
):
"""Generate a quick response with AI"""
this.clear_history_file(filepath, new)
bot = Main(
max_tokens,
temperature,
Expand Down Expand Up @@ -1543,7 +1544,6 @@ def generate(
# {{stream}} without piped input
raise Exception(f"No piped input detected ~ {stream_placeholder}")

this.clear_history_file(filepath, new)
prompt = Optimizers.code(prompt) if code else prompt
prompt = Optimizers.shell_command(prompt) if shell else prompt
busy_bar.spin_index = (
Expand Down

0 comments on commit 0d12a3c

Please sign in to comment.