aisbf 0.2.0__py3-none-any.whl → 0.2.2__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.
- aisbf/__init__.py +1 -1
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf/__init__.py +1 -1
- {aisbf-0.2.0.dist-info → aisbf-0.2.2.dist-info}/METADATA +1 -1
- aisbf-0.2.2.dist-info/RECORD +24 -0
- {aisbf-0.2.0.dist-info → aisbf-0.2.2.dist-info}/entry_points.txt +1 -1
- {aisbf-0.2.0.dist-info → aisbf-0.2.2.dist-info}/top_level.txt +1 -0
- cli.py +67 -0
- aisbf-0.2.0.dist-info/RECORD +0 -23
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf/config.py +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf/handlers.py +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf/models.py +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf/providers.py +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/aisbf.sh +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/autoselect.json +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/autoselect.md +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/main.py +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/providers.json +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/requirements.txt +0 -0
- {aisbf-0.2.0.data → aisbf-0.2.2.data}/data/share/aisbf/rotations.json +0 -0
- {aisbf-0.2.0.dist-info → aisbf-0.2.2.dist-info}/WHEEL +0 -0
- {aisbf-0.2.0.dist-info → aisbf-0.2.2.dist-info}/licenses/LICENSE.txt +0 -0
aisbf/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aisbf
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations
|
|
5
5
|
Home-page: https://git.nexlab.net/nexlab/aisbf.git
|
|
6
6
|
Author: AISBF Contributors
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
cli.py,sha256=SpjVC1iBdDhQXuhJcjVFkODu4BH-nj_1hNFD_d8wPbw,2503
|
|
2
|
+
aisbf/__init__.py,sha256=D3-tZRWCu31CltN_pjx8IikwPl0OGEJkvoASm8QjvcQ,2156
|
|
3
|
+
aisbf/config.py,sha256=-pJa69vw_d_VuGPYGgKNm0hhMEgbVYSg2ZdWNl8LubY,6349
|
|
4
|
+
aisbf/handlers.py,sha256=exBfP1oLHYxNvq_xqVbWCl1NPxZgn-tlZL7j7acE558,15828
|
|
5
|
+
aisbf/models.py,sha256=LT1NaQVAw0VWXL-j3hdfNlXCA9HeiET_O3GDj3t9XC4,1883
|
|
6
|
+
aisbf/providers.py,sha256=jQGKYqrb-1RB3s4XrKK7AbX-7W5Cl3HG7Yc_riMkcyA,11942
|
|
7
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf.sh,sha256=ntI4UPefBtU2jrTwMR3hddHEPG_pDyJyO0J3SD7e5PA,4574
|
|
8
|
+
aisbf-0.2.2.data/data/share/aisbf/autoselect.json,sha256=Anud0hTE1mehonmMmhOTPK2ANUxfruE2yMdLqiEkEUA,659
|
|
9
|
+
aisbf-0.2.2.data/data/share/aisbf/autoselect.md,sha256=F8PilhaYBs0qdpIxIkokrjtIOdhAx5Bi1tA0hyfnqps,4301
|
|
10
|
+
aisbf-0.2.2.data/data/share/aisbf/main.py,sha256=ikv0-3KVHbawExNy6X4juE_pjZKaggkv-qAcUrqCw_s,7809
|
|
11
|
+
aisbf-0.2.2.data/data/share/aisbf/providers.json,sha256=9L5GO6sQ2Z6zndGed0AckvYNV1DMr9r7tSdZ9fJxYlA,3934
|
|
12
|
+
aisbf-0.2.2.data/data/share/aisbf/requirements.txt,sha256=lp6cPakAO3lpTCwQ27THf-PNz_HIpzCELrtpdgo6-2o,133
|
|
13
|
+
aisbf-0.2.2.data/data/share/aisbf/rotations.json,sha256=SzbmMeTRR0vVTrYTMwxSPxjXLVr8zxjaI4HYRxjyExQ,2123
|
|
14
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf/__init__.py,sha256=D3-tZRWCu31CltN_pjx8IikwPl0OGEJkvoASm8QjvcQ,2156
|
|
15
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf/config.py,sha256=-pJa69vw_d_VuGPYGgKNm0hhMEgbVYSg2ZdWNl8LubY,6349
|
|
16
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf/handlers.py,sha256=exBfP1oLHYxNvq_xqVbWCl1NPxZgn-tlZL7j7acE558,15828
|
|
17
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf/models.py,sha256=LT1NaQVAw0VWXL-j3hdfNlXCA9HeiET_O3GDj3t9XC4,1883
|
|
18
|
+
aisbf-0.2.2.data/data/share/aisbf/aisbf/providers.py,sha256=jQGKYqrb-1RB3s4XrKK7AbX-7W5Cl3HG7Yc_riMkcyA,11942
|
|
19
|
+
aisbf-0.2.2.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
20
|
+
aisbf-0.2.2.dist-info/METADATA,sha256=gi0VlbVGDAR2oAwVMmJaOU-8xIksAY3vKMI2i6UGXbE,4190
|
|
21
|
+
aisbf-0.2.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
22
|
+
aisbf-0.2.2.dist-info/entry_points.txt,sha256=dV_E5f6UvgSe9AoyPTzGxBK8IYaIeLR8yTe7EwBZ3F8,35
|
|
23
|
+
aisbf-0.2.2.dist-info/top_level.txt,sha256=odXp1LYymu31EdVSmMGCg3ZYAI5HeB8tZkaXh9Pw3kE,10
|
|
24
|
+
aisbf-0.2.2.dist-info/RECORD,,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
|
-
aisbf =
|
|
2
|
+
aisbf = cli:main
|
cli.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net>
|
|
3
|
+
|
|
4
|
+
AISBF - AI Service Broker Framework || AI Should Be Free
|
|
5
|
+
|
|
6
|
+
Python CLI wrapper that calls the aisbf.sh shell script.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
|
|
21
|
+
Why did the programmer quit his job? Because he didn't get arrays!
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
import os
|
|
25
|
+
import sys
|
|
26
|
+
import subprocess
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def main():
|
|
31
|
+
"""Main entry point for the aisbf CLI - calls the aisbf.sh shell script"""
|
|
32
|
+
|
|
33
|
+
# Determine the correct script path at runtime
|
|
34
|
+
# Check for system installation first (/usr/local/share/aisbf/aisbf.sh)
|
|
35
|
+
script_path = Path("/usr/local/share/aisbf/aisbf.sh")
|
|
36
|
+
if not script_path.exists():
|
|
37
|
+
# Fall back to user installation (~/.local/share/aisbf/aisbf.sh)
|
|
38
|
+
script_path = Path.home() / ".local" / "share" / "aisbf" / "aisbf.sh"
|
|
39
|
+
|
|
40
|
+
# Check if the script exists
|
|
41
|
+
if not script_path.exists():
|
|
42
|
+
print(f"Error: AISBF script not found at {script_path}", file=sys.stderr)
|
|
43
|
+
print("Please ensure AISBF is properly installed.", file=sys.stderr)
|
|
44
|
+
print(f"Expected locations:", file=sys.stderr)
|
|
45
|
+
print(f" - /usr/local/share/aisbf/aisbf.sh (system-wide)", file=sys.stderr)
|
|
46
|
+
print(f" - ~/.local/share/aisbf/aisbf.sh (user installation)", file=sys.stderr)
|
|
47
|
+
sys.exit(1)
|
|
48
|
+
|
|
49
|
+
# Execute the shell script with all arguments passed to this Python script
|
|
50
|
+
try:
|
|
51
|
+
# Use subprocess to run the shell script
|
|
52
|
+
result = subprocess.run(
|
|
53
|
+
[str(script_path)] + sys.argv[1:],
|
|
54
|
+
check=False
|
|
55
|
+
)
|
|
56
|
+
# Exit with the same exit code as the shell script
|
|
57
|
+
sys.exit(result.returncode)
|
|
58
|
+
except KeyboardInterrupt:
|
|
59
|
+
# Handle Ctrl-C gracefully
|
|
60
|
+
sys.exit(130) # Standard exit code for SIGINT (128 + 2)
|
|
61
|
+
except Exception as e:
|
|
62
|
+
print(f"Error executing AISBF script: {e}", file=sys.stderr)
|
|
63
|
+
sys.exit(1)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
main()
|
aisbf-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
aisbf/__init__.py,sha256=xzoKjaB3ujvO5qPq9HMFP7s64f6Xqm5brq1JgQJ_6zw,2156
|
|
2
|
-
aisbf/config.py,sha256=-pJa69vw_d_VuGPYGgKNm0hhMEgbVYSg2ZdWNl8LubY,6349
|
|
3
|
-
aisbf/handlers.py,sha256=exBfP1oLHYxNvq_xqVbWCl1NPxZgn-tlZL7j7acE558,15828
|
|
4
|
-
aisbf/models.py,sha256=LT1NaQVAw0VWXL-j3hdfNlXCA9HeiET_O3GDj3t9XC4,1883
|
|
5
|
-
aisbf/providers.py,sha256=jQGKYqrb-1RB3s4XrKK7AbX-7W5Cl3HG7Yc_riMkcyA,11942
|
|
6
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf.sh,sha256=ntI4UPefBtU2jrTwMR3hddHEPG_pDyJyO0J3SD7e5PA,4574
|
|
7
|
-
aisbf-0.2.0.data/data/share/aisbf/autoselect.json,sha256=Anud0hTE1mehonmMmhOTPK2ANUxfruE2yMdLqiEkEUA,659
|
|
8
|
-
aisbf-0.2.0.data/data/share/aisbf/autoselect.md,sha256=F8PilhaYBs0qdpIxIkokrjtIOdhAx5Bi1tA0hyfnqps,4301
|
|
9
|
-
aisbf-0.2.0.data/data/share/aisbf/main.py,sha256=ikv0-3KVHbawExNy6X4juE_pjZKaggkv-qAcUrqCw_s,7809
|
|
10
|
-
aisbf-0.2.0.data/data/share/aisbf/providers.json,sha256=9L5GO6sQ2Z6zndGed0AckvYNV1DMr9r7tSdZ9fJxYlA,3934
|
|
11
|
-
aisbf-0.2.0.data/data/share/aisbf/requirements.txt,sha256=lp6cPakAO3lpTCwQ27THf-PNz_HIpzCELrtpdgo6-2o,133
|
|
12
|
-
aisbf-0.2.0.data/data/share/aisbf/rotations.json,sha256=SzbmMeTRR0vVTrYTMwxSPxjXLVr8zxjaI4HYRxjyExQ,2123
|
|
13
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf/__init__.py,sha256=xzoKjaB3ujvO5qPq9HMFP7s64f6Xqm5brq1JgQJ_6zw,2156
|
|
14
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf/config.py,sha256=-pJa69vw_d_VuGPYGgKNm0hhMEgbVYSg2ZdWNl8LubY,6349
|
|
15
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf/handlers.py,sha256=exBfP1oLHYxNvq_xqVbWCl1NPxZgn-tlZL7j7acE558,15828
|
|
16
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf/models.py,sha256=LT1NaQVAw0VWXL-j3hdfNlXCA9HeiET_O3GDj3t9XC4,1883
|
|
17
|
-
aisbf-0.2.0.data/data/share/aisbf/aisbf/providers.py,sha256=jQGKYqrb-1RB3s4XrKK7AbX-7W5Cl3HG7Yc_riMkcyA,11942
|
|
18
|
-
aisbf-0.2.0.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
19
|
-
aisbf-0.2.0.dist-info/METADATA,sha256=jdi3vLj2TesFI1SprE2PuzEPczE9fLtm0Lt4zfLNwrA,4190
|
|
20
|
-
aisbf-0.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
-
aisbf-0.2.0.dist-info/entry_points.txt,sha256=zYLNG5rYg0OM6zVQuJnxt7yKd6bf2OM9jiHy1ydPudY,36
|
|
22
|
-
aisbf-0.2.0.dist-info/top_level.txt,sha256=D7THOopMCIUH203TRSRdc1e_MBOC4OLJTCrMGBcn4Gc,6
|
|
23
|
-
aisbf-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|