rig
rig copied to clipboard
Completion docs for review
1. Architecture Documentation (mod.rs)
Added:
- ASCII diagram showing abstraction layers
- Clear explanation of Prompt, Chat, and Completion traits
- "When to use" guidance for each abstraction level
- Provider-agnostic design examples
Impact: Developers now understand the system architecture at a glance.
2. Common Patterns Section (All Files)
Added to mod.rs:
- Error handling with retry logic
- Streaming responses
- Building conversation history
- Exponential backoff examples
Added to message.rs:
- Building conversation history
- Multimodal messages (text + images)
- Working with tool results
- Performance tips
Impact: Real-world usage patterns are now documented.
3. Troubleshooting Guide (message.rs)
Added:
- "Media type required" error solutions
- Provider capability table
- Large image handling tips
- Builder pattern common mistakes
- Compile_fail examples showing wrong approaches
I have removed those markdown files