๐ฌ Chat Controller Guide#
OpenAI compatible. Easy to integrate. Zero learning curve.
The Chat Controller is compatible with the OpenAI chat completion API. Same interface, same response format, making migration easy and straightforward.๐ฏ When to Use This Controller#
Integrating conversational AI into your applications
Building chatbots with standard chat completion format
Streaming responses for a better user experience
Supporting multiple language models through a single API
Compatibility with OpenAI SDK/libraries you're already using
๐ Endpoints#
POST /chat/completions#
POST /v1/chat/completions#
Both endpoints are identical - use whichever matches your existing code๐ Migration in 30 Seconds#
Using Python OpenAI SDK#
Using LangChain SOON#
Using Node.js OpenAI SDK#
๐ Request Schema#
๐ Response Schema#
๐ Streaming Responses#
๐ง Function Calling#
๐ก๏ธ Compliance Features SOON#
Automatic PII Protection SOON#
Content Filtering SOON#
๐จ Usage Examples#
Basic Chat Bot#
Domain-Specific Assistant SOON#
Multi-turn Conversations#
๐ Response Enhancements#
๐จ Error Handling#
๐ฏ Best Practices#
1. Use System Messages Wisely#
2. Implement Retry Logic#
3. Track Usage Efficiently SOON#
๐ SDK Support#
We're compatible with all major OpenAI SDKs and libraries:โ
Microsoft Semantic Kernel
๐ Pro Tips#
1.
Use streaming for UX: Users love seeing responses appear in real-time
2.
Set user IDs: Better tracking, better compliance
3.
Lower temperature for consistency: Especially for customer-facing bots
4.
Cache system prompts: They don't change often
5.
Monitor finish_reason: Handle length limits gracefully
Modificado emย 2025-07-16 20:18:41