You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-41Lines changed: 38 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,87 +7,84 @@ Flare AI Kit template for Retrieval-Augmented Generation (RAG) Knowledge.
7
7
8
8
## 🚀 Key Features
9
9
10
-
-**Modular Architecture**: Designed with independent components that can be easily extended.
11
-
-**Qdrant-Powered Retrieval**: Leverages Qdrant for fast, semantic document retrieval, but can easily be adapted to other vector databases.
12
-
-**Unified LLM Integration**: Supports over 300 models via OpenRouter, enabling flexible selection and integration of LLMs.
13
-
-**Highly Configurable & Extensible**: Uses a straightforward JSON configuration system, enabling effortless integration of new features and services.
10
+
-**Modular Architecture:** Designed with independent components that can be easily extended.
11
+
-**Qdrant-Powered Retrieval:** Leverages Qdrant for fast, semantic document retrieval, but can easily be adapted to other vector databases.
12
+
-**Highly Configurable & Extensible:** Uses a straightforward configuration system, enabling effortless integration of new features and services.
13
+
-**Unified LLM Integration:** Leverages Gemini as a unified provider while maintaining compatibility with OpenRouter for a broader range of models.
14
14
15
15
## 📌 Prerequisites
16
16
17
17
Before getting started, ensure you have:
18
18
19
19
- A **Python 3.12** environment.
20
20
-[uv](https://docs.astral.sh/uv/getting-started/installation/) installed for dependency management.
21
-
-An [OpenRouter API Key](https://openrouter.ai/settings/keys).
21
+
-A [Gemini API key](https://aistudio.google.com/app/apikey).
22
22
- Access to one of the Flare databases. (The [Flare Developer Hub](https://dev.flare.network/) is included in CSV format for local testing.)
23
23
24
24
## 🏗️ Build & Run Instructions
25
25
26
26
You can deploy Flare AI RAG using Docker or set up the backend and frontend manually.
27
27
28
-
-**Environment Setup**: Rename `.env.example` to `.env` and add in the variables (e.g. your [OpenRouter API Key](https://openrouter.ai/settings/keys)).
28
+
-**Environment Setup:**
29
+
Rename `.env.example` to `.env` and add in the variables (e.g. your [Gemini API key](https://aistudio.google.com/app/apikey)).
29
30
30
31
### Build using Docker
31
32
32
-
-**Build the Docker Image**:
33
+
1.**Build the Docker Image:**
33
34
34
-
```bash
35
-
docker build -t flare-ai-rag .
36
-
```
35
+
```bash
36
+
docker build -t flare-ai-rag .
37
+
```
37
38
38
-
-**Run the Docker Container**:
39
+
2.**Run the Docker Container:**
39
40
40
-
```bash
41
-
docker run -p 80:80 -it --env-file .env flare-ai-rag
42
-
```
41
+
```bash
42
+
docker run -p 80:80 -it --env-file .env flare-ai-rag
43
+
```
43
44
44
45
### Build manually
45
46
46
-
-**Install Dependencies**: Install all required dependencies by running:
47
-
48
-
```bash
49
-
uv sync --all-extras
50
-
```
51
-
52
-
Verify your available credits and get all supported models with:
47
+
1.**Install Dependencies:**
48
+
Install all required dependencies by running:
53
49
54
-
```bash
55
-
uv run python -m tests.credits
56
-
uv run python -m tests.models
57
-
```
50
+
```bash
51
+
uv sync --all-extras
52
+
```
58
53
59
-
-**Setup a Qdrant Service**: Make sure that Qdrant is up an running before running your script.
60
-
You can quickly start a Qdrant instance using Docker:
54
+
2.**Setup a Qdrant Service:**
55
+
Make sure that Qdrant is up an running before running your script.
56
+
You can quickly start a Qdrant instance using Docker:
61
57
62
-
```bash
63
-
docker run -p 6333:6333 qdrant/qdrant
64
-
```
58
+
```bash
59
+
docker run -p 6333:6333 qdrant/qdrant
60
+
```
65
61
66
-
-**Configure Parameters and Run RAG**: The RAG consists of a router, a retriever, and a responder, all configurable within `src/input_parameters.json`.
67
-
Once configured, add your query to `src/query.txt` and run:
62
+
3.**Configure Parameters and Run RAG:**
63
+
The RAG consists of a router, a retriever, and a responder, all configurable within `src/input_parameters.json`.
64
+
Once configured, add your query to `src/query.txt` and run:
68
65
69
-
```bash
70
-
uv run start-rag
71
-
```
66
+
```bash
67
+
uv run start-rag
68
+
```
72
69
73
70
## 🚀 Deploy on TEE
74
71
75
72
Deploy on a [Confidential Space](https://cloud.google.com/confidential-computing/confidential-space/docs/confidential-space-overview) using AMD SEV.
76
73
77
74
### Prerequisites
78
75
79
-
-**Google Cloud Platform Account:**
76
+
-**Google Cloud Platform Account:**
80
77
Access to the [`verifiable-ai-hackathon`](https://console.cloud.google.com/welcome?project=verifiable-ai-hackathon) project is required.
81
78
82
-
-**Gemini API Key:**
79
+
-**Gemini API Key:**
83
80
Ensure your [Gemini API key](https://aistudio.google.com/app/apikey) is linked to the project.
84
81
85
-
-**gcloud CLI:**
82
+
-**gcloud CLI:**
86
83
Install and authenticate the [gcloud CLI](https://cloud.google.com/sdk/docs/install).
87
84
88
85
### Environment Configuration
89
86
90
-
1.**Set Environment Variables:**
87
+
1.**Set Environment Variables:**
91
88
Update your `.env` file with:
92
89
93
90
```bash
@@ -164,10 +161,10 @@ If you encounter issues, follow these steps:
0 commit comments