PraisonAI 0.0.16__tar.gz → 0.0.17__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.1
2
2
  Name: praisonAI
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: praisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration.
5
5
  Author: Mervin Praison
6
6
  Requires-Python: >=3.10,<3.13
@@ -8,6 +8,32 @@ class CloudDeployer:
8
8
  load_dotenv()
9
9
  self.set_environment_variables()
10
10
 
11
+ def create_dockerfile(self):
12
+ with open("Dockerfile", "w") as file:
13
+ file.write("FROM python:3.11-slim\n")
14
+ file.write("WORKDIR /app\n")
15
+ file.write("COPY . .\n")
16
+ file.write("RUN pip install flask praisonai==0.0.17 gunicorn markdown\n")
17
+ file.write("EXPOSE 8080\n")
18
+ file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
19
+
20
+ def create_api_file(self):
21
+ with open("api.py", "w") as file:
22
+ file.write("from flask import Flask\n")
23
+ file.write("from praisonai import PraisonAI\n")
24
+ file.write("import markdown\n\n")
25
+ file.write("app = Flask(__name__)\n\n")
26
+ file.write("def basic():\n")
27
+ file.write(" praison_ai = PraisonAI(agent_file=\"agents.yaml\")\n")
28
+ file.write(" return praison_ai.main()\n\n")
29
+ file.write("@app.route('/')\n")
30
+ file.write("def home():\n")
31
+ file.write(" output = basic()\n")
32
+ file.write(" html_output = markdown.markdown(output)\n")
33
+ file.write(" return f'<html><body>{html_output}</body></html>'\n\n")
34
+ file.write("if __name__ == \"__main__\":\n")
35
+ file.write(" app.run(debug=True)\n")
36
+
11
37
  def set_environment_variables(self):
12
38
  """Sets environment variables with fallback to .env values or defaults."""
13
39
  os.environ["OPENAI_MODEL_NAME"] = os.getenv("OPENAI_MODEL_NAME", "gpt-4-turbo-preview")
@@ -15,6 +41,8 @@ class CloudDeployer:
15
41
  os.environ["OPENAI_API_BASE"] = os.getenv("OPENAI_API_BASE", "https://api.openai.com/v1")
16
42
 
17
43
  def run_commands(self):
44
+ self.create_api_file()
45
+ self.create_dockerfile()
18
46
  """Runs a sequence of shell commands for deployment, continues on error."""
19
47
  commands = [
20
48
  "yes | gcloud auth configure-docker us-central1-docker.pkg.dev",
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "praisonAI"
3
- version = "0.0.16"
3
+ version = "0.0.17"
4
4
  description = "praisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration."
5
5
  authors = ["Mervin Praison"]
6
6
  license = ""
File without changes
File without changes
File without changes
File without changes