mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 08:11:07 -10:00
Setting DB URL
This commit is contained in:
1 parent
f34cbbbf6f
commit
fb9a6ed748
8 files changed
+1116
-1179
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install flask praisonai==1.0.1 gunicorn markdown
|
||||
RUN pip install flask praisonai==1.0.2 gunicorn markdown
|
||||
EXPOSE 8080
|
||||
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]
|
||||
@@ -110,7 +110,7 @@ Loads environment variables from .env file or system and sets them.</p>
|
||||
file.write("FROM python:3.11-slim\n")
|
||||
file.write("WORKDIR /app\n")
|
||||
file.write("COPY . .\n")
|
||||
file.write("RUN pip install flask praisonai==1.0.1 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==1.0.2 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
Generated
+1089
-1167
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -3,7 +3,7 @@ class Praisonai < Formula
|
||||
|
||||
desc "AI tools for various AI applications"
|
||||
homepage "https://github.com/MervinPraison/PraisonAI"
|
||||
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/1.0.1.tar.gz"
|
||||
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/1.0.2.tar.gz"
|
||||
sha256 "1828fb9227d10f991522c3f24f061943a254b667196b40b1a3e4a54a8d30ce32" # Replace with actual SHA256 checksum
|
||||
license "MIT"
|
||||
|
||||
|
||||
+9
-4
@@ -26,7 +26,9 @@ CREWAI_AVAILABLE = False
|
||||
AUTOGEN_AVAILABLE = False
|
||||
|
||||
try:
|
||||
os.environ["CHAINLIT_APP_ROOT"] = os.path.join(os.path.expanduser("~"), ".praison")
|
||||
# Set CHAINLIT_APP_ROOT only if it doesn't exist
|
||||
if "CHAINLIT_APP_ROOT" not in os.environ:
|
||||
os.environ["CHAINLIT_APP_ROOT"] = os.path.join(os.path.expanduser("~"), ".praison")
|
||||
from chainlit.cli import chainlit_run
|
||||
CHAINLIT_AVAILABLE = True
|
||||
except ImportError:
|
||||
@@ -389,7 +391,8 @@ class PraisonAI:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8084"
|
||||
root_path = os.path.join(os.path.expanduser("~"), ".praison")
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
if "CHAINLIT_APP_ROOT" not in os.environ:
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
|
||||
if not os.path.exists(os.path.join(root_path, "public")):
|
||||
if os.path.exists(public_folder):
|
||||
@@ -412,7 +415,8 @@ class PraisonAI:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8086"
|
||||
root_path = os.path.join(os.path.expanduser("~"), ".praison")
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
if "CHAINLIT_APP_ROOT" not in os.environ:
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
public_folder = os.path.join(os.path.dirname(__file__), 'public')
|
||||
if not os.path.exists(os.path.join(root_path, "public")):
|
||||
if os.path.exists(public_folder):
|
||||
@@ -481,7 +485,8 @@ class PraisonAI:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8088"
|
||||
root_path = os.path.join(os.path.expanduser("~"), ".praison")
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
if "CHAINLIT_APP_ROOT" not in os.environ:
|
||||
os.environ["CHAINLIT_APP_ROOT"] = root_path
|
||||
public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
|
||||
if not os.path.exists(os.path.join(root_path, "public")):
|
||||
if os.path.exists(public_folder):
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class CloudDeployer:
|
||||
file.write("FROM python:3.11-slim\n")
|
||||
file.write("WORKDIR /app\n")
|
||||
file.write("COPY . .\n")
|
||||
file.write("RUN pip install flask praisonai==1.0.1 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==1.0.2 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
@@ -175,7 +175,12 @@ initialize_db()
|
||||
|
||||
deleted_thread_ids = [] # type: List[str]
|
||||
|
||||
cl_data._data_layer = SQLAlchemyDataLayer(conninfo=f"sqlite+aiosqlite:///{DB_PATH}")
|
||||
# Get database connection string from environment variable or use SQLite as default
|
||||
DB_URL = os.getenv("DATABASE_URL", f"sqlite+aiosqlite:///{DB_PATH}")
|
||||
cl_data._data_layer = SQLAlchemyDataLayer(
|
||||
conninfo=DB_URL,
|
||||
ssl_require=bool(os.getenv("DATABASE_SSL", False))
|
||||
)
|
||||
|
||||
# Set Tavily API key
|
||||
tavily_api_key = os.getenv("TAVILY_API_KEY")
|
||||
|
||||
+8
-3
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "PraisonAI"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
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."
|
||||
authors = ["Mervin Praison"]
|
||||
license = ""
|
||||
@@ -48,6 +48,7 @@ pyngrok = {version = ">=1.4.0", optional = true}
|
||||
sqlalchemy = {version = ">=2.0.36", optional = true}
|
||||
playwright = {version = ">=1.47.0", optional = true}
|
||||
openai = {version = ">=1.54.0", optional = true}
|
||||
pydantic = {version = "<=2.10.1", optional = true}
|
||||
|
||||
[tool.poetry.group.docs.dependencies]
|
||||
mkdocs = "*"
|
||||
@@ -125,7 +126,10 @@ chat = [
|
||||
"tavily-python",
|
||||
"crawl4ai",
|
||||
"sqlalchemy",
|
||||
"playwright"
|
||||
"playwright",
|
||||
"rich",
|
||||
"instructor",
|
||||
"pydantic"
|
||||
]
|
||||
code = [
|
||||
"chainlit",
|
||||
@@ -135,7 +139,8 @@ code = [
|
||||
"tavily-python",
|
||||
"crawl4ai",
|
||||
"sqlalchemy",
|
||||
"playwright"
|
||||
"playwright",
|
||||
"pydantic"
|
||||
]
|
||||
train = ["setup-conda-env"]
|
||||
realtime = [
|
||||
|
||||
Reference in new issue
Block a user