manarsaber11 commited on
Commit
82abe57
·
verified ·
1 Parent(s): ed50691

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -0
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Document RAG API
3
+ emoji: 📄
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ # Document RAG API
11
+
12
+ Arabic & English Document Q&A with LLM-based OCR.
13
+
14
+ ## Endpoints
15
+
16
+ | Method | Endpoint | Description |
17
+ |--------|----------|-------------|
18
+ | POST | `/upload-document` | Upload & index a document |
19
+ | POST | `/ask` | Ask a question, get answer + top 3 chunks |
20
+ | DELETE | `/clear-memory` | Clear chat memory |
21
+ | GET | `/health` | Health check |
22
+
23
+ ## Headers
24
+ All requests require:
25
+ ```
26
+ x-groq-key: your_groq_api_key
27
+ ```
28
+
29
+ ## Supported File Types
30
+ - PDF (text + scanned)
31
+ - Images (PNG, JPG, JPEG, TIFF, BMP, WEBP)
32
+ - Word (.docx)
33
+ - Text (.txt)
34
+
35
+ ## Example `/ask` Response
36
+ ```json
37
+ {
38
+ "question": "ما هي شروط الإجازة؟",
39
+ "answer": "الإجازة السنوية 21 يوم...",
40
+ "chunks": ["chunk 1...", "chunk 2...", "chunk 3..."]
41
+ }
42
+ ```