This commit updates several API routes, data store definitions, and related templates for the admin section.
Changes include:
- Refactoring in `admin.py`, `datastores.py`, `evaluations.py`, and `proxy.py`.
- Updates to schema settings and static assets.
- Modifications to various admin templates (`base.html`, `dashboard.html`, etc.).
- Updates to agent management logic (`agentManager.ts`, `extensionState.ts`) and UI components.
Implements Markdown parsing for AI-generated content before PDF export and updates CSS for better inline code styling.
Specifically:
- Updates `app/api/v1/routes/evaluations.py` to use the `markdown` library to convert AI output to HTML for PDF generation, and modifies the template to conditionally render either raw answers or HTML content based on the PDF flag.
- Updates `app/static/css/styles.css` to refine the styling for inline code blocks (`.prose code`) to provide a more modern, high-contrast look.
- Adds `markdown` to `requirements.txt` to support this functionality.
- Integrates `highlight.js` in the frontend to automatically highlight code within the rendered output.
This commit updates the core workflow engine, refactors API routes for administration, evaluation processing, and proxy handling, and updates related agent and template files.
Key changes include:
- Refactoring `workflow_engine.py` to unify workflow execution blocks.
- Updates to API routes (`admin`, `evaluations`, `importer`, `proxy`) to align with new logic.
- Adjustments to agent files (`agent.js`, `agent.py`) and associated templates for improved reporting UI.
- Implement POST/PUT/DELETE endpoints in tools API routes
- Extend ToolsManager with save, update, and delete capabilities
- Add responsive styling fixes for admin panel layout
- Update admin navigation icons in base template
- Enhance bots management UI with improved layout and functionality
- Add image description extraction for multimodal requests in proxy routing
- Update admin models manager with improved template context handling
- Reduce default retry attempts from 5 to 2 for faster failure response
- Fix deep copy issue in playground chat streaming
- Update model metadata CRUD with token pricing improvements
- Enhance admin UI templates and styling for ensembles and routers
- Add encrypted_api_key column to OllamaServer model
- Update migrations for new database schema
- Enhance server CRUD operations to handle encrypted API keys
- Modify instance manager initialization
- Update admin edit server form and help documentation