Skip to content

Commit 97f5ca9

Browse files
committed
update required packages
1 parent 8e9c490 commit 97f5ca9

File tree

4 files changed

+62
-36
lines changed

4 files changed

+62
-36
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ storage/
1111
# Test files
1212
test_*.*
1313

14+
# Python venv
15+
.venv/
16+
bin/
17+
include/
18+
lib/
19+
pyvenv.cfg
20+
etc/
21+
1422
# The following are ignored by default.
1523

1624
# Byte-compiled / optimized / DLL files

config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,4 @@
126126
DEV_MODE = THINKRAG_ENV == "development"
127127

128128
# For creating IndexManager
129-
DEFAULT_INDEX_NAME = "knowledge_base"
130-
131-
# NLTK model storage path, default to be 'localmodels/nltk', under the project root directory, used for the unstructured library
132-
NLTK_DATA_PATH = os.path.join(os.getcwd(), MODEL_DIR, "nltk_data")
129+
DEFAULT_INDEX_NAME = "knowledge_base"

docs/HowToUsePythonVirtualEnv.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Create an environment with venv and installing Streamlit and other packages with pip.
2+
# Refer to: https://docs.streamlit.io/get-started/installation/command-line
3+
### 1. Open a terminal and navigate to your project folder
4+
```zsh
5+
cd ThinkRAG
6+
```
7+
### 2. In your terminal, type:
8+
```zsh
9+
python -m venv .venv
10+
```
11+
A folder named ".venv" will appear in your project. This directory is where your virtual environment and its dependencies are installed.
12+
### 3. Activate your environment with one of the following commands
13+
```zsh
14+
# Windows command prompt
15+
.venv\Scripts\activate.bat
16+
17+
# Windows PowerShell
18+
.venv\Scripts\Activate.ps1
19+
20+
# macOS and Linux
21+
source .venv/bin/activate
22+
```
23+
Once activated, you will see your environment name in parentheses before your prompt. "(.venv)"
24+
### 4. In the terminal with your environment activated, install all required packages:
25+
```zsh
26+
pip3 install -r requirements.txt
27+
```
28+
### 5. Run your Streamlit app
29+
```zsh
30+
python3 -m streamlit run app.py
31+
```
32+
### 6. When you're done using this environment, return to your normal shell by typing:
33+
```zsh
34+
deactivate
35+
```

requirements.txt

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
1-
chardet
2-
chromadb
3-
docx2txt
4-
jieba
5-
langchain
6-
langchain_openai
7-
llama-index
8-
llama-index-embeddings-huggingface
9-
llama-index-embeddings-langchain
10-
llama-index-llms-langchain
11-
llama-index-readers-web
12-
llama-index-retrievers-bm25
13-
llama-index-storage-kvstore-redis
14-
llama-index-vector-stores-chroma
15-
llama-index-vector-stores-elasticsearch
16-
llama-index-vector-stores-lancedb
17-
llama-index-llms-ollama
18-
llama-index-storage-chat_store-redis
19-
ollama
20-
Pillow
21-
python-pptx
22-
redis
23-
requests
24-
sentence-transformers
25-
spacy
26-
sse-starlette
27-
streamlit
28-
streamlit-aggrid
29-
torch
30-
transformers
31-
unstructured
32-
uvicorn
1+
llama_index==0.11.19
2+
streamlit==1.39.0
3+
langchain==0.3.4
4+
langchain-community==0.3.3
5+
langchain_openai==0.2.3
6+
llama-index-embeddings-huggingface==0.3.1
7+
llama-index-embeddings-langchain==0.2.1
8+
llama-index-llms-langchain==0.4.2
9+
llama-index-readers-web==0.2.4
10+
llama-index-retrievers-bm25==0.4.0
11+
llama-index-storage-kvstore-redis==0.2.0
12+
llama-index-vector-stores-chroma==0.2.1
13+
llama-index-vector-stores-elasticsearch==0.3.3
14+
llama-index-vector-stores-lancedb==0.2.4
15+
llama-index-llms-ollama==0.3.4
16+
llama-index-storage-chat_store-redis==0.3.2
17+
llama_index.storage.docstore.redis==0.2.0
18+
llama_index.storage.index_store.redis==0.3.0

0 commit comments

Comments
 (0)