Example of response object model : { "name": "promptname", "schema": { "type":…
- User
User: Example of response object model :
code{"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 api functions for user Login , accept user email, password, username , validate user , save data in to User db to check user , send response to user with inserted user details , read the response user schema to help create api Generate dependencies for the listed tasks and provide a JSON response in the following structure:
Response Format: JSON.
Assistant:
- Assistant
Sure! Below is a JSON response that organizes the tasks into dependencies based on your requirements for creating an API function for user login. Each task has been converted into an array of instructions.
json{ "name": "user_login", "schema": { "type": "string", "code": { "prompt": { "task_name": "User Login API Function", "description": "This function handles user login by accepting user credentials, validating them, saving data, and responding with user details.", "dependencies": [ "Accept user email, password, and username from the request.", "Validate the user's credentials against the database.", "Check if the user exists in the User database.", "If the user is valid, save user session or token for authentication.", "Send a response back to the user with the inserted user details.", "Log any errors and handle exceptions where necessary." ], "status": "pending", "isImport": false } } } }