Supported Models
Supported Models
Section titled “Supported Models”UniCraft supports a wide range of AI models from multiple providers, allowing you to choose the best model for your specific use case.
Model Categories
Section titled “Model Categories”Chat Models
Section titled “Chat Models”Models designed for conversational AI and chat applications.
Completion Models
Section titled “Completion Models”Models for text completion and generation tasks.
Embedding Models
Section titled “Embedding Models”Models for converting text into vector representations.
Multimodal Models
Section titled “Multimodal Models”Models that can process both text and images.
OpenAI Models
Section titled “OpenAI Models”GPT-4 Series
Section titled “GPT-4 Series”- Model ID:
gpt-4 - Context Length: 8,192 tokens
- Best For: Complex reasoning, analysis, creative writing
- Pricing: $0.03/1K input, $0.06/1K output
- Availability: High
GPT-4 Turbo
Section titled “GPT-4 Turbo”- Model ID:
gpt-4-turbo - Context Length: 128,000 tokens
- Best For: Large context tasks, document analysis
- Pricing: $0.01/1K input, $0.03/1K output
- Availability: High
GPT-4 Vision
Section titled “GPT-4 Vision”- Model ID:
gpt-4-vision-preview - Context Length: 128,000 tokens
- Best For: Image analysis, multimodal tasks
- Pricing: $0.01/1K input, $0.03/1K output
- Availability: Medium
GPT-3.5 Series
Section titled “GPT-3.5 Series”GPT-3.5 Turbo
Section titled “GPT-3.5 Turbo”- Model ID:
gpt-3.5-turbo - Context Length: 4,096 tokens
- Best For: General-purpose tasks, cost-effective
- Pricing: $0.001/1K input, $0.002/1K output
- Availability: High
GPT-3.5 Turbo 16K
Section titled “GPT-3.5 Turbo 16K”- Model ID:
gpt-3.5-turbo-16k - Context Length: 16,384 tokens
- Best For: Longer conversations, document processing
- Pricing: $0.003/1K input, $0.004/1K output
- Availability: High
Embedding Models
Section titled “Embedding Models”Text Embedding Ada 002
Section titled “Text Embedding Ada 002”- Model ID:
text-embedding-ada-002 - Dimensions: 1,536
- Best For: General-purpose embeddings
- Pricing: $0.0001/1K tokens
- Availability: High
Text Embedding 3 Small
Section titled “Text Embedding 3 Small”- Model ID:
text-embedding-3-small - Dimensions: 1,536
- Best For: Faster, cost-effective embeddings
- Pricing: $0.00002/1K tokens
- Availability: High
Text Embedding 3 Large
Section titled “Text Embedding 3 Large”- Model ID:
text-embedding-3-large - Dimensions: 3,072
- Best For: High-quality embeddings
- Pricing: $0.00013/1K tokens
- Availability: High
Anthropic Models
Section titled “Anthropic Models”Claude 3 Series
Section titled “Claude 3 Series”Claude 3 Opus
Section titled “Claude 3 Opus”- Model ID:
claude-3-opus-20240229 - Context Length: 200,000 tokens
- Best For: Complex reasoning, analysis, creative tasks
- Pricing: $0.015/1K input, $0.075/1K output
- Availability: High
Claude 3 Sonnet
Section titled “Claude 3 Sonnet”- Model ID:
claude-3-sonnet-20240229 - Context Length: 200,000 tokens
- Best For: Balanced performance and cost
- Pricing: $0.003/1K input, $0.015/1K output
- Availability: High
Claude 3 Haiku
Section titled “Claude 3 Haiku”- Model ID:
claude-3-haiku-20240307 - Context Length: 200,000 tokens
- Best For: Fast, cost-effective responses
- Pricing: $0.00025/1K input, $0.00125/1K output
- Availability: High
Google Models
Section titled “Google Models”Gemini Series
Section titled “Gemini Series”Gemini Pro
Section titled “Gemini Pro”- Model ID:
gemini-pro - Context Length: 32,000 tokens
- Best For: General-purpose tasks, multilingual
- Pricing: $0.0005/1K input, $0.0015/1K output
- Availability: High
Gemini Pro Vision
Section titled “Gemini Pro Vision”- Model ID:
gemini-pro-vision - Context Length: 16,000 tokens
- Best For: Image analysis, multimodal tasks
- Pricing: $0.0005/1K input, $0.0015/1K output
- Availability: Medium
PaLM 2 Series
Section titled “PaLM 2 Series”PaLM 2 Text
Section titled “PaLM 2 Text”- Model ID:
palm-2-text-bison - Context Length: 8,192 tokens
- Best For: Text generation, summarization
- Pricing: $0.0005/1K input, $0.0015/1K output
- Availability: High
PaLM 2 Chat
Section titled “PaLM 2 Chat”- Model ID:
palm-2-chat-bison - Context Length: 8,192 tokens
- Best For: Conversational AI, chat applications
- Pricing: $0.0005/1K input, $0.0015/1K output
- Availability: High
Cohere Models
Section titled “Cohere Models”Command Series
Section titled “Command Series”Command
Section titled “Command”- Model ID:
command - Context Length: 4,096 tokens
- Best For: General-purpose tasks, enterprise use
- Pricing: $0.001/1K input, $0.002/1K output
- Availability: High
Command Light
Section titled “Command Light”- Model ID:
command-light - Context Length: 4,096 tokens
- Best For: Fast, cost-effective responses
- Pricing: $0.0005/1K input, $0.001/1K output
- Availability: High
Embedding Models
Section titled “Embedding Models”Embed English
Section titled “Embed English”- Model ID:
embed-english-v2.0 - Dimensions: 1,024
- Best For: English text embeddings
- Pricing: $0.0001/1K tokens
- Availability: High
Embed Multilingual
Section titled “Embed Multilingual”- Model ID:
embed-multilingual-v2.0 - Dimensions: 1,024
- Best For: Multilingual text embeddings
- Pricing: $0.0001/1K tokens
- Availability: High
Hugging Face Models
Section titled “Hugging Face Models”Llama 2 Series
Section titled “Llama 2 Series”Llama 2 70B Chat
Section titled “Llama 2 70B Chat”- Model ID:
meta-llama/Llama-2-70b-chat-hf - Context Length: 4,096 tokens
- Best For: Open-source alternative, research
- Pricing: Varies
- Availability: Medium
Llama 2 13B Chat
Section titled “Llama 2 13B Chat”- Model ID:
meta-llama/Llama-2-13b-chat-hf - Context Length: 4,096 tokens
- Best For: Balanced performance and cost
- Pricing: Varies
- Availability: High
Llama 2 7B Chat
Section titled “Llama 2 7B Chat”- Model ID:
meta-llama/Llama-2-7b-chat-hf - Context Length: 4,096 tokens
- Best For: Fast, cost-effective responses
- Pricing: Varies
- Availability: High
Mistral Series
Section titled “Mistral Series”Mistral 7B Instruct
Section titled “Mistral 7B Instruct”- Model ID:
mistralai/Mistral-7B-Instruct-v0.1 - Context Length: 8,192 tokens
- Best For: Fast, efficient responses
- Pricing: Varies
- Availability: High
Embedding Models
Section titled “Embedding Models”All-MiniLM-L6-v2
Section titled “All-MiniLM-L6-v2”- Model ID:
sentence-transformers/all-MiniLM-L6-v2 - Dimensions: 384
- Best For: General-purpose embeddings
- Pricing: Varies
- Availability: High
All-mpnet-base-v2
Section titled “All-mpnet-base-v2”- Model ID:
sentence-transformers/all-mpnet-base-v2 - Dimensions: 768
- Best For: High-quality embeddings
- Pricing: Varies
- Availability: High
Model Selection Guide
Section titled “Model Selection Guide”By Use Case
Section titled “By Use Case”Content Generation
Section titled “Content Generation”- Best: GPT-4, Claude 3 Opus
- Good: GPT-3.5 Turbo, Claude 3 Sonnet
- Budget: GPT-3.5 Turbo, Claude 3 Haiku
Code Generation
Section titled “Code Generation”- Best: GPT-4, Claude 3 Opus
- Good: GPT-3.5 Turbo, Claude 3 Sonnet
- Budget: GPT-3.5 Turbo, Claude 3 Haiku
Analysis and Reasoning
Section titled “Analysis and Reasoning”- Best: GPT-4, Claude 3 Opus
- Good: Claude 3 Sonnet, GPT-3.5 Turbo
- Budget: Claude 3 Haiku, GPT-3.5 Turbo
Simple Q&A
Section titled “Simple Q&A”- Best: GPT-3.5 Turbo, Claude 3 Haiku
- Good: Gemini Pro, Command Light
- Budget: GPT-3.5 Turbo, Claude 3 Haiku
Embeddings
Section titled “Embeddings”- Best: Text Embedding 3 Large, All-mpnet-base-v2
- Good: Text Embedding Ada 002, All-MiniLM-L6-v2
- Budget: Text Embedding 3 Small, All-MiniLM-L6-v2
By Cost
Section titled “By Cost”Most Expensive
Section titled “Most Expensive”- GPT-4
- Claude 3 Opus
- GPT-4 Turbo
Most Cost-Effective
Section titled “Most Cost-Effective”- Claude 3 Haiku
- GPT-3.5 Turbo
- Gemini Pro
By Speed
Section titled “By Speed”Fastest
Section titled “Fastest”- Claude 3 Haiku
- GPT-3.5 Turbo
- Command Light
Most Capable
Section titled “Most Capable”- GPT-4
- Claude 3 Opus
- GPT-4 Turbo
Model Configuration
Section titled “Model Configuration”Basic Configuration
Section titled “Basic Configuration”const modelConfig = { model: "gpt-3.5-turbo", temperature: 0.7, max_tokens: 1000, top_p: 0.9,};Advanced Configuration
Section titled “Advanced Configuration”const advancedConfig = { model: "gpt-4", temperature: 0.7, max_tokens: 2000, top_p: 0.9, frequency_penalty: 0.0, presence_penalty: 0.0, stop: ["\n\n", "Human:", "Assistant:"],};Smart Routing Configuration
Section titled “Smart Routing Configuration”const smartRouting = { model: "auto", routing_strategy: "cost_optimized", max_cost_per_request: 0.01, quality_threshold: 0.8, preferred_models: ["gpt-3.5-turbo", "claude-3-haiku"],};Model Testing
Section titled “Model Testing”Test Different Models
Section titled “Test Different Models”const models = ["gpt-3.5-turbo", "claude-3-haiku", "gemini-pro"];const testPrompt = "Explain quantum computing in simple terms";
for (const model of models) { const response = await unicraft.chat.completions.create({ model: model, messages: [{ role: "user", content: testPrompt }], max_tokens: 200, });
console.log(`${model}: ${response.choices[0].message.content}`);}Compare Performance
Section titled “Compare Performance”const performanceTest = async (model, prompt) => { const start = Date.now(); const response = await unicraft.chat.completions.create({ model: model, messages: [{ role: "user", content: prompt }], max_tokens: 100, }); const end = Date.now();
return { model: model, response_time: end - start, cost: response.unicraft.cost, quality: response.unicraft.quality_score, };};Best Practices
Section titled “Best Practices”1. Model Selection
Section titled “1. Model Selection”- Choose models based on your specific use case
- Consider cost vs. quality trade-offs
- Test multiple models before deciding
2. Configuration
Section titled “2. Configuration”- Use appropriate temperature settings
- Set reasonable max_tokens limits
- Configure stop sequences when needed
3. Optimization
Section titled “3. Optimization”- Use smart routing for automatic model selection
- Implement caching for repeated requests
- Monitor costs and performance
4. Monitoring
Section titled “4. Monitoring”- Track model performance metrics
- Monitor costs and usage
- Set up alerts for issues
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”-
Model Not Available
- Check provider configuration
- Verify model availability
- Use alternative models
-
Poor Quality Responses
- Adjust temperature settings
- Improve prompt quality
- Try different models
-
High Costs
- Use cost-effective models
- Optimize prompts
- Implement caching
-
Slow Responses
- Use faster models
- Optimize requests
- Check provider status
Debug Tips
Section titled “Debug Tips”- Test Models: Test different models with your use case
- Monitor Metrics: Track performance and cost metrics
- Optimize Prompts: Improve prompt quality and structure
- Use Smart Routing: Let UniCraft choose the best model
Support
Section titled “Support”For model-related support:
- Documentation: UniCraft Docs
- Model Status: UniCraft Status Page
- Community: UniCraft Community
- Support: support@unicraft.com
Next Steps
Section titled “Next Steps”After selecting models:
- Test Models: Test different models with your use case
- Configure Routing: Set up smart routing rules
- Monitor Performance: Track model performance and costs
- Optimize Usage: Optimize based on performance data
- Scale as Needed: Add more models as needed