Ryzenth 1.9.1__py3-none-any.whl → 1.9.3__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/__version__.py +1 -1
- Ryzenth/helper/_fonts.py +1 -1
- Ryzenth/helper/_moderator.py +65 -14
- {ryzenth-1.9.1.dist-info → ryzenth-1.9.3.dist-info}/METADATA +1 -3
- {ryzenth-1.9.1.dist-info → ryzenth-1.9.3.dist-info}/RECORD +8 -8
- {ryzenth-1.9.1.dist-info → ryzenth-1.9.3.dist-info}/WHEEL +1 -1
- {ryzenth-1.9.1.dist-info → ryzenth-1.9.3.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.9.1.dist-info → ryzenth-1.9.3.dist-info}/top_level.txt +0 -0
Ryzenth/__version__.py
CHANGED
Ryzenth/helper/_fonts.py
CHANGED
Ryzenth/helper/_moderator.py
CHANGED
@@ -31,12 +31,41 @@ class ModeratorAsync:
|
|
31
31
|
def __init__(self, parent):
|
32
32
|
self.parent = parent
|
33
33
|
|
34
|
+
async def aigen_image_check(
|
35
|
+
self,
|
36
|
+
text: str,
|
37
|
+
version: str = "v2",
|
38
|
+
is_loads: bool = False,
|
39
|
+
dot_access: bool = False
|
40
|
+
):
|
41
|
+
version_params = {
|
42
|
+
"v1": "v1",
|
43
|
+
"v2": "v2"
|
44
|
+
}
|
45
|
+
_version = version_params.get(version)
|
46
|
+
if not _version:
|
47
|
+
raise InvalidVersionError("Invalid Version V1 or V2")
|
48
|
+
|
49
|
+
url = f"{self.parent.base_url}/v1/ai/akenox/aigen-{_version}"
|
50
|
+
async with httpx.AsyncClient() as client:
|
51
|
+
try:
|
52
|
+
response = await client.get(
|
53
|
+
url,
|
54
|
+
params={"query": text, "isJson": is_loads},
|
55
|
+
headers=self.parent.headers,
|
56
|
+
timeout=self.parent.timeout
|
57
|
+
)
|
58
|
+
response.raise_for_status()
|
59
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
60
|
+
except httpx.HTTPError as e:
|
61
|
+
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
62
|
+
raise WhatFuckError("[ASYNC] Error fetching") from e
|
63
|
+
|
34
64
|
async def antievalai(
|
35
65
|
self,
|
36
|
-
|
66
|
+
text: str,
|
37
67
|
version: str = "v2",
|
38
|
-
|
39
|
-
dot_access=False
|
68
|
+
dot_access: bool = False
|
40
69
|
):
|
41
70
|
version_params = {
|
42
71
|
"v1": "v1",
|
@@ -45,16 +74,13 @@ class ModeratorAsync:
|
|
45
74
|
_version = version_params.get(version)
|
46
75
|
if not _version:
|
47
76
|
raise InvalidVersionError("Invalid Version V1 or V2")
|
48
|
-
if not query.strip():
|
49
|
-
raise InvalidEmptyError("Cannot Empty")
|
50
77
|
|
51
78
|
url = f"{self.parent.base_url}/v1/ai/akenox/antievalai-{_version}"
|
52
|
-
_params = self.parent.params if use_parent_params_dict else {"query": query}
|
53
79
|
async with httpx.AsyncClient() as client:
|
54
80
|
try:
|
55
81
|
response = await client.get(
|
56
82
|
url,
|
57
|
-
params=
|
83
|
+
params={"query": text},
|
58
84
|
headers=self.parent.headers,
|
59
85
|
timeout=self.parent.timeout
|
60
86
|
)
|
@@ -68,12 +94,40 @@ class ModeratorSync:
|
|
68
94
|
def __init__(self, parent):
|
69
95
|
self.parent = parent
|
70
96
|
|
97
|
+
def aigen_image_check(
|
98
|
+
self,
|
99
|
+
text: str,
|
100
|
+
version: str = "v2",
|
101
|
+
is_loads: bool = False,
|
102
|
+
dot_access: bool = False
|
103
|
+
):
|
104
|
+
version_params = {
|
105
|
+
"v1": "v1",
|
106
|
+
"v2": "v2"
|
107
|
+
}
|
108
|
+
_version = version_params.get(version)
|
109
|
+
if not _version:
|
110
|
+
raise InvalidVersionError("Invalid Version V1 or V2")
|
111
|
+
|
112
|
+
url = f"{self.parent.base_url}/v1/ai/akenox/aigen-{_version}"
|
113
|
+
try:
|
114
|
+
response = httpx.get(
|
115
|
+
url,
|
116
|
+
params={"query": text, "isJson": is_loads},
|
117
|
+
headers=self.parent.headers,
|
118
|
+
timeout=self.parent.timeout
|
119
|
+
)
|
120
|
+
response.raise_for_status()
|
121
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
122
|
+
except httpx.HTTPError as e:
|
123
|
+
LOGS.error(f"[SYNC] Error fetching from aigen_image_check {e}")
|
124
|
+
raise WhatFuckError("[SYNC] Error fetching from aigen_image_check") from e
|
125
|
+
|
71
126
|
def antievalai(
|
72
127
|
self,
|
73
|
-
|
128
|
+
text: str,
|
74
129
|
version: str = "v2",
|
75
|
-
|
76
|
-
dot_access=False
|
130
|
+
dot_access: bool = False
|
77
131
|
):
|
78
132
|
version_params = {
|
79
133
|
"v1": "v1",
|
@@ -82,15 +136,12 @@ class ModeratorSync:
|
|
82
136
|
_version = version_params.get(version)
|
83
137
|
if not _version:
|
84
138
|
raise InvalidVersionError("Invalid Version V1 or V2")
|
85
|
-
if not query.strip():
|
86
|
-
raise InvalidEmptyError("Cannot Empty")
|
87
139
|
|
88
140
|
url = f"{self.parent.base_url}/v1/ai/akenox/antievalai-{_version}"
|
89
|
-
_params = self.parent.params if use_parent_params_dict else {"query": query}
|
90
141
|
try:
|
91
142
|
response = httpx.get(
|
92
143
|
url,
|
93
|
-
params=
|
144
|
+
params={"query": text},
|
94
145
|
headers=self.parent.headers,
|
95
146
|
timeout=self.parent.timeout
|
96
147
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Ryzenth
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.3
|
4
4
|
Summary: Ryzenth Python Wrapper For Perfomance
|
5
5
|
Author: TeamKillerX
|
6
6
|
License: MIT
|
@@ -27,7 +27,6 @@ Requires-Dist: typing
|
|
27
27
|
Requires-Dist: aiohttp
|
28
28
|
Requires-Dist: httpx[http2]
|
29
29
|
Requires-Dist: bs4
|
30
|
-
Requires-Dist: uvloop
|
31
30
|
Requires-Dist: python-box
|
32
31
|
Provides-Extra: fast
|
33
32
|
Requires-Dist: aiohttp; extra == "fast"
|
@@ -38,7 +37,6 @@ Requires-Dist: python-box; extra == "fast"
|
|
38
37
|
Requires-Dist: pydantic; extra == "fast"
|
39
38
|
Requires-Dist: bs4; extra == "fast"
|
40
39
|
Requires-Dist: typing; extra == "fast"
|
41
|
-
Requires-Dist: uvloop; extra == "fast"
|
42
40
|
Dynamic: author
|
43
41
|
Dynamic: classifier
|
44
42
|
Dynamic: description
|
@@ -1,19 +1,19 @@
|
|
1
1
|
Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
|
2
|
-
Ryzenth/__version__.py,sha256=
|
2
|
+
Ryzenth/__version__.py,sha256=WmPiDTS5JLqfcJY6NvMrcsmPyhA36b-NHzmjbFumbdg,118
|
3
3
|
Ryzenth/_asynchisded.py,sha256=ZNLp1rOJ_4SYcyMeB02ybsSmU38GO0TpHsQHRiR2w6c,4909
|
4
4
|
Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
5
5
|
Ryzenth/_errors.py,sha256=PYHmA3xZPZnH8T1Yo0Al6ln2FP8KC9Jk3eN631ve2S4,1236
|
6
6
|
Ryzenth/_synchisded.py,sha256=KFO3Smy3qKhOPW9cVQ6uutspDZjiZz79hiLaXFgGRfA,4702
|
7
7
|
Ryzenth/helper/__init__.py,sha256=ANx8vCXJ9ReLXIDWUwyhrIbw7jIyUXMdP11qotrWWIE,1308
|
8
8
|
Ryzenth/helper/_federation.py,sha256=VM1mkuPj4SvlO-VcazIV0T5Ga56RdcpDo7qybXwFCow,13946
|
9
|
-
Ryzenth/helper/_fonts.py,sha256=
|
9
|
+
Ryzenth/helper/_fonts.py,sha256=vQik0pGeKQGvUYhOfMO0W7MFM6Ig1oi-e_nBW_b6TuA,3081
|
10
10
|
Ryzenth/helper/_images.py,sha256=AfNQoxae-yI76PDUa-jx7tWBlJa4tRZQFDjeqBLKwVM,2309
|
11
|
-
Ryzenth/helper/_moderator.py,sha256=
|
11
|
+
Ryzenth/helper/_moderator.py,sha256=GTHTM8klfNrclhQM_gC0FHPLVmLj3n7NviOIX9Tr9bs,5270
|
12
12
|
Ryzenth/helper/_openai.py,sha256=hUhmwxuKV-AAeEbDFm4RnkasHNJjFROLdw1q2j2t_Mc,2574
|
13
13
|
Ryzenth/helper/_thinking.py,sha256=BKHvQe16KPOGh7_vev-_Ed8jl6_77_8Ys-g0SDtvlSU,2557
|
14
14
|
Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
|
15
|
-
ryzenth-1.9.
|
16
|
-
ryzenth-1.9.
|
17
|
-
ryzenth-1.9.
|
18
|
-
ryzenth-1.9.
|
19
|
-
ryzenth-1.9.
|
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
|