Ryzenth 1.9.3__py3-none-any.whl → 1.9.5__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.
- Ryzenth/__init__.py +2 -4
- Ryzenth/__version__.py +1 -1
- Ryzenth/_asynchisded.py +3 -3
- Ryzenth/_client.py +11 -2
- Ryzenth/helper/__init__.py +3 -1
- Ryzenth/helper/_decorators.py +48 -0
- Ryzenth/helper/_federation.py +1 -1
- Ryzenth/helper/_fonts.py +1 -3
- Ryzenth/helper/_images.py +2 -2
- Ryzenth/helper/_moderator.py +1 -3
- Ryzenth/helper/_openai.py +2 -2
- Ryzenth/helper/_thinking.py +2 -2
- {ryzenth-1.9.3.dist-info → ryzenth-1.9.5.dist-info}/METADATA +1 -1
- ryzenth-1.9.5.dist-info/RECORD +20 -0
- {ryzenth-1.9.3.dist-info → ryzenth-1.9.5.dist-info}/WHEEL +1 -1
- ryzenth-1.9.3.dist-info/RECORD +0 -19
- {ryzenth-1.9.3.dist-info → ryzenth-1.9.5.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.9.3.dist-info → ryzenth-1.9.5.dist-info}/top_level.txt +0 -0
Ryzenth/__init__.py
CHANGED
Ryzenth/__version__.py
CHANGED
Ryzenth/_asynchisded.py
CHANGED
@@ -22,8 +22,8 @@ import logging
|
|
22
22
|
import httpx
|
23
23
|
from box import Box
|
24
24
|
|
25
|
-
from
|
26
|
-
from
|
25
|
+
from ._errors import WhatFuckError
|
26
|
+
from .helper import (
|
27
27
|
FbanAsync,
|
28
28
|
FontsAsync,
|
29
29
|
ImagesAsync,
|
@@ -31,7 +31,7 @@ from Ryzenth.helper import (
|
|
31
31
|
WhatAsync,
|
32
32
|
WhisperAsync,
|
33
33
|
)
|
34
|
-
from
|
34
|
+
from .types import DownloaderBy, QueryParameter
|
35
35
|
|
36
36
|
LOGS = logging.getLogger("[Ryzenth] async")
|
37
37
|
|
Ryzenth/_client.py
CHANGED
@@ -19,8 +19,9 @@
|
|
19
19
|
|
20
20
|
import os
|
21
21
|
|
22
|
-
from
|
23
|
-
from
|
22
|
+
from ._asynchisded import RyzenthXAsync
|
23
|
+
from ._synchisded import RyzenthXSync
|
24
|
+
from .helper import Decorators
|
24
25
|
|
25
26
|
|
26
27
|
class ApiKeyFrom:
|
@@ -41,3 +42,11 @@ class ApiKeyFrom:
|
|
41
42
|
|
42
43
|
def something(self):
|
43
44
|
pass
|
45
|
+
|
46
|
+
class UrHellFrom:
|
47
|
+
def __init__(self, name: str, only_author=False):
|
48
|
+
self.decorators = Decorators(ApiKeyFrom)
|
49
|
+
self.ai = self.decorators.send_ai(name=name, only_author=only_author)
|
50
|
+
|
51
|
+
def something(self):
|
52
|
+
pass
|
Ryzenth/helper/__init__.py
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
# You should have received a copy of the GNU Affero General Public License
|
18
18
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
|
20
|
+
from ._decorators import Decorators
|
20
21
|
from ._federation import FbanAsync, FbanSync
|
21
22
|
from ._fonts import FontsAsync, FontsSync
|
22
23
|
from ._images import ImagesAsync, ImagesSync
|
@@ -36,5 +37,6 @@ __all__ = [
|
|
36
37
|
"ModeratorAsync",
|
37
38
|
"ModeratorSync",
|
38
39
|
"FontsAsync",
|
39
|
-
"FontsSync"
|
40
|
+
"FontsSync",
|
41
|
+
"Decorators"
|
40
42
|
]
|
@@ -0,0 +1,48 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# Copyright 2019-2025 (c) Randy W @xtdevs, @xtsea
|
4
|
+
#
|
5
|
+
# from : https://github.com/TeamKillerX
|
6
|
+
# Channel : @RendyProjects
|
7
|
+
# This program is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Affero General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Affero General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Affero General Public License
|
18
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
from functools import wraps
|
21
|
+
|
22
|
+
from ..types import QueryParameter
|
23
|
+
|
24
|
+
|
25
|
+
class Decorators:
|
26
|
+
def __init__(self, class_func):
|
27
|
+
self._clients_ai = class_func(..., is_free_from_ryzenth=True)
|
28
|
+
|
29
|
+
def send_ai(self, name: str, only_author=False):
|
30
|
+
def decorator(func):
|
31
|
+
@wraps(func)
|
32
|
+
async def wrapper(client, message, *args, **kwargs):
|
33
|
+
if only_author and message.from_user.id != client.me.id:
|
34
|
+
return await message.reply_text(
|
35
|
+
"Only Developer can use this command.", **kwargs
|
36
|
+
)
|
37
|
+
query = message.text.split(maxsplit=1)[1] if len(message.text.split()) > 1 else ""
|
38
|
+
if not query:
|
39
|
+
return await message.reply_text(
|
40
|
+
"Please provide a query after the command.", **kwargs
|
41
|
+
)
|
42
|
+
result = await self._clients_ai.aio.send_message(
|
43
|
+
name, QueryParameter(query=query), dot_access=True
|
44
|
+
)
|
45
|
+
await message.reply_text(result.results, **kwargs)
|
46
|
+
return await func(client, message, query, *args, **kwargs)
|
47
|
+
return wrapper
|
48
|
+
return decorator
|
Ryzenth/helper/_federation.py
CHANGED
Ryzenth/helper/_fonts.py
CHANGED
@@ -17,13 +17,11 @@
|
|
17
17
|
# You should have received a copy of the GNU Affero General Public License
|
18
18
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
|
20
|
-
import json
|
21
20
|
import logging
|
22
|
-
from datetime import datetime as dt
|
23
21
|
|
24
22
|
import httpx
|
25
23
|
|
26
|
-
from
|
24
|
+
from .._errors import ParamsRequiredError, WhatFuckError
|
27
25
|
|
28
26
|
LOGS = logging.getLogger("[Ryzenth]")
|
29
27
|
|
Ryzenth/helper/_images.py
CHANGED
Ryzenth/helper/_moderator.py
CHANGED
@@ -17,13 +17,11 @@
|
|
17
17
|
# You should have received a copy of the GNU Affero General Public License
|
18
18
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
|
20
|
-
import json
|
21
20
|
import logging
|
22
|
-
from datetime import datetime as dt
|
23
21
|
|
24
22
|
import httpx
|
25
23
|
|
26
|
-
from
|
24
|
+
from .._errors import InvalidVersionError, WhatFuckError
|
27
25
|
|
28
26
|
LOGS = logging.getLogger("[Ryzenth]")
|
29
27
|
|
Ryzenth/helper/_openai.py
CHANGED
Ryzenth/helper/_thinking.py
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=tju93rICOKAx220Z2aSNLXt0HKVd5vRDfeVzrf49WuY,960
|
2
|
+
Ryzenth/__version__.py,sha256=GZ_mDGvbB3eoVmc5YXLSsgEoUlanzoUvVZoo3RpdJic,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=B44rz4JD4og3go1ZAcd4R8McxSt9vGo5zIpYtTRY3ms,4888
|
4
|
+
Ryzenth/_client.py,sha256=GLNDmDSq6ROiezaLdi-yo2tCWbgSxgpp1DXduxQHapA,1731
|
5
|
+
Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
|
6
|
+
Ryzenth/_synchisded.py,sha256=KFO3Smy3qKhOPW9cVQ6uutspDZjiZz79hiLaXFgGRfA,4702
|
7
|
+
Ryzenth/helper/__init__.py,sha256=cFM6wA0fkC-KHkaL4jUK6_3zsm_TKpmz3BaW4HJgFiI,1360
|
8
|
+
Ryzenth/helper/_decorators.py,sha256=W9Y4N_ehmMYStcJJVsQr60WQsqHzON3n5uNuTp9yvGM,2041
|
9
|
+
Ryzenth/helper/_federation.py,sha256=hQ4XIha9j-ohUGmIJyD8HKWMFudBFU0iRLA-12qt_G0,13940
|
10
|
+
Ryzenth/helper/_fonts.py,sha256=i-1OlJwv_bTZL7Wewodajgotij5awSE04CNJyY_SXEs,3027
|
11
|
+
Ryzenth/helper/_images.py,sha256=bsCLycdlheqEc7I5jm_MVzscrNMX1Q_zmFWm3rhchA8,2297
|
12
|
+
Ryzenth/helper/_moderator.py,sha256=p7e1pRUTP8ROmFnRyNWSD5q65CQUKiavgp7yXCstLhk,5197
|
13
|
+
Ryzenth/helper/_openai.py,sha256=-VMH15PJXuYEu0UbwvlIus6NOsB-KNWBTMQvBU16EDU,2562
|
14
|
+
Ryzenth/helper/_thinking.py,sha256=4V2hH0FwegAGhmlO0YlAeXDH3DS4Omihf6m03YJc-SE,2545
|
15
|
+
Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
|
16
|
+
ryzenth-1.9.5.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
17
|
+
ryzenth-1.9.5.dist-info/METADATA,sha256=mU4rv5N9kyLt0KbYr86Dxzu12SUNeUoExz9Czp9miVs,4120
|
18
|
+
ryzenth-1.9.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
ryzenth-1.9.5.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
20
|
+
ryzenth-1.9.5.dist-info/RECORD,,
|
ryzenth-1.9.3.dist-info/RECORD
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
|
2
|
-
Ryzenth/__version__.py,sha256=WmPiDTS5JLqfcJY6NvMrcsmPyhA36b-NHzmjbFumbdg,118
|
3
|
-
Ryzenth/_asynchisded.py,sha256=ZNLp1rOJ_4SYcyMeB02ybsSmU38GO0TpHsQHRiR2w6c,4909
|
4
|
-
Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
5
|
-
Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
|
6
|
-
Ryzenth/_synchisded.py,sha256=KFO3Smy3qKhOPW9cVQ6uutspDZjiZz79hiLaXFgGRfA,4702
|
7
|
-
Ryzenth/helper/__init__.py,sha256=ANx8vCXJ9ReLXIDWUwyhrIbw7jIyUXMdP11qotrWWIE,1308
|
8
|
-
Ryzenth/helper/_federation.py,sha256=VM1mkuPj4SvlO-VcazIV0T5Ga56RdcpDo7qybXwFCow,13946
|
9
|
-
Ryzenth/helper/_fonts.py,sha256=vQik0pGeKQGvUYhOfMO0W7MFM6Ig1oi-e_nBW_b6TuA,3081
|
10
|
-
Ryzenth/helper/_images.py,sha256=AfNQoxae-yI76PDUa-jx7tWBlJa4tRZQFDjeqBLKwVM,2309
|
11
|
-
Ryzenth/helper/_moderator.py,sha256=GTHTM8klfNrclhQM_gC0FHPLVmLj3n7NviOIX9Tr9bs,5270
|
12
|
-
Ryzenth/helper/_openai.py,sha256=hUhmwxuKV-AAeEbDFm4RnkasHNJjFROLdw1q2j2t_Mc,2574
|
13
|
-
Ryzenth/helper/_thinking.py,sha256=BKHvQe16KPOGh7_vev-_Ed8jl6_77_8Ys-g0SDtvlSU,2557
|
14
|
-
Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
|
15
|
-
ryzenth-1.9.3.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
16
|
-
ryzenth-1.9.3.dist-info/METADATA,sha256=CJKj1beAw8NlQ_3r0D_J8Ksqqy61Nn2h4f2T_9L9TpE,4120
|
17
|
-
ryzenth-1.9.3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
18
|
-
ryzenth-1.9.3.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
19
|
-
ryzenth-1.9.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|