Skip to content

Commit 602accf

Browse files
committed
1 parent c609da7 commit 602accf

File tree

6 files changed

+28
-13
lines changed

6 files changed

+28
-13
lines changed

docs/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<a href="https://github.com/Simatwa/python-tgpt/actions/workflows/python-test.yml"><img src="https://github.com/Simatwa/python-tgpt/actions/workflows/python-test.yml/badge.svg" alt="Python Test"/></a>
99
-->
1010
<a href="https://github.com/Simatwa/python-tgpt/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/static/v1?logo=GPL&color=Blue&message=MIT&label=License"/></a>
11-
<a href="https://pypi.org/project/python-tgpt"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=0.2.3&color=green"/></a>
11+
<a href="https://pypi.org/project/python-tgpt"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=0.2.4&color=green"/></a>
1212
<a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/static/v1?logo=Black&label=Code-style&message=Black"/></a>
1313
<a href="#"><img alt="Passing" src="https://img.shields.io/static/v1?logo=Docs&label=Docs&message=Passing&color=green"/></a>
1414
<a href="https://github.com/Simatwa/python-tgpt/actions/workflows/python-package.yml"><img src="https://github.com/Simatwa/python-tgpt/actions/workflows/python-package.yml/badge.svg"/></a>
@@ -61,11 +61,12 @@ The name *python-tgpt* draws inspiration from its parent project [tgpt](https://
6161

6262
These are simply the hosts of the LLMs, which include:
6363

64-
1. Leo *(By Brave)*
65-
2. Fakeopen
64+
1. [Brave Leo](https://brave.com/leo/) (llama-2-13b-chat)
65+
2. [FakeOpen](https://chat.geekgpt.org/)
6666
3. Koboldai
67-
4. Opengpt
68-
5. OpenAI *(API key required)*
67+
4. [OpenGPTs](https://opengpts-example-vz4y4ooboq-uc.a.run.app/)
68+
5. [OpenAI](https://chat.openai.com) *(API key required)*
69+
6. [WebChatGPT](https://github.com/Simatwa/WebChatGPT) - **OpenAI** *(No API key required)*
6970

7071
## Prerequisites
7172

@@ -294,6 +295,8 @@ bot = koboldai.KOBOLDAI(is_conversation=False)
294295

295296
Utilize the `--disable-conversation` flag in the console to achieve the same functionality.
296297

298+
For more usage info run `$ pytgpt --help`
299+
297300

298301
## Acknowledgements
299302

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ click==8.1.3
33
rich==13.3.4
44
clipman==3.1.0
55
pyperclip==1.8.2
6-
appdirs==1.4.4
6+
appdirs==1.4.4
7+
webchatgpt==0.2.6

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
setup(
1616
name="python-tgpt",
17-
version="0.2.3",
17+
version="0.2.4",
1818
license="MIT",
1919
author="Smartwa",
2020
maintainer="Smartwa",
@@ -43,6 +43,7 @@
4343
"clipman==3.1.0",
4444
"pyperclip==1.8.2",
4545
"appdirs==1.4.4",
46+
"webchatgpt==0.2.6",
4647
],
4748
python_requires=">=3.9",
4849
keywords=[

src/pytgpt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .utils import appdir
22

3-
__version__ = "0.2.3"
3+
__version__ = "0.2.4"
44
__author__ = "Smartwa"
55
__repo__ = "https://github.com/Simatwa/python-tgpt"
66

src/pytgpt/console.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from pytgpt.utils import Optimizers
2626
from pytgpt.utils import default_path
2727
from pytgpt.utils import AwesomePrompts
28+
from WebChatGPT.console import chat as webchatgpt
2829

2930
getExc = lambda e: e.args[1] if len(e.args) > 1 else str(e)
3031

@@ -1125,7 +1126,13 @@ def timeout_handler(signum, frame):
11251126
bot.default(prompt, True)
11261127

11271128

1128-
@tgpt2_.command()
1129+
@tgpt2_.group() # For awesome-prompts
1130+
def awesome():
1131+
"""Manipulate awesome-prompts"""
1132+
pass
1133+
1134+
1135+
@awesome.command()
11291136
@click.option(
11301137
"-r",
11311138
"--remote",
@@ -1148,7 +1155,7 @@ def update(remote, output, new):
11481155
click.secho(f"Prompts saved to - '{AwesomePrompts.awesome_prompt_path}'", fg="cyan")
11491156

11501157

1151-
@tgpt2_.command()
1158+
@awesome.command()
11521159
@click.option(
11531160
"-k", "--key", required=True, type=click.STRING, help="Search keyword or index"
11541161
)
@@ -1185,7 +1192,7 @@ def search(
11851192
return resp != default
11861193

11871194

1188-
@tgpt2_.command()
1195+
@awesome.command()
11891196
@click.option("-n", "--name", required=True, help="Prompt name")
11901197
@click.option("-p", "--prompt", required=True, help="Prompt value")
11911198
@click.option(
@@ -1202,7 +1209,7 @@ def add(name, prompt, file):
12021209
return AwesomePrompts().add_prompt(name, prompt)
12031210

12041211

1205-
@tgpt2_.command()
1212+
@awesome.command()
12061213
@click.argument("name")
12071214
@click.option(
12081215
"--case-sensitive",
@@ -1239,6 +1246,9 @@ def main(*args):
12391246
len(args) == 1
12401247
): # and platform.system() == "Windows": What do you think about this?
12411248
sys.argv.insert(1, "interactive")
1249+
tgpt2_.add_command(
1250+
webchatgpt, "webchatgpt"
1251+
) # Intergration with WebChatGPT https://github.com/Simatwa/WebChatGPT
12421252
tgpt2_()
12431253

12441254

src/pytgpt/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
import appdirs
77

8-
appdir = appdirs.AppDirs("tgpt", "Smartwa")
8+
appdir = appdirs.AppDirs("pytgpt", "Smartwa")
99

1010
default_path = appdir.user_cache_dir
1111

0 commit comments

Comments
 (0)