Skip to content

Commit d9fd31e

Browse files
committed
Drop unused library and update CHANGELOG.md
1 parent 05f3200 commit d9fd31e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,6 @@
183183
Assume role of the LLM and give your response.*
184184

185185
</details>
186+
187+
- Combine both of piped and explicitly issued prompt #13
188+
- Support piping input in Windows. #13

src/pytgpt/console.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import json
1212
import re
1313
import sys
14-
import platform
1514
import datetime
1615
import time
1716
from time import sleep
@@ -1190,7 +1189,7 @@ def generate(
11901189
prompt = prompt + sep + clipman.get()
11911190
assert prompt.strip() != sep, "No copied text found, issue prompt"
11921191

1193-
if not prompt and sys.stdin.isatty(): # No prompt issued and no piped input
1192+
if not prompt and sys.stdin.isatty(): # No prompt issued and no piped input
11941193
help_info = (
11951194
"Usage: pytgpt generate [OPTIONS] PROMPT\n"
11961195
"Try 'pytgpt generate --help' for help.\n"
@@ -1201,7 +1200,7 @@ def generate(
12011200
) # Let's try to mimic the click's missing argument help info
12021201
sys.exit(1)
12031202

1204-
if not sys.stdin.isatty(): # Piped input detected - True
1203+
if not sys.stdin.isatty(): # Piped input detected - True
12051204
# Let's try to read piped input
12061205
stdin = click.get_text_stream("stdin").read()
12071206
prompt = prompt + "\n" + stdin if prompt else stdin

0 commit comments

Comments
 (0)