πMessage Context
π Table of Contents
π Overview
π Using Context with aiChat()
Without Placeholder
π Using Context with AiMessage
Fluent API
Set Entire Context
Access Context
With System Messages
π Using Context with Runnable Pipelines
Direct Model Invocation
Pipeline with Context
With AiMessage in Pipelines
π€ Using Context with Agents
Basic Agent with Context
Agent with RAG Context
Agent Streaming with Context
π‘ Common Use Cases
1. RAG (Retrieval Augmented Generation)
2. Secure Multi-Tenant Application
3. Contextual Customer Support with Agent
β
Best Practices
1. Don't Send Sensitive Data to AI
2. Keep Context Lightweight
3. Use Typed Context Keys
π Related Documentation
Last updated