File size: 2,057 Bytes
ab26b91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Amazon Multimodal RAG - Environment Variables Example
# Copy this file to .env and customize for your setup

# ============================================
# Data Paths
# ============================================
CSV_PATH=amazon_multimodal_clean.csv
CHROMA_DIR=chromadb_store
IMAGE_DIR=images

# ============================================
# Model Configuration
# ============================================

# LLM Provider Selection
# Set to 'true' to use OpenAI GPT-4, 'false' to use local HuggingFace models
USE_OPENAI=true

# OpenAI API Configuration (if USE_OPENAI=true)
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-proj-your-api-key-here
OPENAI_MODEL=gpt-4o
OPENAI_MAX_TOKENS=512
OPENAI_TEMPERATURE=0.2

# Fallback: Local HuggingFace Models (if USE_OPENAI=false)
# Options:
# - mistralai/Mistral-7B-Instruct-v0.3 (recommended, 7B params)
# - meta-llama/Meta-Llama-3-8B-Instruct (8B params)
# - mistralai/Mixtral-8x7B-Instruct-v0.1 (requires 32GB+ RAM)
LLM_MODEL=mistralai/Mistral-7B-Instruct-v0.3

# CLIP model variant
# Options: ViT-B/32, ViT-B/16, ViT-L/14
CLIP_MODEL=ViT-B/32

# ============================================
# API Server Configuration
# ============================================
API_HOST=0.0.0.0
API_PORT=8000

# CORS Settings
# Development: "*"
# Production: "https://yourdomain.com,https://www.yourdomain.com"
ALLOWED_ORIGINS=*

# ============================================
# Retrieval Configuration
# ============================================
TOP_K_PRODUCTS=5
MAX_TEXT_LENGTH=400

# ============================================
# LLM Generation Configuration
# ============================================
LLM_MAX_TOKENS=512
LLM_TEMPERATURE=0.2

# ============================================
# Image Download Configuration
# ============================================
IMAGE_DOWNLOAD_TIMEOUT=5

# ============================================
# Logging Configuration
# ============================================
# Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO