mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 08:11:07 -10:00
Set Max Tokens Env Variable
This commit is contained in:
1 parent
4ac449bb4b
commit
8985715b55
6 files changed
+20
-6
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.49 gunicorn markdown
|
||||
RUN pip install flask praisonai==0.0.50 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.49 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==0.0.50 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
@@ -67,3 +67,17 @@ code:
|
||||
```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"
|
||||
```
|
||||
|
||||
## Set Max Tokens
|
||||
|
||||
```bash
|
||||
export PRAISONAI_MAX_TOKENS=200000
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
* Create a .env file in the root folder of the project
|
||||
* Add below Variables and required Max Tokens
|
||||
* ```
|
||||
PRAISONAI_MAX_TOKENS=200000
|
||||
```
|
||||
+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.49 gunicorn markdown\n")
|
||||
file.write("RUN pip install flask praisonai==0.0.50 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ logger.setLevel(log_level)
|
||||
|
||||
class ContextGatherer:
|
||||
def __init__(self, directory='.', output_file='context.txt',
|
||||
relevant_extensions=None, max_file_size=1_000_000, max_tokens=60000):
|
||||
relevant_extensions=None, max_file_size=1_000_000, max_tokens=128000):
|
||||
self.directory = directory
|
||||
self.output_file = output_file
|
||||
self.relevant_extensions = relevant_extensions or ['.py']
|
||||
self.max_file_size = max_file_size
|
||||
self.max_tokens = max_tokens
|
||||
self.max_tokens = int(os.getenv("PRAISONAI_MAX_TOKENS", max_tokens))
|
||||
self.ignore_patterns = self.get_ignore_patterns()
|
||||
|
||||
def get_ignore_patterns(self):
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "PraisonAI"
|
||||
version = "0.0.49"
|
||||
version = "0.0.50"
|
||||
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 = ""
|
||||
|
||||
Reference in new issue
Block a user