Skip to content

Commit b8ad4be

Browse files
add high velocity ai pipeline
1 parent f04876c commit b8ad4be

39 files changed

Lines changed: 9088 additions & 0 deletions
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# High-Velocity AI Pipeline - Environment Configuration Template
2+
# Copy this file to .env and fill in your actual values
3+
4+
# =============================================================================
5+
# API KEYS (REQUIRED)
6+
# =============================================================================
7+
8+
# OpenAI API Key for GPT-4 Standard Agent
9+
# Get from: https://platform.openai.com/api-keys
10+
OPENAI_API_KEY=sk-your-openai-key-here
11+
12+
# GROQ API Key for Ultra-Fast Agent
13+
# Get from: https://console.groq.com/keys
14+
GROQ_API_KEY=gsk_your-groq-key-here
15+
16+
# Weights & Biases API Key for Weave Tracing (Optional)
17+
# Get from: https://wandb.ai/authorize
18+
WANDB_API_KEY=your-wandb-key-here
19+
20+
# =============================================================================
21+
# PERFORMANCE THRESHOLDS (Tuned from successful experiment)
22+
# =============================================================================
23+
24+
# Latency threshold to trigger swap to ultra-fast agent (ms)
25+
PIPELINE_LATENCY_THRESHOLD_MS=100
26+
27+
# Safe latency threshold for swap back to standard agent (ms)
28+
PIPELINE_SAFE_LATENCY_THRESHOLD_MS=70
29+
30+
# Safe throughput threshold for swap back (msg/sec)
31+
PIPELINE_SAFE_THROUGHPUT_THRESHOLD=600
32+
33+
# Cooldown period between swaps (seconds)
34+
PIPELINE_COOLDOWN_PERIOD_SECONDS=20
35+
36+
# =============================================================================
37+
# PIPELINE CONFIGURATION
38+
# =============================================================================
39+
40+
# Target throughput (messages per second)
41+
PIPELINE_TARGET_THROUGHPUT=800
42+
43+
# Message batch size
44+
PIPELINE_MESSAGE_BATCH_SIZE=100
45+
46+
# Batch processing interval (seconds)
47+
PIPELINE_BATCH_INTERVAL_SECONDS=0.125
48+
49+
# Default agent type (standard or ultra_fast)
50+
PIPELINE_DEFAULT_AGENT=standard
51+
52+
# Maximum agent swaps per session
53+
PIPELINE_MAX_AGENT_SWAPS=50
54+
55+
# =============================================================================
56+
# SYSTEM LIMITS
57+
# =============================================================================
58+
59+
# Maximum message queue size
60+
PIPELINE_MAX_MESSAGE_QUEUE_SIZE=10000
61+
62+
# Maximum memory usage (MB)
63+
PIPELINE_MAX_MEMORY_USAGE_MB=2048
64+
65+
# Maximum CPU usage (%)
66+
PIPELINE_MAX_CPU_USAGE_PERCENT=80.0
67+
68+
# =============================================================================
69+
# MONITORING CONFIGURATION
70+
# =============================================================================
71+
72+
# Enable CSV export for analysis
73+
PIPELINE_ENABLE_CSV_EXPORT=true
74+
75+
# Enable Weave tracing for observability
76+
PIPELINE_ENABLE_WEAVE_TRACING=true
77+
78+
# Metrics update interval (seconds)
79+
PIPELINE_METRICS_UPDATE_INTERVAL_SECONDS=1.0
80+
81+
# Export directory for CSV files and reports
82+
PIPELINE_EXPORT_DIRECTORY=exports
83+
84+
# Custom CSV filename (optional)
85+
PIPELINE_EXPORT_CSV_FILENAME=
86+
87+
# Enable JSON report generation
88+
PIPELINE_EXPORT_JSON_REPORTS=true
89+
90+
# =============================================================================
91+
# CIRCUIT BREAKER SETTINGS
92+
# =============================================================================
93+
94+
# Number of failures to open circuit breaker
95+
PIPELINE_CIRCUIT_BREAKER_FAILURE_THRESHOLD=5
96+
97+
# Timeout before testing recovery (seconds)
98+
PIPELINE_CIRCUIT_BREAKER_TIMEOUT_SECONDS=30.0
99+
100+
# Consecutive successes needed to close circuit
101+
PIPELINE_CIRCUIT_BREAKER_SUCCESS_THRESHOLD=3
102+
103+
# =============================================================================
104+
# MARKET DATA GENERATION
105+
# =============================================================================
106+
107+
# Enable market volatility patterns
108+
PIPELINE_MARKET_VOLATILITY_ENABLED=true
109+
110+
# Number of market symbols to simulate
111+
PIPELINE_MARKET_SYMBOLS_COUNT=12
112+
113+
# Market condition change interval (seconds)
114+
PIPELINE_MARKET_CONDITION_CHANGE_INTERVAL_SECONDS=30.0
115+
116+
# =============================================================================
117+
# LOGGING CONFIGURATION
118+
# =============================================================================
119+
120+
# Log level (DEBUG, INFO, WARNING, ERROR)
121+
PIPELINE_LOG_LEVEL=INFO
122+
123+
# Log file path (optional, will log to console if not set)
124+
PIPELINE_LOG_FILE=logs/high_velocity_pipeline.log
125+
126+
# Log format string
127+
PIPELINE_LOG_FORMAT=%(asctime)s - %(name)s - %(levelname)s - %(message)s
128+
129+
# =============================================================================
130+
# AI MODEL CONFIGURATION
131+
# =============================================================================
132+
133+
# OpenAI model for standard agent
134+
OPENAI_MODEL=gpt-4-turbo-preview
135+
136+
# GROQ model for ultra-fast agent
137+
GROQ_MODEL=llama3-70b-8192
138+
139+
# API timeout (seconds)
140+
API_TIMEOUT_SECONDS=30.0
141+
142+
# Maximum API retries
143+
API_MAX_RETRIES=3
144+
145+
# =============================================================================
146+
# DEVELOPMENT/TESTING OVERRIDES
147+
# =============================================================================
148+
149+
# Set to 'true' to enable development mode
150+
DEVELOPMENT_MODE=false
151+
152+
# Set to 'true' to enable debug logging
153+
DEBUG_MODE=false
154+
155+
# Set to 'true' to disable external API calls (for testing)
156+
MOCK_API_CALLS=false
157+
158+
# =============================================================================
159+
# DEPLOYMENT CONFIGURATION
160+
# =============================================================================
161+
162+
# Deployment environment (development, staging, production)
163+
DEPLOYMENT_ENV=production
164+
165+
# Instance identifier for multi-instance deployments
166+
INSTANCE_ID=hvp-001
167+
168+
# Health check port
169+
HEALTH_CHECK_PORT=8080
170+
171+
# Metrics export port
172+
METRICS_PORT=8081
173+
174+
# =============================================================================
175+
# SECURITY SETTINGS
176+
# =============================================================================
177+
178+
# Enable API key rotation
179+
ENABLE_API_KEY_ROTATION=false
180+
181+
# API key rotation interval (hours)
182+
API_KEY_ROTATION_INTERVAL_HOURS=24
183+
184+
# Enable request rate limiting
185+
ENABLE_RATE_LIMITING=true
186+
187+
# Maximum requests per minute
188+
MAX_REQUESTS_PER_MINUTE=1000
189+

0 commit comments

Comments
 (0)