Skip to content

Commit 2fdb510

Browse files
committed
docs: Add HuggingFace authentication instructions - Add step-by-step guide for HuggingFace setup - Include instructions for model access and token creation - Add both CLI and environment variable uth methods
1 parent 58dba31 commit 2fdb510

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

agentic_rag/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,34 @@ The system has the following features:
2121
pip install -r requirements.txt
2222
```
2323

24-
2. (Optional) If you want to use the OpenAI-based agent instead of the default local model, create a `.env` file with your OpenAI API key:
24+
2. Authenticate with HuggingFace:
25+
26+
The system uses Mistral-7B by default, which requires authentication with HuggingFace:
27+
28+
a. Create a HuggingFace account at https://huggingface.co/join
29+
30+
b. Accept the Mistral-7B model terms at https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2
31+
32+
c. Create an access token at https://huggingface.co/settings/tokens
33+
34+
d. Login using the token:
35+
```bash
36+
huggingface-cli login
37+
# Or set the token as an environment variable:
38+
export HUGGING_FACE_HUB_TOKEN=your_token_here
39+
# On Windows:
40+
set HUGGING_FACE_HUB_TOKEN=your_token_here
41+
```
42+
43+
3. (Optional) If you want to use the OpenAI-based agent instead of the default local model, create a `.env` file with your OpenAI API key:
2544

2645
```bash
2746
OPENAI_API_KEY=your-api-key-here
2847
```
2948

3049
If no API key is provided, the system will automatically use the local Mistral-7B model for text generation.
3150

32-
3. The system will automatically download and use `Mistral-7B-Instruct-v0.2` for text generation when using the local model. No additional configuration is needed.
51+
4. The system will automatically download and use `Mistral-7B-Instruct-v0.2` for text generation when using the local model. No additional configuration is needed.
3352

3453
## 1. Getting Started
3554

0 commit comments

Comments
 (0)