mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 01:08:39 -10:00
Setting gpt-4o-mini as the default model
This commit is contained in:
1 parent
d22a810d3c
commit
1ea77d30e3
11 files changed
+61
-28
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install flask praisonai==0.0.55 gunicorn markdown
|
||||
RUN pip install flask praisonai==0.0.56 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==0.0.55 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==0.0.56 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
+1
-1
@@ -25,4 +25,4 @@ export OPENAI_API_KEY=xxxxxxxx
|
||||
praisonai chat
|
||||
```
|
||||
|
||||
4. Set Model name to be gpt-3.5-turbo in the settings
|
||||
4. Set Model name to be gpt-4o-mini in the settings
|
||||
+43
-10
@@ -27,12 +27,12 @@ praisonai code
|
||||
|
||||
4. Username and Password will be asked for the first time. `admin` is the default username and password.
|
||||
|
||||
5. Set Model name to be gpt-3.5-turbo in the settings
|
||||
5. Set Model name to be gpt-4o-mini in the settings
|
||||
|
||||
|
||||
## Other Models
|
||||
|
||||
* Use 100+ LLMs
|
||||
* Use 100+ LLMs - [Litellm](https://litellm.vercel.app/docs/providers)
|
||||
* Includes Gemini 1.5 for 2 Million Context Length
|
||||
|
||||
## To Use Gemini 1.5
|
||||
@@ -43,9 +43,28 @@ praisonai code
|
||||
|
||||
## Ignore Files
|
||||
|
||||
### Using settings.yaml
|
||||
### Using .praisonignore
|
||||
|
||||
* Create a settings.yaml file in the root folder of the project
|
||||
* Create a `.praisonignore` file in the root folder of the project
|
||||
* Add files to ignore
|
||||
|
||||
```bash
|
||||
.*
|
||||
*.pyc
|
||||
pycache
|
||||
.git
|
||||
.gitignore
|
||||
.vscode
|
||||
.idea
|
||||
.DS_Store
|
||||
.lock
|
||||
.pyc
|
||||
.env
|
||||
```
|
||||
|
||||
### Using settings.yaml (.praisonignore is preferred)
|
||||
|
||||
* Create a `settings.yaml` file in the root folder of the project
|
||||
* Add below Variables and required Ignore Files
|
||||
|
||||
```yaml
|
||||
@@ -66,25 +85,39 @@ code:
|
||||
|
||||
### Using .env File
|
||||
|
||||
* Create a .env file in the root folder of the project
|
||||
* Create a `.env` file in the root folder of the project
|
||||
* Add below Variables and required Ignore Files
|
||||
|
||||
```bash
|
||||
PRAISONAI_IGNORE_FILES=".*,*.pyc,__pycache__,.git,.gitignore,.vscode,.idea,.DS_Store,*.lock,.env,docs,tests,test,tmp,temp,*.txt,*.md,*.json,*.csv,*.tsv,public,*.sql,*.sqlite,*.db,*.db3,*.sqlite3,*.log,*.zip,*.gz,*.tar,*.rar,*.7z,*.pdf,*.jpg,*.jpeg,*.png,*.gif,*.svg,cookbooks,assets,dist,build,node_modules,venv,crewAI,.cache,*.__pycache__,*chroma.sqlite3,test/,dist/,praisonAI.egg-info,test.yaml,db,praisonai_prompt.txt,watch.sh,docs.sh,other,output,*.chainlit,.files,site,flagged,*public,threads.db,trained_agents_data.pkl,.pytest_cache"
|
||||
PRAISONAI_IGNORE_FILES=".*,*.pyc,__pycache__,.git,.gitignore,.vscode"
|
||||
```
|
||||
|
||||
### Using Environment Variables in the Terminal
|
||||
|
||||
```bash
|
||||
export PRAISONAI_IGNORE_FILES=".*,*.pyc,__pycache__,.git,.gitignore,.vscode,.idea,.DS_Store,*.lock,.env,docs,tests,test,tmp,temp,*.txt,*.md,*.json,*.csv,*.tsv,public,*.sql,*.sqlite,*.db,*.db3,*.sqlite3,*.log,*.zip,*.gz,*.tar,*.rar,*.7z,*.pdf,*.jpg,*.jpeg,*.png,*.gif,*.svg,cookbooks,assets,dist,build,node_modules,venv,crewAI,.cache,*.__pycache__,*chroma.sqlite3,test/,dist/,praisonAI.egg-info,test.yaml,db,praisonai_prompt.txt,watch.sh,docs.sh,other,output,*.chainlit,.files,site,flagged,*public,threads.db,trained_agents_data.pkl,.pytest_cache"
|
||||
export PRAISONAI_IGNORE_FILES=".*,*.pyc,__pycache__,.git,.gitignore,.vscode"
|
||||
```
|
||||
|
||||
## Include Files
|
||||
|
||||
- Add files you wish to Include files in the context
|
||||
- This will automatically ignore all the ignore files option
|
||||
- This will include only the files/folders mentioned in `.praisoninclude` to the context
|
||||
|
||||
* Create a `.praisoninclude` file in the root folder of the project
|
||||
* Add files to Include
|
||||
|
||||
```bash
|
||||
projectfiles
|
||||
docs
|
||||
```
|
||||
|
||||
## Set Max Tokens
|
||||
|
||||
Note: By Default Max Tokens set is 128,000
|
||||
Note: By Default Max Tokens set is 900,000
|
||||
|
||||
```bash
|
||||
export PRAISONAI_MAX_TOKENS=200000
|
||||
export PRAISONAI_MAX_TOKENS=1000000
|
||||
```
|
||||
|
||||
or
|
||||
@@ -92,5 +125,5 @@ or
|
||||
* Create a .env file in the root folder of the project
|
||||
* Add below Variables and required Max Tokens
|
||||
* ```
|
||||
PRAISONAI_MAX_TOKENS=200000
|
||||
PRAISONAI_MAX_TOKENS=1000000
|
||||
```
|
||||
+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==0.0.55 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==0.0.56 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ load_dotenv()
|
||||
import autogen
|
||||
config_list = [
|
||||
{
|
||||
'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-3.5-turbo"),
|
||||
'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-4o-mini"),
|
||||
'base_url': os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1"),
|
||||
'api_key': os.environ.get("OPENAI_API_KEY")
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ async def start():
|
||||
cl.user_session.set("model_name", model_name)
|
||||
else:
|
||||
# If no setting found, use default or environment variable
|
||||
model_name = os.getenv("MODEL_NAME", "gpt-3.5-turbo")
|
||||
model_name = os.getenv("MODEL_NAME", "gpt-4o-mini")
|
||||
cl.user_session.set("model_name", model_name)
|
||||
logger.debug(f"Model name: {model_name}")
|
||||
settings = cl.ChatSettings(
|
||||
@@ -187,7 +187,7 @@ async def start():
|
||||
TextInput(
|
||||
id="model_name",
|
||||
label="Enter the Model Name",
|
||||
placeholder="e.g., gpt-3.5-turbo",
|
||||
placeholder="e.g., gpt-4o-mini",
|
||||
initial=model_name
|
||||
)
|
||||
]
|
||||
@@ -221,7 +221,7 @@ async def setup_agent(settings):
|
||||
|
||||
@cl.on_message
|
||||
async def main(message: cl.Message):
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-3.5-turbo"
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-4o-mini"
|
||||
message_history = cl.user_session.get("message_history", [])
|
||||
message_history.append({"role": "user", "content": message.content})
|
||||
|
||||
@@ -268,14 +268,14 @@ async def send_count():
|
||||
@cl.on_chat_resume
|
||||
async def on_chat_resume(thread: cl_data.ThreadDict):
|
||||
logger.info(f"Resuming chat: {thread['id']}")
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-3.5-turbo"
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-4o-mini"
|
||||
logger.debug(f"Model name: {model_name}")
|
||||
settings = cl.ChatSettings(
|
||||
[
|
||||
TextInput(
|
||||
id="model_name",
|
||||
label="Enter the Model Name",
|
||||
placeholder="e.g., gpt-3.5-turbo",
|
||||
placeholder="e.g., gpt-4o-mini",
|
||||
initial=model_name
|
||||
)
|
||||
]
|
||||
|
||||
@@ -180,7 +180,7 @@ async def start():
|
||||
cl.user_session.set("model_name", model_name)
|
||||
else:
|
||||
# If no setting found, use default or environment variable
|
||||
model_name = os.getenv("MODEL_NAME", "gpt-3.5-turbo")
|
||||
model_name = os.getenv("MODEL_NAME", "gpt-4o-mini")
|
||||
cl.user_session.set("model_name", model_name)
|
||||
logger.debug(f"Model name: {model_name}")
|
||||
settings = cl.ChatSettings(
|
||||
@@ -188,7 +188,7 @@ async def start():
|
||||
TextInput(
|
||||
id="model_name",
|
||||
label="Enter the Model Name",
|
||||
placeholder="e.g., gpt-3.5-turbo",
|
||||
placeholder="e.g., gpt-4o-mini",
|
||||
initial=model_name
|
||||
)
|
||||
]
|
||||
@@ -228,7 +228,7 @@ async def setup_agent(settings):
|
||||
|
||||
@cl.on_message
|
||||
async def main(message: cl.Message):
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-3.5-turbo"
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-4o-mini"
|
||||
message_history = cl.user_session.get("message_history", [])
|
||||
message_history.append({"role": "user", "content": message.content})
|
||||
gatherer = ContextGatherer()
|
||||
@@ -282,14 +282,14 @@ async def send_count():
|
||||
@cl.on_chat_resume
|
||||
async def on_chat_resume(thread: cl_data.ThreadDict):
|
||||
logger.info(f"Resuming chat: {thread['id']}")
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-3.5-turbo"
|
||||
model_name = load_setting("model_name") or os.getenv("MODEL_NAME") or "gpt-4o-mini"
|
||||
logger.debug(f"Model name: {model_name}")
|
||||
settings = cl.ChatSettings(
|
||||
[
|
||||
TextInput(
|
||||
id="model_name",
|
||||
label="Enter the Model Name",
|
||||
placeholder="e.g., gpt-3.5-turbo",
|
||||
placeholder="e.g., gpt-4o-mini",
|
||||
initial=model_name
|
||||
)
|
||||
]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "PraisonAI"
|
||||
version = "0.0.55"
|
||||
version = "0.0.56"
|
||||
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 = ""
|
||||
|
||||
@@ -21,7 +21,7 @@ assistant = ConversableAgent(
|
||||
system_message="You are a helpful AI assistant. "
|
||||
"You can help with simple calculations. "
|
||||
"Return 'TERMINATE' when the task is done.",
|
||||
llm_config={"config_list": [{"model": "gpt-3.5-turbo", "api_key": os.environ["OPENAI_API_KEY"]}]},
|
||||
llm_config={"config_list": [{"model": "gpt-4o-mini", "api_key": os.environ["OPENAI_API_KEY"]}]},
|
||||
)
|
||||
|
||||
user_proxy = ConversableAgent(
|
||||
|
||||
@@ -63,7 +63,7 @@ llm_config = {
|
||||
generate_llm_config(custom_tool),
|
||||
generate_llm_config(read_file_tool),
|
||||
],
|
||||
"config_list": [{"model": "gpt-3.5-turbo", "api_key": os.environ["OPENAI_API_KEY"]}],
|
||||
"config_list": [{"model": "gpt-4o-mini", "api_key": os.environ["OPENAI_API_KEY"]}],
|
||||
"timeout": 120,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user