neogram 9.3.3__py3-none-any.whl → 9.3.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neogram/ii.py +13 -9
- {neogram-9.3.3.dist-info → neogram-9.3.6.dist-info}/METADATA +3 -3
- neogram-9.3.6.dist-info/RECORD +8 -0
- neogram-9.3.3.dist-info/RECORD +0 -8
- {neogram-9.3.3.dist-info → neogram-9.3.6.dist-info}/WHEEL +0 -0
- {neogram-9.3.3.dist-info → neogram-9.3.6.dist-info}/licenses/LICENSE +0 -0
- {neogram-9.3.3.dist-info → neogram-9.3.6.dist-info}/top_level.txt +0 -0
neogram/ii.py
CHANGED
|
@@ -7,12 +7,13 @@ class OnlySQ:
|
|
|
7
7
|
def __init__(self, key: str):
|
|
8
8
|
self.key = key
|
|
9
9
|
|
|
10
|
-
def get_models(self, modality: str | list = None, can_tools: bool = None, can_stream: bool = None, status: str = None, max_cost: float = None, return_names: bool = False) -> list:
|
|
10
|
+
def get_models(self, modality: str | list = None, can_tools: bool = None, can_think: bool = None, can_stream: bool = None, status: str = None, max_cost: float = None, return_names: bool = False) -> list:
|
|
11
11
|
"""
|
|
12
12
|
Фильтрует модели по заданным параметрам
|
|
13
13
|
Args:
|
|
14
14
|
modality: Модальность ('text', 'image', 'sound') или список модальностей
|
|
15
15
|
can_tools: Фильтр по поддержке инструментов
|
|
16
|
+
can_think: Фильтр по возможности "думать" (reasoning)
|
|
16
17
|
can_stream: Фильтр по возможности потоковой передачи
|
|
17
18
|
status: Статус модели (например, 'work')
|
|
18
19
|
max_cost: Максимальная стоимость (включительно)
|
|
@@ -38,7 +39,7 @@ class OnlySQ:
|
|
|
38
39
|
model_tools = model_data.get("can-tools", False)
|
|
39
40
|
if model_tools != can_tools:
|
|
40
41
|
matches = False
|
|
41
|
-
if matches and
|
|
42
|
+
if matches and can_think is not None:
|
|
42
43
|
model_can_think = model_data.get("can-think", False)
|
|
43
44
|
if model_can_think != can_think:
|
|
44
45
|
matches = False
|
|
@@ -151,13 +152,16 @@ class Deef:
|
|
|
151
152
|
- {"type": "finish", "reason": "stop"}
|
|
152
153
|
"""
|
|
153
154
|
MODELS = [
|
|
154
|
-
"turbo", "
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
155
|
+
"turbo", "pplx_pro", "pplx_pro_upgraded", "experimental", "gpt4o",
|
|
156
|
+
"gpt41", "gpt5", "gpt5_thinking", "gpt51", "gpt51_thinking",
|
|
157
|
+
"gpt51_low_thinking", "gpt5_mini", "gpt5_nano", "gpt5_pro", "chatgpt_tools",
|
|
158
|
+
"gpt52", "gpt52_thinking", "gpt52_pro", "claude2", "claude37sonnetthinking",
|
|
159
|
+
"claude40sonnetthinking", "gemini25pro", "gemini30pro", "gemini30flash", "gemini30flash_high",
|
|
160
|
+
"grok", "claude40opus", "claude40opusthinking", "claude41opus", "claude41opusthinking",
|
|
161
|
+
"claude45opus", "claude45opusthinking", "claude46opus", "claude46opusthinking", "claude45sonnet", "claude45sonnetthinking",
|
|
162
|
+
"claude45haiku", "claude45haikuthinking", "kimik2thinking", "kimik25thinking", "grok4", "grok4nonthinking",
|
|
163
|
+
"grok41reasoning", "grok41nonreasoning", "o4mini", "o3pro", "pplx_sonar_internal_testing", "pplx_sonar_internal_testing_v2",
|
|
164
|
+
"pplx_alpha", "pplx_beta", "pplx_study", "pplx_agentic_research", "pplx_asi", "comet_browser_agent_sonnet", "comet_browser_agent_opus"]
|
|
161
165
|
BASE_URL = "https://www.perplexity.ai"
|
|
162
166
|
if model not in MODELS:
|
|
163
167
|
model = MODELS[0]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neogram
|
|
3
|
-
Version: 9.3.
|
|
3
|
+
Version: 9.3.6
|
|
4
4
|
Summary: neogram is a lightweight Python module for working with the Telegram Bot API and AI. It combines simple Telegram workflows with powerful features like text and image generation, translation, and more.
|
|
5
5
|
Author: SiriLV
|
|
6
6
|
Author-email: siriteamrs@gmail.com
|
|
@@ -26,7 +26,7 @@ Dynamic: requires-dist
|
|
|
26
26
|
Dynamic: requires-python
|
|
27
27
|
Dynamic: summary
|
|
28
28
|
|
|
29
|
-
# 📚 Документация neogram v9.3.
|
|
29
|
+
# 📚 Документация neogram v9.3.6
|
|
30
30
|
|
|
31
31
|
**Установка:**
|
|
32
32
|
|
|
@@ -79,7 +79,7 @@ bot = Bot(token="YOUR_TOKEN", timeout=60)
|
|
|
79
79
|
Классы для интеграции с внешними AI-сервисами.
|
|
80
80
|
|
|
81
81
|
### Класс `OnlySQ`
|
|
82
|
-
Интерфейс к сервису OnlySQ.
|
|
82
|
+
Интерфейс к сервису OnlySQ. Для пользования потребуетя api ключ: https://my.onlysq.ru/
|
|
83
83
|
* `get_models(...)`: Получить список доступных моделей.
|
|
84
84
|
* `generate_answer(model, messages)`: Генерация текста (чат).
|
|
85
85
|
* `generate_image(model, prompt, ...)`: Генерация изображений.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
neogram/__init__.py,sha256=C47Ofb8xvEqQlB-6Vt8hzOPpWcjASjSV8YID_bxbkW4,7307
|
|
2
|
+
neogram/fgram.py,sha256=zO3_MhJyCtJUzbU6FYY9FO747GSQLkdWqr45zYehNMs,257655
|
|
3
|
+
neogram/ii.py,sha256=oqD1nG7bKYHnFAvXsKRICuWbEGZqhbnPYFeYXAOsGYg,18921
|
|
4
|
+
neogram-9.3.6.dist-info/licenses/LICENSE,sha256=FAb9EYIqo8kpOGEwL_lH45SL_SLJ9wDxbSSRFpsSzvs,1112
|
|
5
|
+
neogram-9.3.6.dist-info/METADATA,sha256=IioKLVoOS1-LSjRzems6kvp56NcOUizOTqnSDztVLnY,50188
|
|
6
|
+
neogram-9.3.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
+
neogram-9.3.6.dist-info/top_level.txt,sha256=NqTlzfnaxZNIo9TCYSbG_LtE05Kx6JfrSSgzVPMAawA,8
|
|
8
|
+
neogram-9.3.6.dist-info/RECORD,,
|
neogram-9.3.3.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
neogram/__init__.py,sha256=C47Ofb8xvEqQlB-6Vt8hzOPpWcjASjSV8YID_bxbkW4,7307
|
|
2
|
-
neogram/fgram.py,sha256=zO3_MhJyCtJUzbU6FYY9FO747GSQLkdWqr45zYehNMs,257655
|
|
3
|
-
neogram/ii.py,sha256=jm95_eKlFKju4CCbFshgtO2_Wgl5AKNgSl6TDeCT0IY,18434
|
|
4
|
-
neogram-9.3.3.dist-info/licenses/LICENSE,sha256=FAb9EYIqo8kpOGEwL_lH45SL_SLJ9wDxbSSRFpsSzvs,1112
|
|
5
|
-
neogram-9.3.3.dist-info/METADATA,sha256=SVdJo2bMm2vXuEJUlHTo8VTPMQQZ4a7XDK-noaUrb6w,50101
|
|
6
|
-
neogram-9.3.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
-
neogram-9.3.3.dist-info/top_level.txt,sha256=NqTlzfnaxZNIo9TCYSbG_LtE05Kx6JfrSSgzVPMAawA,8
|
|
8
|
-
neogram-9.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|