Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 104 additions & 61 deletions apps/Cortensor-AIOracle/.env.example
Original file line number Diff line number Diff line change
@@ -1,62 +1,105 @@
# Cortensor Network Configuration
# =============================================================================
# AI ORACLE - Environment Configuration
# =============================================================================

# -----------------------------------------------------------------------------
# Cortensor Network (REQUIRED)
# -----------------------------------------------------------------------------
# Cortensor Router API - Main AI network endpoint
CORTENSOR_ROUTER_URL=http://your-cortensor-host:5010
CORTENSOR_API_KEY=your_cortensor_api_key_here
CORTENSOR_ROUTER_URL=https://router.cortensor.com

# External APIs for Real-time Data (Optional)
# Get API keys from respective services to enable real-time data

# News API - for latest news and sports updates
# Sign up at: https://newsapi.org/
NEWS_API_KEY=your_news_api_key_here

# Alpha Vantage - for stock market data
# Sign up at: https://www.alphavantage.co/support/#api-key
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key_here

# CoinGecko - for enhanced crypto data (optional, has free tier)
# Sign up at: https://www.coingecko.com/en/api/pricing
COINGECKO_API_KEY=your_coingecko_api_key_here

# FastForex - for premium exchange rates
# Sign up at: https://www.fastforex.io/
FASTFOREX_API_KEY=your_fastforex_api_key_here

# OpenWeatherMap - for weather data
# Sign up at: https://openweathermap.org/api
WEATHER_API_KEY=your_weather_api_key_here

# Search API Keys (Optional - for better realtime data)
SERPER_API_KEY=your_serper_api_key_here

# Free news/search providers (optional)
# Guardian Open Platform: https://open-platform.theguardian.com/
GUARDIAN_API_KEY=your_guardian_api_key_here
# Currents API: https://currentsapi.services/en
CURRENTS_API_KEY=your_currents_api_key_here
# GNews API: https://gnews.io/
GNEWS_API_KEY=your_gnews_api_key_here
# Google Fact Check Tools API: https://toolbox.google.com/factcheck/apis
GOOGLE_FACTCHECK_API_KEY=your_google_factcheck_api_key_here

# Web/Search Controls
# Disable all external web/news/fact-check lookups
WEB_SEARCH_ENABLED=true
# Disable HTML scraping (HEAD/meta fetch)
WEB_SCRAPE_ENABLED=true
# Prefer free providers only (RSS + metadata); set to false to enable paid APIs where configured
FREE_SOURCES_ONLY=true
# Validate and normalize external links
VALIDATE_SOURCE_LINKS=true
# Google News RSS locale
NEWS_RSS_HL=en-US
NEWS_RSS_GL=US
NEWS_RSS_CEID=US:en

# Note: External APIs are optional. The system will work without them,
# but having them enables more accurate real-time data for:
# - Latest news and sports results
# - Current crypto and stock prices (with enhanced data from CoinGecko API key)
# - Weather information
# - Premium exchange rates (FastForex) with fallback to free API
# - Formula 1 results (free API, no key needed)
# - Enhanced rate limits and more detailed crypto information with CoinGecko API key
NEXT_PUBLIC_CORTENSOR_COMPLETIONS_URL=http://your-cortensor-host:5010/api/v1/completions

# WebSocket endpoint for real-time updates
NEXT_PUBLIC_CORTENSOR_WS_URL=ws://your-cortensor-host:9004

# Default session ID (Deepseek R1 Distill Llama 8B Q4)
NEXT_PUBLIC_DEEPSEEK_SESSION_ID=5

# -----------------------------------------------------------------------------
# Tavily AI Search (REQUIRED for Sources)
# -----------------------------------------------------------------------------
# Primary source for fact-checking and real-time data
# Sign up at: https://tavily.com
# Free tier: 1,000 API calls/month
TAVILY_API_KEY=tvly-your_tavily_api_key_here

# -----------------------------------------------------------------------------
# UI Customization
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_NAME=AI Oracle
NEXT_PUBLIC_APP_VERSION=Truth Machine v1.0

# -----------------------------------------------------------------------------
# Oracle Configuration
# -----------------------------------------------------------------------------
ORACLE_MIN_CONSENSUS=3
ORACLE_CONFIDENCE_THRESHOLD=0.8
ORACLE_DEBUG_LOGS=1
NEXT_PUBLIC_USE_WS=true

# LLM Parameters
NEXT_PUBLIC_MAX_INPUT_LENGTH=2000
LLM_MAX_TOKENS=4096
LLM_TIMEOUT=300
MODEL_NAME=Deepseek R1
PROMPT_TYPE=1
PRECOMMIT_TIMEOUT=90

# -----------------------------------------------------------------------------
# Multi-Session Model Configuration (Optional)
# -----------------------------------------------------------------------------
# LLaVA 1.5 7B Q4
SESSION_LLAVA_15_7B_Q4=3
WS_LLAVA_15_7B_Q4=ws://your-cortensor-host:9002

# LLaMA 3.1 8B Q4
SESSION_LLAMA_31_8B_Q4=4
WS_LLAMA_31_8B_Q4=ws://your-cortensor-host:9003

# DeepSeek R1 Distill Llama 8B Q4 (Default)
SESSION_DEEPSEEK_R1_8B_Q4=5
WS_DEEPSEEK_R1_8B_Q4=ws://your-cortensor-host:9004

# LLaMA 3.1 8B Q4 CPU
SESSION_LLAMA_31_8B_Q4_CPU=5
WS_LLAMA_31_8B_Q4_CPU=ws://your-cortensor-host:9004

# -----------------------------------------------------------------------------
# Blockchain/Web3 (Optional)
# -----------------------------------------------------------------------------
NEXT_PUBLIC_SESSION_V2_ADDRESS=your_session_v2_contract_address
NEXT_PUBLIC_SESSION_QUEUE_V2_ADDRESS=your_session_queue_v2_contract_address

# -----------------------------------------------------------------------------
# Legacy External APIs (NOT USED - Replaced by Tavily)
# -----------------------------------------------------------------------------
# These are kept for backward compatibility but no longer used
# The system now uses Tavily AI Search for all external data sources

# NEWS_API_KEY=not_used
# WEATHER_API_KEY=not_used
# ALPHA_VANTAGE_API_KEY=not_used
# GUARDIAN_API_KEY=not_used
# CURRENTS_API_KEY=not_used
# GOOGLE_FACTCHECK_API_KEY=not_used
# COINGECKO_API_KEY=not_used
# FASTFOREX_API_KEY=not_used

# -----------------------------------------------------------------------------
# Notes
# -----------------------------------------------------------------------------
# REQUIRED APIs:
# 1. CORTENSOR_API_KEY - Get from Cortensor Network
# 2. TAVILY_API_KEY - Get from https://tavily.com (Free: 1,000 calls/month)
#
# All other APIs are optional or deprecated.
# The system will work with just Cortensor + Tavily.
#
# Tavily provides:
# - Real-time web search
# - Fact-checking sources
# - High-credibility news
# - Automatic source ranking
# - All in one API call
# =============================================================================
12 changes: 12 additions & 0 deletions apps/Cortensor-AIOracle/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ pnpm-debug.log*
.env.*
!.env.example

# Local data and caches
data/
*.sqlite*
*.db
tmp/

# Editors/IDE
.vscode/
.idea/
.history
.fleet/

# OS
.DS_Store
Thumbs.db
12 changes: 0 additions & 12 deletions apps/Cortensor-AIOracle/RELEASE.md

This file was deleted.

24 changes: 0 additions & 24 deletions apps/Cortensor-AIOracle/STATUS.md

This file was deleted.

1 change: 1 addition & 0 deletions apps/Cortensor-AIOracle/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
2 changes: 1 addition & 1 deletion apps/Cortensor-AIOracle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"highlight.js": "^11.11.1",
"input-otp": "1.4.1",
"lucide-react": "^0.454.0",
"next": "15.2.4",
"next": "16.0.7",
"next-themes": "^0.4.4",
"react": "^19",
"react-dom": "^19",
Expand Down
Loading