Skip to content

Commit b1b037e

Browse files
committed
Drop support for generate shortcut #11
1 parent bab60bb commit b1b037e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Make use of flag `--provider` postfixed with the provider name of your choice. e
123123

124124
You can also simply use `pytgpt` instead of `python -m pytgpt`.
125125

126-
Starting from version 0.1.2, `generate` is the default command if you issue a prompt, and `interactive` takes action if you don't. Therefore, something like this will generate a response and exit `$ pytgpt "<Your prompt>"` while `$ pytgpt` will fire up an interactive prompt.
126+
Starting from version 0.2.7, running `$ pytgpt` without any other command or option will automatically enter the `interactive` mode. Otherwise, you'll need to explicitly declare the desired action, for example, by running `$ pytgpt generate`.
127+
127128

128129
<details>
129130

src/pytgpt/console.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,11 +1349,8 @@ def main(*args):
13491349
"""Fireup console programmically"""
13501350
sys.argv += list(args)
13511351
args = sys.argv
1352-
if len(args) > 1 and not "-" in args[1]:
1353-
if len(args) > 1 and args[1] not in tgpt2_.commands.keys():
1354-
sys.argv.insert(1, "generate") # Just a hack to make default command
1355-
elif len(args) == 1:
1356-
sys.argv.insert(1, "interactive")
1352+
if len(args) == 1:
1353+
sys.argv.insert(1, "interactive") # Just a hack to make default command
13571354
tgpt2_()
13581355

13591356

0 commit comments

Comments
 (0)