Léo Bourrel commited on
Commit
aec85ee
·
1 Parent(s): b9e3c29

feat: add token limit with tiktoken

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. requirements.txt +5 -4
app.py CHANGED
@@ -58,6 +58,7 @@ def initialize_session_state():
58
  verbose=True,
59
  memory=memory,
60
  return_source_documents=True,
 
61
  )
62
 
63
 
 
58
  verbose=True,
59
  memory=memory,
60
  return_source_documents=True,
61
+ max_tokens_limit=3700,
62
  )
63
 
64
 
requirements.txt CHANGED
@@ -1,11 +1,12 @@
1
  gpt4all==1.0.12
2
  langchain==0.0.313
3
  openai==0.28.1
 
 
 
 
4
  streamlit==1.27.2
5
  streamlit-chat==0.1.1
6
  SQLAlchemy==2.0.22
7
  sqlite-vss==0.1.2
8
- pandas==2.1.1
9
- pgvector==0.2.3
10
- psycopg2-binary==2.9.9
11
- psycopg2==2.9.9
 
1
  gpt4all==1.0.12
2
  langchain==0.0.313
3
  openai==0.28.1
4
+ pandas==2.1.1
5
+ pgvector==0.2.3
6
+ psycopg2-binary==2.9.9
7
+ psycopg2==2.9.9
8
  streamlit==1.27.2
9
  streamlit-chat==0.1.1
10
  SQLAlchemy==2.0.22
11
  sqlite-vss==0.1.2
12
+ tiktoken==0.5.1