Skip to content

feat: Polymarket + DeepSeek Integration v70 - #7

Draft
Alien69Flow wants to merge 1 commit into
mainfrom
feature/polymarket-deepsink-v70
Draft

feat: Polymarket + DeepSeek Integration v70#7
Alien69Flow wants to merge 1 commit into
mainfrom
feature/polymarket-deepsink-v70

Conversation

@Alien69Flow

Copy link
Copy Markdown
Owner

🎯 AiTor v70 - Polymarket + DeepSeek

✅ Completed from Lovable's Plan

Task Status
Globe layers (OWM, NASA, satellites, outages) ✅ Done
Conflict layer with emoji ✅ Done
Infrastructure layers ✅ Done
Polymarket multi-outcome NEW
DeepSeek integration NEW

🏛️ Polymarket Integration

Hook: usePolymarket

const { markets, categories, isLoading, getTopMarkets } = usePolymarket();

Features:

  • Multi-outcome markets (not just YES/NO)
  • Each outcome shows:
    • Probability (0-1)
    • Price
    • Payout odds
    • Volume
    • Liquidity
  • Category filtering (Crypto, Politics, Science, Tech, Economics)
  • Search by question
  • Sparkline data for price history
  • Affiliate links (ai-tor affiliate ID)

Data Sources:

  • Gamma API: https://gamma-api.polymarket.com
  • Mock data for development

🤖 DeepSeek Integration

Models Added:

Model ID Description
DeepSeek V3 deepseek/deepseek-chat Fast, general purpose
DeepSeek R1 deepseek/deepseek-reasoner Advanced reasoning, math

Configuration:

Add to Supabase Secrets:

DEEPSEEK_API_KEY = your_deepseek_api_key

Edge Function:

  • routeToDeepSeek() function in chat edge function
  • System prompt injection works
  • Streaming support

📊 Chat Model Selector

DeepSeek models now appear in the oracle selector:

  • 🌊 DeepSeek V3 - Fast, reasoning
  • 🧠 DeepSeek R1 - Advanced math/code

🔧 Technical Details

Files Changed:

  • src/hooks/usePolymarket.ts (NEW - 500+ lines)
  • src/hooks/useDeepSeek.ts (NEW - 200+ lines)
  • src/lib/ai-models.ts (updated)
  • supabase/functions/chat/index.ts (DeepSeek routing)

Environment Variables:

DEEPSEEK_API_KEY  # Add to Supabase Secrets

📋 Next Steps

  1. Merge PR feat: Polymarket + DeepSeek Integration v70 #7
  2. Add to Supabase Secrets: DEEPSEEK_API_KEY
  3. Deploy: supabase functions deploy chat
  4. Test DeepSeek models in chat

🧪 Testing

Polymarket:

const { markets, getTopMarkets } = usePolymarket();
console.log(getTopMarkets(5)); // Top 5 by volume

DeepSeek:

  1. Open chat
  2. Click oracle selector
  3. Select "DeepSeek V3" or "DeepSeek R1"
  4. Send message

"Bless Financial Freedom for the Free Earth"
ΔlieπFlΦw $pac€ DAO | AiTor v70 🚀

@Alien69Flow can click here to continue refining the PR

POLYMARKET INTEGRATION:
- usePolymarket hook for multi-outcome markets
- Support for YES/NO + multi-outcome markets
- Volume, liquidity, probability per outcome
- Category filtering and search
- Affiliate link support
- Mock data for development

DEEPSEEK INTEGRATION:
- Added DeepSeek V3 and R1 models to AI_MODELS
- RouteToDeepSeek function in chat edge function
- useDeepSeek hook for direct API calls
- Environment variable: DEEPSEEK_API_KEY

CHAT EDGE FUNCTION:
- Added DEEPSEEK_MODELS to allowed models
- DeepSeek routing with system prompt injection
- Stream support for DeepSeek API

CONFIGURATION:
- Add DEEPSEEK_API_KEY to Supabase Secrets
- Models marked as available: true

Co-authored-by: openhands <openhands@all-hands.dev>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-tor Error Error Aug 11, 2026 5:11pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants