cycls 0.0.2.46__py3-none-any.whl → 0.0.2.47__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.
cycls/sdk.py CHANGED
@@ -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],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycls
3
- Version: 0.0.2.46
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://127.0.0.1:8000 to interact with your agent.
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.
@@ -1,9 +1,9 @@
1
1
  cycls/__init__.py,sha256=bVT0dYTXLdSC3ZURgtm-DEOj-VO6RUM6zGsJB0zuj6Y,61
2
2
  cycls/runtime.py,sha256=GoRfyPn2uKTIMb4FSowjfo02DsL0VrunDuybdeZxsvM,18221
3
- cycls/sdk.py,sha256=8cTMak_USaDlhRJOJhKTMSFAahtW1yb63TjU16m2rgM,5193
3
+ cycls/sdk.py,sha256=J_RCmDSJjZqdJOF-pea9nSrkTvtJOVSUBwKxLu27wd0,5645
4
4
  cycls/theme/assets/index-CJ_4y8Hq.js,sha256=5D1ALXOnkyWH3KkmJ4DeYLzlN4JONL1xg3cCgUVyvLA,1103624
5
5
  cycls/theme/index.html,sha256=GGoeZQYDvZpkqby9gxMK7XgCazsmJtJ5M4fDJE8IhwU,664
6
6
  cycls/web.py,sha256=qNVil7y9jx_o62YanTG3j9lqLHv8lXY_9oqeruEr2u8,4964
7
- cycls-0.0.2.46.dist-info/METADATA,sha256=Zs8gyr0R02_kqZYBAHfOLiImvzDIM0PJ3GCZh27tJdo,5673
8
- cycls-0.0.2.46.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
9
- cycls-0.0.2.46.dist-info/RECORD,,
7
+ cycls-0.0.2.47.dist-info/METADATA,sha256=6620b3_sevs0FCnEt3vGJ7LALlsh-7ZPUOz-8Uk3Wu4,5673
8
+ cycls-0.0.2.47.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
9
+ cycls-0.0.2.47.dist-info/RECORD,,