Spaces:
Paused
Paused
| title: Multi-Models | |
| emoji: 🤖 | |
| colorFrom: yellow | |
| colorTo: purple | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| short_description: API Multi-Modal - Chat, Visão, Embeddings, Classificação | |
| # 🤖 DGGirl API v4 - Multi-Modal | |
| API compatível com OpenAI para uso no **n8n** e outras integrações. | |
| ## 🎯 Endpoints Disponíveis | |
| | Endpoint | Método | Descrição | | |
| |----------|--------|-----------| | |
| | `/v1/chat/completions` | POST | Chat inteligente + Análise de imagens | | |
| | `/v1/embeddings` | POST | Vetores semânticos (RAG) | | |
| | `/v1/classify` | POST | Classificação zero-shot | | |
| | `/v1/summarize` | POST | Resumir textos | | |
| | `/v1/sentiment` | POST | Análise de sentimento | | |
| | `/v1/models` | GET | Listar modelos | | |
| | `/health` | GET | Status da API | | |
| ## 🧠 Modelos Utilizados | |
| - **Chat**: `LiquidAI/LFM2-8B-A1B` - Rápido e versátil | |
| - **Visão**: `google/gemma-3-27b-it` - Análise de imagens | |
| - **Embeddings**: `BAAI/bge-m3` - Vetores multilíngue | |
| - **Classificação**: `facebook/bart-large-mnli` - Zero-shot | |
| - **Sumarização**: `facebook/bart-large-cnn` | |
| - **Sentimento**: `cardiffnlp/twitter-roberta-base-sentiment-latest` | |
| ## 📋 Exemplos de Uso | |
| ### Chat | |
| ```bash | |
| curl -X POST "https://SEU-SPACE.hf.space/v1/chat/completions" \ | |
| -H "Authorization: Bearer SEU_TOKEN" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"messages": [{"role": "user", "content": "Olá!"}]}' | |
| ``` | |
| ### Classificar Intenção | |
| ```bash | |
| curl -X POST "https://SEU-SPACE.hf.space/v1/classify" \ | |
| -H "Authorization: Bearer SEU_TOKEN" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"text": "Quero cancelar meu pedido", "labels": ["pedido", "cancelamento", "dúvida"]}' | |
| ``` | |
| ### Análise de Sentimento | |
| ```bash | |
| curl -X POST "https://SEU-SPACE.hf.space/v1/sentiment" \ | |
| -H "Authorization: Bearer SEU_TOKEN" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"text": "Estou muito satisfeito com o atendimento!"}' | |
| ``` | |
| ## ⚙️ Configuração | |
| Defina as variáveis de ambiente no Space: | |
| - `HF_TOKEN`: Seu token do Hugging Face | |
| - `API_KEY`: (Opcional) Chave de API personalizada | |
| ## 📚 Documentação | |
| Acesse `/docs` para a documentação Swagger interativa. | |