Prompts
Upsert a prompt entry.
Creates a new prompt if the provided id does not exist, or updates the existing prompt with the given id.
Args: request (Prompt): The prompt data to insert or update. db (AsyncSession): The database session dependency.
Returns: JSONResponse: A JSON response containing the prompt data that was upserted.
Raises: HTTPException: If the operation encounters an unexpected error (not currently implemented, but can be added for error handling).
Notes: - Uses FastCRUD for abstracted DB operations. - Relies on the id field to determine insert vs update.
- : Read Permissions
Prompt model.
Successful Response
Validation Error
No content
Read multiple PromptModel rows from the database.
Use page & itemsPerPage for paginated results
Use offset & limit for specific ranges
Returns paginated response when using page/itemsPerPage
Returns simple list response when using offset/limit
- : Read Permissions
Offset for unpaginated queries
Limit for unpaginated queries
Page number
Number of items per page
Successful Response
Validation Error
Create a new PromptModel row in the database.
- : Read Permissions
Create Prompt model.
Successful Response
Validation Error
No content
Read a single PromptModel row from the database by its primary keys: ['id'].
- : Read Permissions
Successful Response
Validation Error
Delete a PromptModel row from the database by its primary keys: ['id'].
- : Read Permissions
Successful Response
Validation Error
No content
Update an existing PromptModel row in the database by its primary keys: ['id'].
- : Read Permissions
Create Prompt model.
Successful Response
Validation Error
No content
Last updated
