suggest_paragraph

Function suggest_paragraph 

Source
async fn suggest_paragraph(
    pool: Data<PgPool>,
    app_conf: Data<ApplicationConfiguration>,
    user: AuthUser,
    payload: Json<ParagraphSuggestionRequest>,
) -> ControllerResult<Json<ParagraphSuggestionResponse>>
Expand description

POST /api/v0/cms/ai-suggestions/paragraph - Generate AI suggestions for a CMS paragraph.

This endpoint is intended for CMS editors. It requires the user to have edit access to the referenced page when context.page_id is provided, otherwise it falls back to requiring a teaching role for some course via Res::AnyCourse.