Basic Chatting
Learn the fundamentals of interacting with AI using simple, straightforward chat requests.
📋 Table of Contents
The aiChat() Function
aiChat() Function🔄 Request-Response Flow
Signature
Simple Questions
Working with Parameters
Temperature
Max Tokens
Model Selection
Multiple Parameters
Switching Providers
With Custom API Keys
Return Formats
Single (Default)
All Messages
Raw Response
JSON Format (Auto-Parse)
XML Format (Auto-Parse)
Practical Examples
FAQ Bot
Code Explainer
Content Summarizer
Multi-Language Support
Data Extraction with JSON
Form Data Generation
Code Generator
Error Handling
Specific Error Handling
Tips and Best Practices
1. Use Appropriate Temperature
2. Be Specific in Prompts
3. Set Token Limits
4. Choose Right Provider
5. Cache Repeated Requests
Debugging
Log Requests and Responses
Use Raw Format for Debugging
Next Steps
Last updated