cycls 0.0.2.84__tar.gz → 0.0.2.85__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycls
3
- Version: 0.0.2.84
3
+ Version: 0.0.2.85
4
4
  Summary: Distribute Intelligence
5
5
  Author: Mohammed J. AlRujayi
6
6
  Author-email: mj@cycls.com
@@ -45,7 +45,7 @@ The open-source SDK for distributing AI agents.
45
45
 
46
46
  The function is the unit of abstraction in cycls. Your agent logic lives in a plain Python function — the decorator layers on everything else: containerization, authentication, deployment, analytics. You write the function, the `@` handles the infrastructure.
47
47
 
48
- Cycls is beautifully lean (~862 lines!) and focused on deployment infrastructure for any Python function, not agent logic itself.
48
+ D
49
49
 
50
50
  ## Distribute Intelligence
51
51
 
@@ -24,7 +24,7 @@ The open-source SDK for distributing AI agents.
24
24
 
25
25
  The function is the unit of abstraction in cycls. Your agent logic lives in a plain Python function — the decorator layers on everything else: containerization, authentication, deployment, analytics. You write the function, the `@` handles the infrastructure.
26
26
 
27
- Cycls is beautifully lean (~862 lines!) and focused on deployment infrastructure for any Python function, not agent logic itself.
27
+ D
28
28
 
29
29
  ## Distribute Intelligence
30
30
 
@@ -39,7 +39,7 @@ class App(Function):
39
39
  super().__init__(
40
40
  func=func,
41
41
  name=name,
42
- pip=["fastapi[standard]", "pyjwt", "cryptography", "uvicorn", "docker", *(pip or [])],
42
+ pip=["fastapi[standard]", "pyjwt", "cryptography", "uvicorn", "python-dotenv", "docker", *(pip or [])],
43
43
  apt=apt,
44
44
  copy=files,
45
45
  base_url=_get_base_url(),
@@ -90,6 +90,12 @@ def web(func, config):
90
90
  messages: Any
91
91
  user: Optional[User] = None
92
92
 
93
+ @property
94
+ def last_message(self) -> str:
95
+ if self.messages:
96
+ return self.messages[-1].get("content", "")
97
+ return ""
98
+
93
99
  app = FastAPI()
94
100
  bearer_scheme = HTTPBearer()
95
101
 
@@ -134,6 +140,8 @@ def web(func, config):
134
140
 
135
141
  def serve(func, config, name, port):
136
142
  import uvicorn, logging
143
+ from dotenv import load_dotenv
144
+ load_dotenv()
137
145
  if isinstance(config, dict):
138
146
  config = Config(**config)
139
147
  logging.getLogger("uvicorn.error").addFilter(lambda r: "0.0.0.0" not in r.getMessage())
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cycls"
3
- version = "0.0.2.84"
3
+ version = "0.0.2.85"
4
4
 
5
5
  packages = [{ include = "cycls" }]
6
6
  include = ["cycls/themes/**/*"]
@@ -23,10 +23,6 @@ cycls = "cycls.cli:main"
23
23
  pytest = "^8.0.0"
24
24
  requests = "^2.31.0"
25
25
 
26
-
27
- [tool.poetry.group.dev.dependencies]
28
- grpcio-tools = "^1.76.0"
29
-
30
26
  [build-system]
31
27
  requires = ["poetry-core"]
32
28
  build-backend = "poetry.core.masonry.api"
File without changes
File without changes
File without changes
File without changes