← Voltar ao Hub

🧪 EXEMPLOS PRÁTICOS - Uso Real

📊 Análise de IA Generativa

ChatGPT/OpenAI

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"asset":"chatgpt"}' | jq
Dados Esperados:

Claude/Anthropic

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"asset":"claude"}' | jq
Dados Esperados:

LangChain

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"asset":"langchain"}' | jq
Dados Esperados:

💰 Análise de Crypto

Bitcoin

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"asset":"bitcoin"}' | jq
Dados CoinGecko:

Ethereum

curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"asset":"ethereum"}' | jq

🎨 Análise Custom

FastAPI (exemplo framework)

curl -X POST http://localhost:8000/api/analyze/custom \
  -H "Content-Type: application/json" \
  -d '{
    "pypi_package": "fastapi",
    "github_owner": "tiangolo",
    "github_repo": "fastapi",
    "subreddit": "FastAPI"
  }' | jq

Seu Próprio Projeto

curl -X POST http://localhost:8000/api/analyze/custom \
  -H "Content-Type: application/json" \
  -d '{
    "github_owner": "seu-usuario",
    "github_repo": "seu-repo",
    "pypi_package": "seu-pacote"
  }' | jq

📈 Comparação

LLMs Battle

curl "http://localhost:8000/api/compare?assets=chatgpt,claude,langchain" | jq
Output esperado:
{
  "comparison": [
    {"asset": "ChatGPT/OpenAI", "bubble_index": 32.4, "risk_level": "Moderado"},
    {"asset": "LangChain", "bubble_index": 28.1, "risk_level": "Baixo"},
    {"asset": "Claude/Anthropic", "bubble_index": 25.7, "risk_level": "Baixo"}
  ]
}

🔍 Ver Presets Disponíveis

curl http://localhost:8000/presets | jq
Output:
{
  "presets": ["chatgpt", "claude", "langchain", "bitcoin", "ethereum", "stable-diffusion"],
  "configs": {
    "chatgpt": {
      "name": "ChatGPT/OpenAI",
      "pypi_package": "openai",
      "github": {"owner": "openai", "repo": "openai-python"},
      "subreddit": "OpenAI",
      "category": "AI/LLM"
    }
  }
}

📊 Interpretando Resultados

Exemplo de Response Completo

{
  "asset": "ChatGPT/OpenAI",
  "category": "AI/LLM",
  "data_sources": {
    "pypi_downloads": 45000000,
    "github_stars": 75000,
    "github_forks": 8000,
    "github_watchers": 50000,
    "reddit_subscribers": 1200000,
    "reddit_active": 5000,
    "google_trends": 45,
    "sentiment": 0.0
  },
  "analysis": {
    "metrics": {
      "adoption": 0.750,    // 75% - Alta adoção real
      "hype": 0.580,        // 58% - Hype moderado
      "investment": 0.700,  // 70% - Alto investimento
      "network": 0.650,     // 65% - Bom efeito de rede
      "feedback": 0.170,    // 17% - Feedback equilibrado
      "divergence": 0.085   // 8.5% - Baixa divergência (bom!)
    },
    "bubble_index": 0.324,
    "bubble_percentage": 32.4,
    "risk": {
      "level": "Moderado",
      "color": "yellow",
      "action": "Monitorar",
      "score": 0.324
    }
  },
  "timestamp": "2024-01-15T10:30:00"
}

Leitura das Métricas

Adoption (0.750 = 75%) Hype (0.580 = 58%) Divergence (0.085 = 8.5%) Bubble Index (32.4%)

🎯 Casos de Uso Reais

1. Due Diligence de Startup

Analisar startup de IA

curl -X POST http://localhost:8000/api/analyze/custom \ -d '{ "github_owner": "startup-xyz", "github_repo": "produto-ai", "pypi_package": "startup-xyz" }'

Se bubble_index > 60%: Red flag

Se divergence > 50%: Hype >> Adoção

2. Portfolio Monitoring

Comparar assets do portfolio

curl "http://localhost:8000/api/compare?assets=bitcoin,ethereum"

Rebalancear se algum > 70%

3. Market Research

Comparar frameworks

curl "http://localhost:8000/api/compare?assets=langchain,stable-diffusion"

Ver qual tem melhor adoção real

4. Timing de Investment

Análise de ChatGPT

curl -X POST ... -d '{"asset":"chatgpt"}'

Decision:

< 30%: Early, bom momento

30-50%: Growth, monitorar

50-70%: Late, cautela

> 70%: Bubble, evitar

🔄 Workflow Completo

1. Ver presets disponíveis

curl localhost:8000/presets

2. Analisar asset de interesse

curl -X POST localhost:8000/api/analyze \ -H "Content-Type: application/json" \ -d '{"asset":"chatgpt"}'

3. Se não está em preset, usar custom

curl -X POST localhost:8000/api/analyze/custom \ -d '{"pypi_package":"nome-pacote"}'

4. Comparar com competitors

curl "localhost:8000/api/compare?assets=asset1,asset2,asset3"

5. Decisão baseada em bubble_index

📱 Frontend Workflow

1. Abrir http://localhost:3000
2. Selecionar ou digitar asset
3. Clicar "Analisar Bolha"
4. Ver:
   - Bubble Index (%)
   - Risk Level
   - 6 Métricas
   - Radar Chart
   - Data Sources
5. Tomar decisão

🎨 Personalizações

Adicionar Novo Asset Preset

Em fetchers.py

ASSET_CONFIGS["meu-framework"] = { "name": "Meu Framework", "pypi_package": "meu-pkg", "npm_package": "meu-pkg-js", "github": {"owner": "user", "repo": "repo"}, "subreddit": "MeuFramework", "category": "AI/Framework" }

Ajustar Pesos das Métricas

Em calculators.py

self.weights = { "divergence": 0.30, # Aumentar importância "investment": 0.25, "network": 0.20, "feedback": 0.25 }

⚡ Performance Tips

Cache (futuro)

Com Redis

@cached(ttl=3600) # 1 hora async def fetch_pypi(package): ...

Batch Analysis

Analisar múltiplos de uma vez

assets = ["chatgpt", "claude", "langchain"] for asset in assets: result = await analyze(asset)

📊 Data Quality

Fontes Confiáveis

Sempre disponíveis:

⚠️ Rate limits:

Fallbacks

Se API falhar:

Retorna default

{"downloads": 0}

Não quebra análise

Métricas usam dados disponíveis

---

Pro Tip: Use frontend para análise visual, API para integração com sistemas.
← Voltar ao Hub de Documentação