Ryzenth 1.8.7__py3-none-any.whl → 1.8.8__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/_asynchisded.py +2 -0
- Ryzenth/_synchisded.py +2 -0
- Ryzenth/helper/__init__.py +25 -0
- Ryzenth/helper/_openai.py +60 -0
- Ryzenth/types/__init__.py +5 -0
- {ryzenth-1.8.7.dist-info → ryzenth-1.8.8.dist-info}/METADATA +1 -1
- ryzenth-1.8.8.dist-info/RECORD +13 -0
- ryzenth-1.8.7.dist-info/RECORD +0 -11
- {ryzenth-1.8.7.dist-info → ryzenth-1.8.8.dist-info}/WHEEL +0 -0
- {ryzenth-1.8.7.dist-info → ryzenth-1.8.8.dist-info}/licenses/LICENSE +0 -0
- {ryzenth-1.8.7.dist-info → ryzenth-1.8.8.dist-info}/top_level.txt +0 -0
Ryzenth/__version__.py
CHANGED
Ryzenth/_asynchisded.py
CHANGED
@@ -22,6 +22,7 @@ import logging
|
|
22
22
|
import httpx
|
23
23
|
from box import Box
|
24
24
|
|
25
|
+
from Ryzenth.helper import WhisperAsync
|
25
26
|
from Ryzenth.types import DownloaderBy, QueryParameter
|
26
27
|
|
27
28
|
LOGS = logging.getLogger("[Ryzenth] async")
|
@@ -33,6 +34,7 @@ class RyzenthXAsync:
|
|
33
34
|
self.headers = {"x-api-key": self.api_key}
|
34
35
|
self.images = self.ImagesAsync(self)
|
35
36
|
self.what = self.WhatAsync(self)
|
37
|
+
self.openai_audio = WhisperAsync(self)
|
36
38
|
self.obj = Box
|
37
39
|
|
38
40
|
class WhatAsync:
|
Ryzenth/_synchisded.py
CHANGED
@@ -22,6 +22,7 @@ import logging
|
|
22
22
|
import httpx
|
23
23
|
from box import Box
|
24
24
|
|
25
|
+
from Ryzenth.helper import WhisperSync
|
25
26
|
from Ryzenth.types import DownloaderBy, QueryParameter
|
26
27
|
|
27
28
|
LOGS = logging.getLogger("[Ryzenth] sync")
|
@@ -33,6 +34,7 @@ class RyzenthXSync:
|
|
33
34
|
self.headers = {"x-api-key": self.api_key}
|
34
35
|
self.images = self.ImagesSync(self)
|
35
36
|
self.what = self.WhatSync(self)
|
37
|
+
self.openai_audio = WhisperSync(self)
|
36
38
|
self.obj = Box
|
37
39
|
|
38
40
|
class WhatSync:
|
@@ -0,0 +1,25 @@
|
|
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 ._openai import WhisperAsync, WhisperSync
|
21
|
+
|
22
|
+
__all__ = [
|
23
|
+
"WhisperAsync",
|
24
|
+
"WhisperSync"
|
25
|
+
]
|
@@ -0,0 +1,60 @@
|
|
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
|
+
import logging
|
21
|
+
|
22
|
+
import httpx
|
23
|
+
|
24
|
+
from Ryzenth.types import OpenaiWhisper
|
25
|
+
|
26
|
+
LOGS = logging.getLogger("[Ryzenth]")
|
27
|
+
|
28
|
+
class WhisperAsync:
|
29
|
+
def __init__(self, parent):
|
30
|
+
self.parent = parent
|
31
|
+
|
32
|
+
async def whisper_from(self, params: OpenaiWhisper, dot_access=False):
|
33
|
+
url = f"{self.parent.base_url}/v1/ai/openai/whisper-large-v3-turbo"
|
34
|
+
async with httpx.AsyncClient() as client:
|
35
|
+
try:
|
36
|
+
response = await client.get(url, params=params.dict(), headers=self.parent.headers, timeout=30)
|
37
|
+
response.raise_for_status()
|
38
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
39
|
+
except httpx.HTTPError as e:
|
40
|
+
LOGS.error(f"[ASYNC] Error: {str(e)}")
|
41
|
+
return None
|
42
|
+
|
43
|
+
class WhisperSync:
|
44
|
+
def __init__(self, parent):
|
45
|
+
self.parent = parent
|
46
|
+
|
47
|
+
def whisper_from(self, params: OpenaiWhisper, dot_access=False):
|
48
|
+
url = f"{self.parent.base_url}/v1/ai/openai/whisper-large-v3-turbo"
|
49
|
+
try:
|
50
|
+
response = httpx.get(
|
51
|
+
url,
|
52
|
+
params=params.dict(),
|
53
|
+
headers=self.parent.headers,
|
54
|
+
timeout=30
|
55
|
+
)
|
56
|
+
response.raise_for_status()
|
57
|
+
return self.parent.obj(response.json() or {}) if dot_access else response.json()
|
58
|
+
except httpx.HTTPError as e:
|
59
|
+
LOGS.error(f"[SYNC] Error fetching from whisper openai {e}")
|
60
|
+
return None
|
Ryzenth/types/__init__.py
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
|
2
|
+
Ryzenth/__version__.py,sha256=WMw0ZhFbEu7caaKIRyF0MQHhrdWDRzwYZgq3FyCRvTw,118
|
3
|
+
Ryzenth/_asynchisded.py,sha256=zt7bV3aieGreQULEwLmuwUt6amYrqht1BRB1dWBPEyA,5891
|
4
|
+
Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
5
|
+
Ryzenth/_synchisded.py,sha256=hTRlIsTXltDurPUbhx4a4o6VPOrX2bf-gLMIQYWFhlU,5729
|
6
|
+
Ryzenth/helper/__init__.py,sha256=7EyYKljsMHWs7mkj7_zhPuOxo3evXS513tLbW2oezkI,918
|
7
|
+
Ryzenth/helper/_openai.py,sha256=p79Ed_IMHeW69KCVxOiEB80h9fBzNLXXEeghkrphL8w,2299
|
8
|
+
Ryzenth/types/__init__.py,sha256=3eEOjoRcEPoE5J5oIhXEPH6vbYG7TLasTHFcbWGS-mU,1095
|
9
|
+
ryzenth-1.8.8.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
10
|
+
ryzenth-1.8.8.dist-info/METADATA,sha256=OsHC_PluVNRpNgngga__8XtAvnafun9wNs4EuZQCrJQ,4181
|
11
|
+
ryzenth-1.8.8.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
12
|
+
ryzenth-1.8.8.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
13
|
+
ryzenth-1.8.8.dist-info/RECORD,,
|
ryzenth-1.8.7.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Ryzenth/__init__.py,sha256=CKayGQJ_ZUZF6OHyL9kCdTah05BUikXKWKXL_raAgo8,937
|
2
|
-
Ryzenth/__version__.py,sha256=y3oVj4a94Xad01PaVSmZEY3iYLp5cn_eJ2km-fRTEbA,118
|
3
|
-
Ryzenth/_asynchisded.py,sha256=ySUWEsx4V2lT93OiiPy7RvWHqVuYtm3ySno6ddJYFAM,5804
|
4
|
-
Ryzenth/_client.py,sha256=Y-I1ug8Hf2eF74oDY4eICOTP_nuLXdsDSkyZhpdqZy4,1475
|
5
|
-
Ryzenth/_synchisded.py,sha256=Et4yIWvsg8UH3_bXBNevnEQzYNkz6F8mj_0W-dQEFI0,5644
|
6
|
-
Ryzenth/types/__init__.py,sha256=imnQqDE2egYlFm2_4DRjleLLkFTRthcdZChRBVJvjoc,983
|
7
|
-
ryzenth-1.8.7.dist-info/licenses/LICENSE,sha256=C73aiGSgoCAVNzvAHs-TROaf5vV8yCj9nqpGrmfNHHo,1068
|
8
|
-
ryzenth-1.8.7.dist-info/METADATA,sha256=fwGlfxqmVbex7WWCWaI9NbWU0PMEk0J-OFeO6tyN7i4,4181
|
9
|
-
ryzenth-1.8.7.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
10
|
-
ryzenth-1.8.7.dist-info/top_level.txt,sha256=0vIhjOjoQuCxLeZO0of8VCx2jsri-bLHV28nh8wWDnc,8
|
11
|
-
ryzenth-1.8.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|