Advanced Chatting
Master advanced AI interaction techniques including multi-turn conversations, AI tools, async operations, and streaming responses.
📋 Table of Contents
💬 Multi-Message Conversations
🔄 Conversation Flow
Conversation Arrays
Message Roles
Building Conversations Dynamically
Conversation Manager
🛠️ AI Tools
Creating Tools
Using Tools
Multiple Tools
Tool Examples
Message Builder
Basic Usage
Chaining Messages
Reusable Templates
Async Chat Requests
Basic Async
With Callbacks
Multiple Concurrent Requests
Timeout Handling
Multimodal Content
Images
Using Image URLs
Embedding Local Images
Multiple Images
Detail Levels
Audio
Video
Documents and PDFs
Mixed Multimodal
Provider Support Matrix
Feature
OpenAI
Claude
Gemini
Ollama
File Size Guidelines
Streaming Responses
Basic Streaming
With Parameters
Collecting Stream Data
Web Streaming Example
Markdown Streaming Parser
Structured Data with JSON and XML
JSON Return Format for Complex Data
Multi-Turn Conversation with JSON
JSON with Tools
Structured Output
Why Structured Output?
Using Classes
Using Struct Templates
Multi-Turn Conversations with Structured Output
Extracting Arrays
Multiple Schemas (Extract Different Types)
With Tools
Structured Output vs JSON Return Format
Feature
Structured Output
JSON Return Format
Learn More
XML Return Format for Documents
XML Report Generation
Async JSON Requests
Streaming with JSON Accumulation
Practical Examples
Interactive Chat Application
Smart Document Analyzer
Real-Time Code Assistant
Best Practices
Next Steps
Last updated