cycls 0.0.2.42__tar.gz → 0.0.2.44__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.42
3
+ Version: 0.0.2.44
4
4
  Summary: Cycls SDK
5
5
  Author: Mohammed J. AlRujayi
6
6
  Author-email: mj@cycls.com
@@ -18,19 +18,19 @@ def function(python_version=None, pip=None, apt=None, run_commands=None, copy=No
18
18
  return decorator
19
19
 
20
20
  class Agent:
21
- def __init__(self, theme=theme_path, org=None, api_token=None, pip=[], apt=[], copy=[], keys=["",""], api_key=None):
21
+ def __init__(self, theme=theme_path, org=None, api_token=None, pip=[], apt=[], copy=[], copy_public=[], keys=["",""], api_key=None):
22
22
  self.org, self.api_token = org, api_token
23
23
  self.theme = theme
24
- self.keys, self.pip, self.apt, self.copy = keys, pip, apt, copy
24
+ self.keys, self.pip, self.apt, self.copy, self.copy_public = keys, pip, apt, copy, copy_public
25
25
  self.api_key = api_key
26
26
 
27
27
  self.registered_functions = []
28
28
 
29
- def __call__(self, name=None, header="", intro="", domain=None, auth=False):
29
+ def __call__(self, name=None, header="", intro="", title="", domain=None, auth=False):
30
30
  def decorator(f):
31
31
  self.registered_functions.append({
32
32
  "func": f,
33
- "config": ["public", False, self.org, self.api_token, header, intro, auth],
33
+ "config": ["public", False, self.org, self.api_token, header, intro, title, auth],
34
34
  # "name": name,
35
35
  "name": name or (f.__name__).replace('_', '-'),
36
36
  "domain": domain or f"{name}.cycls.ai",
@@ -47,7 +47,6 @@ class Agent:
47
47
  if len(self.registered_functions) > 1:
48
48
  print(f"⚠️ Warning: Multiple agents found. Running '{i['name']}'.")
49
49
  print(f"🚀 Starting local server at localhost:{port}")
50
- # i["config"][0], i["config"][6] = self.theme, False
51
50
  i["config"][0] = self.theme
52
51
  uvicorn.run(web(i["func"], *i["config"]), host="0.0.0.0", port=port)
53
52
  return
@@ -64,10 +63,11 @@ class Agent:
64
63
  if len(self.registered_functions) > 1:
65
64
  print(f"⚠️ Warning: Multiple agents found. Running '{i['name']}'.")
66
65
 
67
- # i["config"][6] = False
66
+ i["config"][1] = False
68
67
 
69
68
  copy={str(self.theme):"public", str(cycls_path)+"/web.py":"web.py"}
70
69
  copy.update({i:i for i in self.copy})
70
+ copy.update({i:f"a/{i}" for i in self.copy_public})
71
71
 
72
72
  new = Runtime(
73
73
  func=lambda port: __import__("uvicorn").run(__import__("web").web(i["func"], *i["config"]), host="0.0.0.0", port=port),