builder / docs /USER_GUIDE.md
mgbam's picture
Update docs/USER_GUIDE.md
1b987e4 verified

A newer version of the Gradio SDK is available: 5.42.0

Upgrade

User Guide

Sidebar

  • Model: Select among HF, OpenAI, Gemini, Groq, and Fireworks models.
  • Input: Describe your app or paste code/text.
  • Generate: Click to invoke the AI pipeline.

Tabs

  • Code: View generated code (editable).
  • Preview: Live HTML preview (for web outputs).
  • History: Conversation log with assistant.

Files & Plugins

  • Upload reference files (PDF, DOCX, images) for extraction.
  • Use Plugins to integrate GitHub, Slack, DB queries, etc.

<!-- docs/API_REFERENCE.md -->

# API Reference

## `models.py`

### `ModelInfo`
- `name: str`  
- `id: str`  
- `description: str`  
- `default_provider: str`

### `find_model(identifier: str) -> Optional[ModelInfo]`

## `inference.py`

### `chat_completion(model_id, messages, provider=None, max_tokens=4096) -> str`

### `stream_chat_completion(model_id, messages, provider=None, max_tokens=4096) -> Generator[str]`

---

```markdown
<!-- docs/ARCHITECTURE.md -->

# Architecture

user
└─> Gradio UI ──> app.py
β”œβ”€> models.py (registry)
β”œβ”€> inference.py (routing)
β”œβ”€> hf_client.py (clients)
β”œβ”€> plugins.py (extension)
└─> deploy.py (HF Spaces)

markdown
Copy
Edit

- **Data flow**: UI β†’ `generation_code` β†’ `inference.chat_completion` β†’ HF/OpenAI/Gemini/Groq β†’ UI  
- **Extensibility**: Add new models in `models.py`; add providers in `hf_client.py`; add integrations via `plugins/`  

---

That covers all test suites, CI config, and core docs. Let me know if you’d like any adjustments!