-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.hybrid.example
More file actions
206 lines (165 loc) · 7.64 KB
/
.env.hybrid.example
File metadata and controls
206 lines (165 loc) · 7.64 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# AI-CoScientist Hybrid Configuration
# Nemotron + GPT-4/Claude Integration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# NVIDIA NIM Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# NGC API Key (Required for NIM containers)
# Get from: https://org.ngc.nvidia.com/setup/api-key
NGC_API_KEY=your_ngc_api_key_here
# NIM Optimization Profile
# Options: 'throughput' (max tokens/sec) or 'latency' (min TTFT/ITL)
NIM_OPTIMIZATION_PROFILE=throughput
# Nemotron LLM Configuration
NEMOTRON_BASE_URL=http://localhost:8000/v1
NEMOTRON_MODEL=nvidia/nvidia-nemotron-nano-9b-v2
NEMOTRON_TEMPERATURE=0.7
NEMOTRON_MAX_TOKENS=2048
# NeMo Retriever Embedding Configuration
EMBEDDER_BASE_URL=http://localhost:8001/v1
EMBEDDER_MODEL=nvidia/llama-3.2-nv-embedqa-1b-v2
EMBEDDER_TRUNCATE=END
EMBEDDING_DIMENSION=1024
# NeMo Retriever Reranker Configuration
RERANKER_BASE_URL=http://localhost:8002/v1
RERANKER_MODEL=nvidia/llama-3.2-nv-rerankqa-1b-v2
RERANKER_TOP_K=5
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Hybrid Mode Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Enable hybrid mode (GPT-4/Claude + Nemotron)
HYBRID_MODE=true
# Task routing configuration
USE_GPT4_FOR_EVALUATION=true
USE_CLAUDE_FOR_EVALUATION=true
USE_NEMOTRON_FOR_SUMMARIZATION=true
USE_NEMOTRON_FOR_EXTRACTION=true
USE_NEMOTRON_FOR_CLASSIFICATION=true
# Ensemble weights (must sum to 1.0)
ENSEMBLE_WEIGHT_GPT4=0.40
ENSEMBLE_WEIGHT_CLAUDE=0.30
ENSEMBLE_WEIGHT_NEMOTRON=0.30
# Quality threshold for Nemotron-only tasks
# If confidence < threshold, escalate to GPT-4/Claude
NEMOTRON_CONFIDENCE_THRESHOLD=0.75
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# External LLM APIs
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# OpenAI API (for GPT-4)
OPENAI_API_KEY=sk-your-openai-api-key-here
OPENAI_MODEL=gpt-4
OPENAI_TEMPERATURE=0.3
OPENAI_MAX_TOKENS=4096
# Anthropic API (for Claude)
ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here
ANTHROPIC_MODEL=claude-sonnet-4-20250514
ANTHROPIC_TEMPERATURE=0.3
ANTHROPIC_MAX_TOKENS=4096
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Database Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# PostgreSQL
POSTGRES_USER=ai_coscientist
POSTGRES_PASSWORD=change-this-secure-password
POSTGRES_DB=ai_coscientist
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# ChromaDB (Vector Database)
CHROMADB_HOST=localhost
CHROMADB_PORT=8003
CHROMADB_MODE=docker
CHROMA_TELEMETRY=FALSE
# ChromaDB Collections
CHROMADB_COLLECTION_IMPROVEMENTS=improvement_patterns
CHROMADB_COLLECTION_PHRASES=successful_phrases
CHROMADB_COLLECTION_TEMPLATES=section_templates
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Redis Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}
# Cache TTL (seconds)
CACHE_TTL_EMBEDDING=3600
CACHE_TTL_EVALUATION=1800
CACHE_TTL_SEARCH=600
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Application Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Application
SECRET_KEY=change-this-to-a-random-secret-key-minimum-32-characters-long
DEBUG=false
LOG_LEVEL=INFO
ENVIRONMENT=development
# API Server
API_HOST=0.0.0.0
API_PORT=8000
API_WORKERS=4
API_RELOAD=false
# CORS
CORS_ORIGINS=["http://localhost:3000","http://localhost:8080"]
CORS_CREDENTIALS=true
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# RAG Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Retrieval Parameters
RAG_TOP_K_RETRIEVE=10
RAG_TOP_K_RERANK=5
RAG_SIMILARITY_THRESHOLD=0.7
# Chunking Parameters
CHUNK_SIZE=800
CHUNK_OVERLAP=120
CHUNKING_STRATEGY=recursive
# Graph RAG Parameters
GRAPH_RAG_ENABLED=true
GRAPH_SEED_COUNT=3
GRAPH_MAX_DEPTH=2
GRAPH_MIN_SIMILARITY=0.75
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Performance & Optimization
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Batch Processing
ENABLE_BATCH_PROCESSING=true
BATCH_SIZE=32
BATCH_TIMEOUT_MS=100
# Multi-level Caching
ENABLE_MEMORY_CACHE=true
ENABLE_REDIS_CACHE=true
MEMORY_CACHE_SIZE=1000
# Async Processing
ENABLE_ASYNC=true
MAX_CONCURRENT_REQUESTS=10
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Monitoring & Metrics
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Prometheus
ENABLE_METRICS=true
METRICS_PORT=9090
# Logging
LOG_FORMAT=json
LOG_FILE=logs/ai-coscientist.log
LOG_ROTATION=daily
LOG_RETENTION_DAYS=30
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Celery Configuration
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CELERY_BROKER_URL=${REDIS_URL}
CELERY_RESULT_BACKEND=${REDIS_URL}
CELERY_TASK_SERIALIZER=json
CELERY_RESULT_SERIALIZER=json
CELERY_ACCEPT_CONTENT=["json"]
CELERY_TIMEZONE=UTC
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Feature Flags
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# A/B Testing
ENABLE_AB_TESTING=true
AB_TEST_SPLIT_RATIO=0.5
# Experimental Features
ENABLE_LANGGRAPH_WORKFLOWS=true
ENABLE_MULTI_AGENT_ORCHESTRATION=true
ENABLE_SELF_CORRECTION=true