samu/schematic-drawing
0
1# Backend Development Plan2 3## 1. Category-Based System Instructions4 5- **Goal:** Support system instructions tailored to specific engineering categories (e.g., mechanical, structural, civil, architectural, electrical, aerospace).6- **Approach:**7 - Define a set of system instructions for each category.8 - **Allowed Categories:** 9 - mechanical10 - structural11 - civil12 - architectural13 - electrical14 - aerospace15 - Store these instructions in a configuration file (e.g., JSON or YAML) or a database.16 - Update API endpoints to accept a `category` parameter.17 - Use the selected category in the generation logic to apply corresponding instructions.18 - Provide a fallback to default instructions if the category isn't recognized.19 20## 2. API Changes21 22- **Add `category` field** to relevant request models (e.g., `TextGenerateRequest`, `ImageTextGenerateRequest`).23- **Validate the category** against the allowed values.24- **Pass category** to generation utilities to select appropriate instructions.25- **Logging and Error Handling:**26 - Log usage statistics for different categories.27 - Return clear error messages if an invalid category is provided.28 29## 3. Future Ideas and Enhancements30 31- Allow users to define custom categories or instructions.32- Add endpoints to list available categories along with their descriptions.33- Implement advanced logging and analytics to observe category usage.34- Support multi-category or hybrid instructions.35- **Extend the configuration:**36 - Provide detailed parameters per category (e.g., style, tone, structural guidelines).37 - Create a configuration file to manage these parameters centrally.38- Explore caching mechanisms for repeated generation requests per category.39 40---41 42## Next Steps43 441. Define allowed categories and specify instructions per category.452. Refactor request models and endpoints to include a `category` parameter.463. Update generation logic to utilize category-specific instructions.474. Develop a configuration file for system instructions per category.485. Enhance error handling and logging for better maintainability.49 