cycls 0.0.2.46__tar.gz → 0.0.2.47__tar.gz
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.
- {cycls-0.0.2.46 → cycls-0.0.2.47}/PKG-INFO +2 -2
- {cycls-0.0.2.46 → cycls-0.0.2.47}/README.md +1 -1
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/sdk.py +9 -1
- {cycls-0.0.2.46 → cycls-0.0.2.47}/pyproject.toml +1 -1
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/__init__.py +0 -0
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/runtime.py +0 -0
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/theme/assets/index-CJ_4y8Hq.js +0 -0
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/theme/index.html +0 -0
- {cycls-0.0.2.46 → cycls-0.0.2.47}/cycls/web.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cycls
|
|
3
|
-
Version: 0.0.2.
|
|
3
|
+
Version: 0.0.2.47
|
|
4
4
|
Summary: Cycls SDK
|
|
5
5
|
Author: Mohammed J. AlRujayi
|
|
6
6
|
Author-email: mj@cycls.com
|
|
@@ -91,7 +91,7 @@ Run it from your terminal:
|
|
|
91
91
|
```bash
|
|
92
92
|
python main.py
|
|
93
93
|
```
|
|
94
|
-
This will start a local server. Open your browser to http://
|
|
94
|
+
This will start a local server. Open your browser to http://localhost:8080 to interact with your agent.
|
|
95
95
|
|
|
96
96
|
### 2. Cloud Deployment: An OpenAI-Powered Agent
|
|
97
97
|
This example creates a more advanced agent that calls the OpenAI API. It will be deployed to the cloud with authentication enabled.
|
|
@@ -69,7 +69,7 @@ Run it from your terminal:
|
|
|
69
69
|
```bash
|
|
70
70
|
python main.py
|
|
71
71
|
```
|
|
72
|
-
This will start a local server. Open your browser to http://
|
|
72
|
+
This will start a local server. Open your browser to http://localhost:8080 to interact with your agent.
|
|
73
73
|
|
|
74
74
|
### 2. Cloud Deployment: An OpenAI-Powered Agent
|
|
75
75
|
This example creates a more advanced agent that calls the OpenAI API. It will be deployed to the cloud with authentication enabled.
|
|
@@ -69,8 +69,16 @@ class Agent:
|
|
|
69
69
|
copy.update({i:i for i in self.copy})
|
|
70
70
|
copy.update({i:f"a/{i}" for i in self.copy_public})
|
|
71
71
|
|
|
72
|
+
def runner(port):
|
|
73
|
+
import uvicorn, logging
|
|
74
|
+
# This one-liner hides the confusing "0.0.0.0" message
|
|
75
|
+
logging.getLogger("uvicorn.error").addFilter(type("F",(),{"filter": lambda s,r: "0.0.0.0" not in r.getMessage()})())
|
|
76
|
+
print(f"\n🚀 Local Link: http://localhost:{port}\n")
|
|
77
|
+
uvicorn.run(__import__("web").web(i["func"], *i["config"]), host="0.0.0.0", port=port)
|
|
78
|
+
|
|
72
79
|
new = Runtime(
|
|
73
|
-
func=lambda port: __import__("uvicorn").run(__import__("web").web(i["func"], *i["config"]), host="0.0.0.0", port=port),
|
|
80
|
+
# func=lambda port: __import__("uvicorn").run(__import__("web").web(i["func"], *i["config"]), host="0.0.0.0", port=port),
|
|
81
|
+
func=runner,
|
|
74
82
|
name=i["name"],
|
|
75
83
|
apt_packages=self.apt,
|
|
76
84
|
pip_packages=["fastapi[standard]", "pyjwt", "cryptography", "uvicorn", *self.pip],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|