-
Notifications
You must be signed in to change notification settings - Fork 596
Description
What do you need?
Straico native AI Provider Integration in Deepchat
Platform
Win/macOS/Linux
Is your feature request related to an existing issue?
No, it is a new feature request
Useful resources
Main Page: https://www.straico.com/api
Discord server: https://discord.gg/straico-community-1118690015443161130
API Documentation: https://documenter.getpostman.com/view/5900072/2s9YyzddrR
Obtain API key: https://platform.straico.com/settings-api
- API Base URLs:
- https://api.straico.com/v1
- https://api.straico.com/v2 (for OpenAI-compatible endpoints)
Straico's Model Selection Guide: https://straico.com/multimodel
📨 Contact Straico Team: [email protected]
Why we need it
Straico offers a unified API platform that aggregates multiple AI models and services, providing Deepchat users and Straico community with these key capabilities :
- Chat Completions: Advanced conversational AI with multiple model options
- Model Discovery: Access to multiple AI models through a single API
- Multi-modal capabilities like web search, reasoning, vision, deep research and tool calling
- Image Generation: High-quality image creation from image and text
- TTS via ElevenLabs voices
- Video Generation: Image-to-video synthesis with customizable parameters
- Straico RAG: Create new and chat with RAG systems created on the Straico platform
- Straico Agents: Communicate with agents created on the Straico platform
Desired Solution
Before : No Straico AI provider integration
After : Adds Straico AI as a native AI provider with comprehensive multi-modal AI capabilities
Implementation Strategy:
- Used direct API integration for better control over model selection
- Utilize Straico's official API endpoints, including the v2 family of OpenAI-Compatible endpoints
- Follow RESTful API patterns consistent with other providers
- Implement standardized request/response formats
- Include comprehensive error handling and status code management
- Maintain compatibility with existing Deepchat workflows
- Implemented core features first (chat, images, TTS) followed by RAG/Agents
- Prioritized consistency with existing provider patterns over custom optimizations
Additional Information
Core Endpoints:
- Chat Completions (POST /chat/completions)
- OpenAI Compatible
- Supports multiple AI models
- Streaming and non-streaming responses
- System prompts and conversation history
- Models List (GET /models)
- OpenAI Compatible
- Available model discovery
- Model capability filtering
- Real-time model availability
- Detailed model information (context length, capabilities, etc.)
- Image Generation (POST /images/generation)
- Text-to-image synthesis
- Multiple image sizes and quality options
- Batch generation support
- Ideogram and other advanced model support
- Text-To-Speech (POST /tts/create)
- Input text to speech audio
- ElevenLabs multilingual model
- Voice id through GET tts/elevenlabslist
- Video Generation (POST /image/tovideo)
- Image-to-video
- Custom parameters
- Multiple formats
- RAG Query (POST /rag)
- Context-aware responses
- Knowledge bases
- Real-time retrieval
- RAG Documents (GET /rag/user)
- Browse documents
- Filtering
- Pagination
- Agent Create (POST /agent)
- Create agents
- Configurable roles
- Tool integration
- Agent List (GET /agent)
- List agents
- Filtering
- Real-time status
Authentication:
- Bearer token authentication using API keys
- Secure credential storage following existing patterns
- Error handling for invalid or expired tokens
Error Handling:
- Comprehensive HTTP status code mapping
- Rate limit awareness and retry logic
- Network timeout management
- Graceful degradation when services are unavailable