cycls 0.0.2.49__tar.gz → 0.0.2.51__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.49
3
+ Version: 0.0.2.51
4
4
  Summary: Cycls SDK
5
5
  Author: Mohammed J. AlRujayi
6
6
  Author-email: mj@cycls.com
@@ -91,20 +91,19 @@ This will start a local server. Open your browser to http://localhost:8080 to in
91
91
  This example creates a more advanced agent that calls the OpenAI API. It will be deployed to the cloud with authentication enabled.
92
92
 
93
93
  ```py
94
- # deploy.py
95
94
  import cycls
96
95
 
97
96
  # Initialize the agent with dependencies and API keys
98
97
  agent = cycls.Agent(
99
98
  pip=["openai"],
100
- key=["YOUR_CYCLS_KEY"] # Get yours from cycls.com
99
+ key="YOUR_CYCLS_KEY" # Get yours from https://cycls.com
101
100
  )
102
101
 
103
102
  # A helper function to call the LLM
104
103
  async def llm(messages):
105
104
  # Import inside the function: 'openai' is needed at runtime in the container.
106
105
  import openai
107
- client = openai.AsyncOpenAI(api_key="sk-...") # Your OpenAI key
106
+ client = openai.AsyncOpenAI(api_key="YOUR_OPENAI_API_KEY")
108
107
  model = "gpt-4o"
109
108
  response = await client.chat.completions.create(
110
109
  model=model,
@@ -69,20 +69,19 @@ This will start a local server. Open your browser to http://localhost:8080 to in
69
69
  This example creates a more advanced agent that calls the OpenAI API. It will be deployed to the cloud with authentication enabled.
70
70
 
71
71
  ```py
72
- # deploy.py
73
72
  import cycls
74
73
 
75
74
  # Initialize the agent with dependencies and API keys
76
75
  agent = cycls.Agent(
77
76
  pip=["openai"],
78
- key=["YOUR_CYCLS_KEY"] # Get yours from cycls.com
77
+ key="YOUR_CYCLS_KEY" # Get yours from https://cycls.com
79
78
  )
80
79
 
81
80
  # A helper function to call the LLM
82
81
  async def llm(messages):
83
82
  # Import inside the function: 'openai' is needed at runtime in the container.
84
83
  import openai
85
- client = openai.AsyncOpenAI(api_key="sk-...") # Your OpenAI key
84
+ client = openai.AsyncOpenAI(api_key="YOUR_OPENAI_API_KEY")
86
85
  model = "gpt-4o"
87
86
  response = await client.chat.completions.create(
88
87
  model=model,
@@ -386,7 +386,7 @@ COPY {self.payload_file} {self.io_dir}/
386
386
  data=data_payload,
387
387
  files=files,
388
388
  headers=headers,
389
- timeout=1800 # Set a long timeout for the entire process
389
+ timeout=5*1800 # Set a long timeout for the entire process
390
390
  )
391
391
 
392
392
  # 4. Handle the server's response
@@ -72,7 +72,7 @@ class Agent:
72
72
  import uvicorn, logging
73
73
  # This one-liner hides the confusing "0.0.0.0" message
74
74
  logging.getLogger("uvicorn.error").addFilter(type("F",(),{"filter": lambda s,r: "0.0.0.0" not in r.getMessage()})())
75
- print(f"\n🔨 Visit {i["name"]} => http://localhost:{port}\n")
75
+ print(f"\n🔨 Visit {i['name']} => http://localhost:{port}\n")
76
76
  uvicorn.run(__import__("web").web(i["func"], *i["config"]), host="0.0.0.0", port=port)
77
77
 
78
78
  new = Runtime(
@@ -128,5 +128,5 @@ class Agent:
128
128
 
129
129
  # docker system prune -af
130
130
  # poetry config pypi-token.pypi <your-token>
131
- # poetry run python agent-deploy.py
131
+ # poetry run python cake.py
132
132
  # poetry publish --build
@@ -0,0 +1 @@
1
+ .cl-internal-p8bmz4{box-shadow:none!important;border:1px solid rgba(0,0,0,.1);box-shadow:0 1px 2px #0000000d}