Skip to content

Commit

Permalink
Update NEAR integration and configuration settings
Browse files Browse the repository at this point in the history
- Updated .env.example to reflect the new default LLM model: meta-llama/llama-3.3-70B-instruct.
- Enhanced test_transaction.py with improved logging, environment variable validation, and error handling during NEAR transactions.
- Refactored near_integration.py to utilize near-api-py for more efficient transaction handling and account management.
- Simplified NEAR connection creation and error handling, ensuring better feedback during transaction processes.
  • Loading branch information
jbarnes850 committed Jan 16, 2025
1 parent b8657fd commit 6e52221
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 459 deletions.
39 changes: 1 addition & 38 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,7 @@ NEAR_RPC_URL=https://neart.lava.build
# LLM Configuration (Required)
LLM_PROVIDER=hyperbolic # Currently supported: hyperbolic
LLM_API_KEY=your-llm-api-key # Get from https://hyperbolic.xyz
LLM_MODEL=deepseek-ai/DeepSeek-V3 # Default LLM model
LLM_MODEL=meta-llama/llama-3.3-70B-instruct # Default LLM model
LLM_TEMPERATURE=0.7 # Lower for more deterministic responses
LLM_MAX_TOKENS=2000 # Maximum response length
LLM_API_URL=https://api.hyperbolic.xyz/v1

# Market Data Configuration (Optional)
DEFILLAMA_API_KEY=your-defillama-key # For additional market data
MARKET_DATA_CACHE_TTL=300 # Cache lifetime in seconds

# Memory and Storage (Optional)
REDIS_URL=redis://localhost:6379 # For distributed setups
MAX_MEMORY_ENTRIES=1000 # Maximum entries in memory
MEMORY_PRUNING_THRESHOLD=0.8 # Prune when 80% full

# Monitoring and Logging (Optional)
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
PROMETHEUS_PORT=9090 # For metrics
ENABLE_TELEMETRY=true # Send anonymous usage data

# Strategy Configuration (Optional)
MIN_PROFIT_THRESHOLD=0.002 # 0.2% minimum profit
MAX_POSITION_SIZE=10000 # Maximum position size in USD
GAS_PRICE_THRESHOLD=0.001 # Maximum acceptable gas price
CONSENSUS_THRESHOLD=0.7 # Required agreement among agents

# Security and Risk Management (Optional)
MAX_SLIPPAGE=0.01 # 1% maximum slippage
RATE_LIMIT_TRADES=10 # Max trades per minute
EMERGENCY_SHUTDOWN_THRESHOLD=0.05 # 5% unexpected loss

# Development Settings (Optional)
ENABLE_DEBUG_MODE=false # Enable additional debugging
TEST_MODE=false # Use mock data for testing

# Voice Synthesis (ElevenLabs)
ELEVEN_LABS_API_KEY=your-elevenlabs-api-key
ELEVEN_LABS_VOICE_ID=ThT5KcBeYPX3keUQqHPh # Default voice ID

# USDC Configuration
USDC_CONTRACT_TESTNET=usdc.testnet
USDC_CONTRACT_MAINNET=usdc.near
Loading

0 comments on commit 6e52221

Please sign in to comment.