Skip to content

Commit ab57097

Browse files
fixed api endpoint url and update .env.example
Signed-off-by: gopal-raj-suresh <gopal.raj.dummugudupu@cloud2labs.com>
1 parent 7c8a51d commit ab57097

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

sample_solutions/RAGChatbot/api/.env.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# - The API key is the litellm_master_key value from the generated vault.yml file
88
#
99
# **APISIX Gateway**: Provide your APISIX Gateway URL and authentication token
10-
# - For embedding: https://apisix-gateway.example.com/bge-base-en-v1.5
11-
# - For inference: https://apisix-gateway.example.com/Llama-3.1-8B-Instruct
12-
# - Note: APISIX requires the model name in the URL path
10+
# - For APISIX, include the model name in the INFERENCE_API_ENDPOINT path
11+
# - Example: https://apisix-gateway.example.com/Llama-3.1-8B-Instruct
12+
# - Set EMBEDDING_API_ENDPOINT separately for the embedding model
13+
# - Example: https://apisix-gateway.example.com/bge-base-en-v1.5
1314
# - To generate the APISIX authentication token, use the [generate-token.sh](https://github.com/opea-project/Enterprise-Inference/blob/main/core/scripts/generate-token.sh) script
1415
# - The token is generated using Keycloak client credentials
15-
# - Set EMBEDDING_API_ENDPOINT and INFERENCE_MODEL_ENDPOINT when using APISIX
1616
#
1717
# INFERENCE_API_TOKEN: Authentication token/API key for the inference service
1818
INFERENCE_API_ENDPOINT=https://api.example.com
@@ -26,8 +26,8 @@ INFERENCE_MODEL_NAME=meta-llama/Llama-3.1-8B-Instruct
2626
# Uncomment and set these when using APISIX Gateway:
2727
# IMPORTANT: Use exact APISIX route paths:
2828
# Example routes: /bge-base-en-v1.5-vllmcpu/* and /Llama-3.1-8B-Instruct-vllmcpu/*
29+
# INFERENCE_API_ENDPOINT=https://api.example.com/Llama-3.1-8B-Instruct-vllmcpu
2930
# EMBEDDING_API_ENDPOINT=https://api.example.com/bge-base-en-v1.5-vllmcpu
30-
# INFERENCE_MODEL_ENDPOINT=https://api.example.com/Llama-3.1-8B-Instruct-vllmcpu
3131

3232
# Local URL Endpoint (only needed for non-public domains)
3333
# If using a local domain like api.example.com mapped to localhost:

sample_solutions/RAGChatbot/api/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
INFERENCE_API_TOKEN = os.getenv("INFERENCE_API_TOKEN")
1717

1818
EMBEDDING_API_ENDPOINT = os.getenv("EMBEDDING_API_ENDPOINT")
19-
INFERENCE_MODEL_ENDPOINT = os.getenv("INFERENCE_MODEL_ENDPOINT")
2019

2120
if not EMBEDDING_API_ENDPOINT:
2221
EMBEDDING_API_ENDPOINT = INFERENCE_API_ENDPOINT
23-
if not INFERENCE_MODEL_ENDPOINT:
24-
INFERENCE_MODEL_ENDPOINT = INFERENCE_API_ENDPOINT
2522

2623
# Model Configuration
2724
EMBEDDING_MODEL_NAME = os.getenv("EMBEDDING_MODEL_NAME", "bge-base-en-v1.5")

sample_solutions/RAGChatbot/api/services/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class APIClient:
1919

2020
def __init__(self):
2121
self.embedding_base_url = config.EMBEDDING_API_ENDPOINT
22-
self.inference_base_url = config.INFERENCE_MODEL_ENDPOINT
22+
self.inference_base_url = config.INFERENCE_API_ENDPOINT
2323
self.token = config.INFERENCE_API_TOKEN
2424
self.http_client = httpx.Client(verify=False)
2525
logger.info(f"✓ API Client initialized - Embedding: {self.embedding_base_url}, Inference: {self.inference_base_url}")

0 commit comments

Comments
 (0)