rig icon indicating copy to clipboard operation
rig copied to clipboard

Completion docs for review

Open hghalebi opened this issue 2 months ago • 1 comments

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

hghalebi avatar Oct 02 '25 08:10 hghalebi

I have removed those markdown files

hghalebi avatar Oct 16 '25 12:10 hghalebi