Power Guard AI
  1. Getting Started
Power Guard AI
  • Getting Started
    • hello-powerguard (starts here!)
    • ai-controller-guide
    • chat-controller-guide
    • health-controller-guide
    • models-controller-guide
    • usage-controller-guide
  • AI
    • Generate AI responses for form fields
      POST
    • Generate AI text completion
      POST
    • Generate embeddings for input text
      POST
  • Chat
    • Process chat completions
      POST
    • Process chat completions
      POST
  • Health
    • Check API health status
      GET
  • Models
    • List all available models
      GET
    • Get specific model information
      GET
  • Usage
    • Get API usage statistics
      GET
  • Esquemas
    • Schemas
      • CompletionRequest
      • ChatCompletionChoice
      • EmbeddingRequest
      • ChatCompletionFunction
      • FunctionParameters
      • ChatCompletionMessage
      • Message
      • ChatCompletionResponse
      • QuestionModel
      • ChatCompletionToolCall
      • ChatCompletionUsage
      • QuestionRequest
      • QuestionValidationRules
      • Choice
      • Tool
      • ChoiceMessage
      • ToolFunction
      • CompletionResponse
      • DataItem
      • EmbeddingResponse
      • HealthResponseModel
      • ModelCapabilities
      • ModelInfo
      • ResponseModel
      • Role
      • SingleReadOnlyMemory
      • SingleReadOnlySpan
      • Usage
      • UsageModel
  1. Getting Started

chat-controller-guide

๐Ÿ’ฌ 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:
โœ… OpenAI Python SDK
โœ… OpenAI Node.js SDK
โœ… LangChain
โœ… LlamaIndex
โœ… Vercel AI SDK
โœ… Microsoft Semantic Kernel
โœ… Any HTTP client

๐ŸŽ 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

Migration Checklist:
Get your Power Guard API key
Change base URL in your code
Test with a simple request
Enable compliance features as needed
Celebrate - you're now compliant! ๐ŸŽ‰
*Need help migrating? Email us
Modificado emย 2025-07-16 20:18:41
Pรกgina anterior
ai-controller-guide
Prรณxima pรกgina
health-controller-guide
Built with