Example of response object model : { "name": "promptname", "schema": { "type":…
- User
User: Example of response object model :
{"name": "prompt_name", "schema": { "type": "string", "code": { "prompt": { "task_name": "task name", "description": "generated description",
"dependencies": [ "generated description as array of instructions for tasks", ], "status": "pending", "isImport": false, } } } }
User: Api function model : exports.apiName = async () => {...}
User: Tasks: instructions to create a product Schema using mongoose , fields: name, descriptions, insertDate, updateDate, stocks, availablity, countTotal product, , save company name as company_name, id refrences from Company schema, export as Product variable Generate dependencies for the listed tasks and provide a JSON response in the following structure:
Response Format: JSON.
Assistant:
- Assistant
Here is a JSON response structure that defines the tasks with dependencies for creating a product schema using Mongoose, as per your requirements:
{ "name": "create_product_schema", "schema": { "type": "string", "code": { "prompt": { "task_name": "Create a Product Schema", "description": "Instructions to create a Mongoose schema for products.", "dependencies": [ "Define the Mongoose schema for Product with the following fields:", "1. name: String", "2. description: String", "3. insertDate: Date", "4. updateDate: Date", "5. stocks: Number", "6. availability: Boolean", "7. countTotal: Number", "8. company_name: Reference to Company schema", "Ensure that 'company_name' field is an ID reference from the Company schema.", "Export the schema as 'Product'.", "Make sure to include validation and default values where necessary.", "Use proper Mongoose methods for saving the schema." ], "status": "pending", "isImport": false } } } }