Skip to content

Chat Interface

The UniCraft chat interface provides an interactive way to test and experiment with different AI models and routing configurations.

The chat interface allows you to:

  • Test Models: Try different AI models interactively
  • Compare Responses: See how different providers respond to the same prompt
  • Debug Routing: Understand how UniCraft routes your requests
  • Experiment: Test new prompts and configurations safely
  1. Navigate to Playground in the sidebar
  2. Select Chat Interface tab
  3. Choose your configuration:
    • Model selection (auto, specific model, or custom routing)
    • Provider preferences
    • Response parameters
  1. Enter your message in the input field
  2. Click Send or press Enter
  3. View the response and routing information
  4. Review metadata including:
    • Provider used
    • Model selected
    • Response time
    • Token usage
    • Cost information

Choose how UniCraft selects models:

  • Auto: Let UniCraft choose the best model
  • Specific Model: Force a particular model (e.g., gpt-4, claude-3-sonnet)
  • Provider Only: Use any model from a specific provider
  • Custom Rules: Define your own selection criteria

Customize response parameters:

  • Temperature: Control randomness (0.0 to 2.0)
  • Max Tokens: Limit response length
  • Top P: Nucleus sampling parameter
  • Frequency Penalty: Reduce repetition
  • Presence Penalty: Encourage new topics
  • Save Conversations: Store important chat sessions
  • Export Chats: Download conversations as JSON or text
  • Share Links: Generate shareable links to conversations
  • Search History: Find previous conversations quickly
  1. Start Simple: Begin with basic prompts
  2. Test Edge Cases: Try unusual or complex requests
  3. Compare Providers: Test the same prompt across different providers
  4. Monitor Costs: Keep track of token usage and costs
  1. Be Specific: Provide clear, detailed instructions
  2. Use Examples: Include examples in your prompts
  3. Iterate: Refine prompts based on responses
  4. Document: Save successful prompt patterns
  1. Measure Response Times: Compare speed across providers
  2. Test Reliability: Check for consistent responses
  3. Monitor Quality: Evaluate response quality and relevance
  4. Cost Analysis: Compare costs across different models
  • Check provider status
  • Verify API keys are valid
  • Ensure sufficient credits/quota
  • Check network connectivity
  • Try different providers
  • Reduce max_tokens parameter
  • Check provider status pages
  • Consider using faster models
  • Adjust temperature setting
  • Refine your prompt
  • Try different models
  • Use more specific instructions

The chat interface provides detailed debug information:

  • Request Details: Full request parameters
  • Response Metadata: Provider, model, timing, costs
  • Error Information: Detailed error messages and suggestions
  • Routing Decision: Why a particular model was chosen

Use the chat interface to:

  • Test API Calls: Verify your integration works correctly
  • Debug Issues: Identify problems with your requests
  • Optimize Parameters: Find the best settings for your use case
  • Validate Responses: Ensure responses meet your requirements
  1. Prototype in Chat: Test ideas quickly in the interface
  2. Refine Prompts: Iterate on prompt design
  3. Test Edge Cases: Identify potential issues
  4. Implement in Code: Use successful patterns in your application