Skip to content

Commit 4d42999

Browse files
Add configurable SSL verification for MultiAgentQnA
Signed-off-by: gopal-raj-suresh <gopal.raj.dummugudupu@cloud2labs.com>
1 parent 27e10e9 commit 4d42999

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

sample_solutions/MultiAgentQnA/api/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ INFERENCE_MODEL_NAME=meta-llama/Llama-3.1-8B-Instruct
3434
# Set this to: api.example.com (domain without https://)
3535
# If using a public domain, set any placeholder value like: not-needed
3636
LOCAL_URL_ENDPOINT=not-needed
37+
38+
# SSL Verification Settings
39+
# Set to false only for dev with self-signed certs
40+
VERIFY_SSL=true

sample_solutions/MultiAgentQnA/api/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
if not INFERENCE_API_TOKEN:
2323
raise ValueError("INFERENCE_API_TOKEN must be set in environment variables")
2424

25+
# SSL Verification Settings
26+
VERIFY_SSL = os.getenv("VERIFY_SSL", "true").lower() == "true"
27+
2528
# Application Settings
2629
APP_TITLE = "Multi-Agent Q&A"
2730
APP_DESCRIPTION = "A multi-agent Q&A system using CrewAI"

sample_solutions/MultiAgentQnA/api/services/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self):
2121
self.embedding_base_url = config.EMBEDDING_API_ENDPOINT
2222
self.inference_base_url = config.INFERENCE_API_ENDPOINT
2323
self.token = config.INFERENCE_API_TOKEN
24-
self.http_client = httpx.Client()
24+
self.http_client = httpx.Client(verify=config.VERIFY_SSL)
2525
logger.info(f"✓ API Client initialized - Embedding: {self.embedding_base_url}, Inference: {self.inference_base_url}")
2626

2727
def get_embedding_client(self):

0 commit comments

Comments
 (0)