Rahbarnisa commited on
Commit
30817e9
·
verified ·
1 Parent(s): d82c2c5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -120
README.md CHANGED
@@ -1,120 +1,10 @@
1
- A starter Python project for building a pharma-focused support assistant with Retrieval-Augmented Generation (RAG).
2
-
3
- ## Current Project Structure
4
-
5
- ```text
6
- rag-pharma-support-system/
7
- |- app.py
8
- |- config.py
9
- |- requirements.txt
10
- |- .env
11
- |- README.md
12
- |- data/
13
- |- src/
14
- | |- loader.py
15
- | |- chunking.py
16
- | |- vector_store.py
17
- | |- rag_pipelines.py
18
- | |- memory.py
19
- | |- ticketing.py
20
- | |- prompts.py
21
- |- venv/
22
- ```
23
-
24
- ## What Was Set Up
25
-
26
- 1. Created project folder and virtual environment.
27
- 2. Created `data/` and `src/` directories.
28
- 3. Added starter files (`app.py`, `config.py`, module files in `src/`).
29
- 4. Installed dependencies from `requirements.txt`.
30
- 5. Configured `.env` for API key loading with `python-dotenv`.
31
- 6. Ran `app.py` and validated OpenAI client response.
32
-
33
- ## Requirements
34
-
35
- - Python 3.12+
36
- - PowerShell (Windows)
37
- - OpenAI API key with active quota/billing
38
-
39
- ## Installation (PowerShell)
40
-
41
- ```powershell
42
- python -m venv venv
43
- venv\Scripts\activate
44
- pip install -r requirements.txt
45
- ```
46
-
47
- ## Environment Variables
48
-
49
- Create `.env` in the project root:
50
-
51
- ```env
52
- OPENAI_API_KEY=your_api_key_here
53
- ```
54
-
55
- Important:
56
-
57
- - Use `OPENAI_API_KEY` (with underscores), not `OPEN-AI-API-KEY`.
58
- - Keep `.env` in UTF-8 encoding.
59
-
60
- ## Run
61
-
62
- ```powershell
63
- python app.py
64
- ```
65
-
66
- Expected output example:
67
-
68
- ```text
69
- Hello! Thank you for contacting support. How can I assist you today?
70
- ```
71
-
72
- ## Known Issues and Fixes
73
-
74
- ### 1) PowerShell `mkdir data src` failed
75
- Use:
76
-
77
- ```powershell
78
- mkdir data, src
79
- ```
80
-
81
- ### 2) `touch` command not found on Windows
82
- Use:
83
-
84
- ```powershell
85
- New-Item app.py, requirements.txt, config.py, README.md
86
- ```
87
-
88
- ### 3) Python syntax errors for API key variable names
89
- Invalid in Python:
90
-
91
- - `OPEN-AI-API-KEY`
92
-
93
- Valid in Python:
94
-
95
- - `OPENAI_API_KEY`
96
-
97
- ### 4) `.env` UnicodeDecodeError (`0xff ... invalid start byte`)
98
- The `.env` file had wrong encoding/BOM. Re-save as UTF-8.
99
-
100
- ### 5) `OpenAIError: api_key must be set`
101
- Usually caused by one of these:
102
-
103
- - Wrong env var name (must be `OPENAI_API_KEY`)
104
- - `.env` not loaded from correct path
105
- - `.env` encoding issue
106
-
107
- ### 6) `RateLimitError: insufficient_quota`
108
- Your API key worked, but billing/quota was exhausted. After quota became available, request succeeded.
109
-
110
- ## Security Note
111
-
112
- The API key was exposed in terminal history during setup. Rotate/revoke that key in the OpenAI dashboard and replace it with a new key in `.env`.
113
-
114
- ## Next Development Steps
115
-
116
- 1. Implement document loading in `src/loader.py`.
117
- 2. Add chunking logic in `src/chunking.py`.
118
- 3. Build embeddings + FAISS indexing in `src/vector_store.py`.
119
- 4. Connect retrieval + response generation in `src/rag_pipelines.py`.
120
- 5. Add Streamlit UI after pipeline works in CLI.
 
1
+ ---
2
+ title: AI Support Assistant
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: streamlit
7
+ sdk_version: "1.32.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---