| <!-- docs/USER_GUIDE.md --> |
| |
| # 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. |
| |
| --- |
| |
| ```markdown |
| <!-- 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! |