@@ -192,45 +192,98 @@ EOF
192192
193193#### Step 2: Create ` api/.env ` File
194194
195- You can either copy from the example file:
196-
197- ``` bash
198- cp api/.env.example api/.env
199- ```
200-
201- Then edit ` api/.env ` with your actual credentials, ** OR** create it directly:
202-
203- ** For GenAI Gateway:**
195+ This application requires an ` api/.env ` file for proper configuration. Create it with the commands below:
204196
205197``` bash
198+ # Create the api/.env file
206199cat > api/.env << EOF
207- INFERENCE_API_ENDPOINT=https://genai-gateway.example.com
208- INFERENCE_API_TOKEN=your-api-key-here
209-
200+ # Inference API Configuration
201+ # INFERENCE_API_ENDPOINT: URL to your inference service (without /v1 suffix)
202+ #
203+ # **GenAI Gateway**: Provide your GenAI Gateway URL and API key
204+ # - URL format: https://genai-gateway.example.com
205+ # - To generate the GenAI Gateway API key, use the [generate-vault-secrets.sh] script
206+ # - The API key is the litellm_master_key value from the generated vault.yml file
207+ #
208+ # **APISIX Gateway**: Provide your APISIX Gateway URL and authentication token
209+ # - For APISIX, include the model name in the INFERENCE_API_ENDPOINT path
210+ # - Example: https://apisix-gateway.example.com/Llama-3.1-8B-Instruct
211+ # - Set EMBEDDING_API_ENDPOINT separately for the embedding model
212+ # - Example: https://apisix-gateway.example.com/bge-base-en-v1.5
213+ # - To generate the APISIX authentication token, use the [generate-token.sh] script
214+ # - The token is generated using Keycloak client credentials
215+ #
216+ # INFERENCE_API_TOKEN: Authentication token/API key for the inference service
217+ INFERENCE_API_ENDPOINT=https://your-api.example.com/
218+ INFERENCE_API_TOKEN=your-pre-generated-token-here
219+
220+ # Model Configuration
210221EMBEDDING_MODEL_NAME=BAAI/bge-base-en-v1.5
211222INFERENCE_MODEL_NAME=meta-llama/Llama-3.1-8B-Instruct
212223
224+ # APISIX Gateway Endpoints
225+ # Uncomment and set these when using APISIX Gateway:
226+ # IMPORTANT: Use exact APISIX route paths:
227+ # Example routes: /bge-base-en-v1.5/* and /Llama-3.1-8B-Instruct/*
228+ # INFERENCE_API_ENDPOINT=https://api.example.com/Llama-3.1-8B-Instruct
229+ # EMBEDDING_API_ENDPOINT=https://api.example.com/bge-base-en-v1.5
230+
231+ # Local URL Endpoint (only needed for non-public domains)
232+ # If using a local domain like api.example.com mapped to localhost:
233+ # Set this to: api.example.com (domain without https://)
234+ # If using a public domain, set any placeholder value like: not-needed
213235LOCAL_URL_ENDPOINT=not-needed
214236EOF
215237```
216238
217- ** For APISIX Gateway: **
239+ Or manually create ` api/.env ` with:
218240
219241``` bash
220- cat > api/.env << EOF
221- INFERENCE_API_ENDPOINT=https://apisix-gateway.example.com
222- INFERENCE_API_TOKEN=your-token-here
223-
224- EMBEDDING_API_ENDPOINT=https://apisix-gateway.example.com/bge-base-en-v1.5
225- INFERENCE_MODEL_ENDPOINT=https://apisix-gateway.example.com/Llama-3.1-8B-Instruct
226-
242+ # Inference API Configuration
243+ # INFERENCE_API_ENDPOINT: URL to your inference service (without /v1 suffix)
244+ #
245+ # **GenAI Gateway**: Provide your GenAI Gateway URL and API key
246+ # - URL format: https://genai-gateway.example.com
247+ # - To generate the GenAI Gateway API key, use the [generate-vault-secrets.sh] script
248+ # - The API key is the litellm_master_key value from the generated vault.yml file
249+ #
250+ # **APISIX Gateway**: Provide your APISIX Gateway URL and authentication token
251+ # - For APISIX, include the model name in the INFERENCE_API_ENDPOINT path
252+ # - Example: https://apisix-gateway.example.com/Llama-3.1-8B-Instruct
253+ # - Set EMBEDDING_API_ENDPOINT separately for the embedding model
254+ # - Example: https://apisix-gateway.example.com/bge-base-en-v1.5
255+ # - To generate the APISIX authentication token, use the [generate-token.sh] script
256+ # - The token is generated using Keycloak client credentials
257+ #
258+ # INFERENCE_API_TOKEN: Authentication token/API key for the inference service
259+ INFERENCE_API_ENDPOINT=https://your-api.example.com/
260+ INFERENCE_API_TOKEN=your-pre-generated-token-here
261+
262+ # Model Configuration
227263EMBEDDING_MODEL_NAME=BAAI/bge-base-en-v1.5
228264INFERENCE_MODEL_NAME=meta-llama/Llama-3.1-8B-Instruct
229265
266+ # APISIX Gateway Endpoints
267+ # Uncomment and set these when using APISIX Gateway:
268+ # IMPORTANT: Use exact APISIX route paths:
269+ # Example routes: /bge-base-en-v1.5/* and /Llama-3.1-8B-Instruct/*
270+ # INFERENCE_API_ENDPOINT=https://your-api-endpoint.com/Llama-3.1-8B-Instruct
271+ # EMBEDDING_API_ENDPOINT=https://your-api-endpoint.com/bge-base-en-v1.5
272+
273+ # Local URL Endpoint (only needed for non-public domains)
274+ # If using a local domain like api.example.com mapped to localhost:
275+ # Set this to: api.example.com (domain without https://)
276+ # If using a public domain, set any placeholder value like: not-needed
230277LOCAL_URL_ENDPOINT=not-needed
231- EOF
232278```
233279
280+ ** Important Configuration Notes:**
281+
282+ - ** INFERENCE_API_ENDPOINT** : Your actual inference service URL (replace ` https://your-api-endpoint.com/deployment ` )
283+ - For APISIX/Keycloak deployments, the model name must be included in the endpoint URL (e.g., ` https://apisix-gateway.example.com/Llama-3.1-8B-Instruct ` )
284+ - ** INFERENCE_API_TOKEN** : Your actual pre-generated authentication token
285+ - ** LOCAL_URL_ENDPOINT** : Only needed if using local domain mapping (see [ Local Development Configuration] ( #local-development-configuration ) )
286+
234287** Note** : The docker-compose.yml file automatically loads environment variables from both ` .env ` (root) and ` ./api/.env ` (backend) files.
235288
236289### Running the Application
0 commit comments