Skip to content

Commit 1c668a7

Browse files
Merge pull request #47 from MervinPraison/develop
v0.0.25
2 parents 5089207 + c45429c commit 1c668a7

File tree

10 files changed

+147
-979
lines changed

10 files changed

+147
-979
lines changed

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
OPENAI_MODEL_NAME="gpt-4o"
22
OPENAI_API_KEY="Enter your API key"
3-
OPENAI_API_BASE="https://api.openai.com/v1"
3+
OPENAI_API_BASE="https://api.openai.com/v1"
4+
CHAINLIT_USERNAME=admin
5+
CHAINLIT_USERNAME=admin
6+
CHAINLIT_AUTH_SECRET="chainlit create-secret to create"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.11-slim
22
WORKDIR /app
33
COPY . .
4-
RUN pip install flask praisonai==0.0.24 gunicorn markdown
4+
RUN pip install flask praisonai==0.0.25 gunicorn markdown
55
EXPOSE 8080
66
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'PraisonAI'
1010
copyright = '2024, Mervin Praison'
1111
author = 'Mervin Praison'
12-
release = '0.0.24'
12+
release = '0.0.25'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/ui.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# PraisonAI User Interface (UI)
2+
3+
## Chainlit
4+
```bash
5+
pip install chainlit
6+
export OPENAI_API_KEY="Enter your API key"
7+
chainlit create-secret
8+
export CHAINLIT_AUTH_SECRET=xxxxxxxx
9+
praisonai --ui chainlit
10+
```
11+
12+
Default Username: admin
13+
Default Password: admin
14+
15+
### To Change Username and Password
16+
17+
create .env file in the root folder of the project
18+
Add below Variables and required Username/Password
19+
```
20+
CHAINLIT_USERNAME=admin
21+
CHAINLIT_USERNAME=admin
22+
```
23+
24+
## Gradio
25+
```bash
26+
pip install gradio
27+
export OPENAI_API_KEY="Enter your API key"
28+
praisonai --ui gradio
29+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ nav:
1313
- Installation: installation.md
1414
- Initialise: initialise.md
1515
- Run: run.md
16+
- User Interface: ui.md
1617
- Create Custom Tools: create_custom_tools.md
1718
- Test: test.md
1819
- Agents Playbook: agents_playbook.md

poetry.lock

Lines changed: 102 additions & 966 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

praisonai/agents_generator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from crewai.telemetry import Telemetry
1010
load_dotenv()
1111
import autogen
12-
import gradio as gr
1312
import argparse
1413
from .auto import AutoGenerator
1514
from crewai_tools import (

praisonai/cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from crewai import Agent, Task, Crew
99
load_dotenv()
1010
import autogen
11-
import gradio as gr
1211
import argparse
1312
from .auto import AutoGenerator
1413
from .agents_generator import AgentsGenerator
@@ -211,7 +210,7 @@ def generate_crew_and_kickoff_interface(auto_args, framework):
211210
theme="default"
212211
).launch()
213212
else:
214-
print("ERROR: Gradio is not installed. Please install it with 'pip install \"praisonai[gradio]\"' to use this feature.")
213+
print("ERROR: Gradio is not installed. Please install it with 'pip install gradio' to use this feature.")
215214

216215
def create_chainlit_interface(self):
217216
"""
@@ -226,9 +225,11 @@ def create_chainlit_interface(self):
226225
"""
227226
if CHAINLIT_AVAILABLE:
228227
os.environ["CHAINLIT_PORT"] = "8082"
229-
chainlit_run(["praisonai/chainlit_ui.py"])
228+
import praisonai
229+
chainlit_ui_path = os.path.join(os.path.dirname(praisonai.__file__), 'chainlit_ui.py')
230+
chainlit_run([chainlit_ui_path])
230231
else:
231-
print("ERROR: Chainlit is not installed. Please install it with 'pip install \"praisonai\[ui]\"' to use the UI.")
232+
print("ERROR: Chainlit is not installed. Please install it with 'pip install chainlit' to use the UI.")
232233

233234
if __name__ == "__main__":
234235
praison_ai = PraisonAI()

praisonai/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_dockerfile(self):
5656
file.write("FROM python:3.11-slim\n")
5757
file.write("WORKDIR /app\n")
5858
file.write("COPY . .\n")
59-
file.write("RUN pip install flask praisonai==0.0.24 gunicorn markdown\n")
59+
file.write("RUN pip install flask praisonai==0.0.25 gunicorn markdown\n")
6060
file.write("EXPOSE 8080\n")
6161
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6262

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "PraisonAI"
3-
version = "0.0.24"
3+
version = "0.0.25"
44
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."
55
authors = ["Mervin Praison"]
66
license = ""
@@ -35,6 +35,5 @@ build-backend = "poetry.core.masonry.api"
3535
praisonai = "praisonai.__main__:main"
3636

3737
[tool.poetry.extras]
38-
ui = ["chainlit>=1.1.301"]
39-
chainlit = ["chainlit>=1.1.301"]
40-
gradio = ["gradio>=4.26.0"]
38+
ui = ["chainlit"]
39+
gradio = ["gradio"]

0 commit comments

Comments
 (0)