Skip to content

Commit f7ea994

Browse files
committed
feat: update click version to 8.1.3
fix: remove unused AsyncLEO provider fix: reduce timeout for query suggestions test: add conditional test for audio generation
1 parent d4d1651 commit f7ea994

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
requests[socks]>=2.32.3
2-
click==8.1.7
2+
click==8.1.3
33
rich==13.3.4
44
clipman==3.1.0
55
pyperclip==1.8.2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
]
1919

2020
cli_reqs = [
21-
"click==8.1.7",
21+
"click==8.1.3",
2222
"rich==13.3.4",
2323
"clipman==3.1.0",
2424
"pyperclip==1.8.2",

src/pytgpt/async_providers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pytgpt.opengpt import AsyncOPENGPT
44
from pytgpt.openai import AsyncOPENAI
55
from pytgpt.llama2 import AsyncLLAMA2
6-
from pytgpt.leo import AsyncLEO
76
from pytgpt.koboldai import AsyncKOBOLDAI
87
from pytgpt.groq import AsyncGROQ
98
from pytgpt.blackboxai import AsyncBLACKBOXAI
@@ -18,7 +17,6 @@
1817
"gpt4free": AsyncGPT4FREE,
1918
"llama2": AsyncLLAMA2,
2019
"yepchat": AsyncYEPCHAT,
21-
"leo": AsyncLEO,
2220
"groq": AsyncGROQ,
2321
"openai": AsyncOPENAI,
2422
"novita": AsyncNOVITA,

src/pytgpt/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def get_completions(self, document: Document, complete_event):
371371
)
372372
return completions
373373
for count, suggestion in enumerate(
374-
suggest_query(word, timeout=10, die_silently=True),
374+
suggest_query(word, timeout=2, die_silently=True),
375375
start=1):
376376
completions.append(Completion(suggestion, start_position=-len(word)))
377377
if count >= self.suggestions_limit:

tests/test_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,21 @@ def setUp(self):
130130
self.audio_generator = Audio()
131131
self.text = "This is a speech synthesis test"
132132

133+
@unittest.skipUnless(
134+
os.getenv('PYTGPT_TEST_AUDIO', '')=="true",
135+
"PYTGPT_TEST_AUDIO environment variable is not set to 'true' "
136+
)
133137
def test_text_to_audio(self):
134138
"""Speech synthesis"""
135139
voice_bytes = self.audio_generator.text_to_audio(
136140
self.text,
137141
)
138142
self.assertIs(type(voice_bytes), bytes)
139143

144+
@unittest.skipUnless(
145+
os.getenv('PYTGPT_TEST_AUDIO', '') == "true",
146+
"PYTGPT_TEST_AUDIO environment variable is not set to 'true' "
147+
)
140148
def test_text_to_audio_save_to(self):
141149
"""Save speech to a file"""
142150
saved_to = self.audio_generator.text_to_audio(self.text, auto=True)

0 commit comments

Comments
 (0)