For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI Conversations

API for managing conversations with AI Experiences.

AiConversationsController#show

GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id

Get a specific conversation by ID (for teachers viewing student conversations)

AiConversationsController#active_conversation

GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations

Get the active conversation for the current user and AI experience

AiConversationsController#create

POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations

Scope: url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations

Initialize a new conversation with the AI experience

AiConversationsController#post_message

POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages

Scope: url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages

Send a message to an existing conversation and get the AI response

Request Parameters:

Parameter
Type
Description

message

Required string

The user's message to send to the AI

AiConversationsController#destroy

DELETE /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id

Scope: url:DELETE|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id

End the current conversation session

AiConversationsController#evaluation

GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation

Fetch the latest stored evaluation for a conversation from the llm-conversation service. Reads only — does not run the LLM and is not rate-limited. evaluation is null when none has been generated yet (llma returns 200 + null, never 404, so this is distinguishable from an outage). stale is true when the AI experience was edited after the stored evaluation was generated.

AiConversationsController#create_evaluation

POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation

Scope: url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation

Run the LLM to (re)generate an evaluation for a conversation and persist it in the llm-conversation service. Rate-limited. Also the Reset path — a fresh run replaces any prior stored evaluation.

AiConversationsController#create_feedback

POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback

Scope: url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback

Submit a like or dislike vote on an AI-generated message.

Ownership: load_conversation gates this action — only the conversation owner or a course manager reaches here. Sub-resource (message_id within the conversation) scoping is delegated to llma.

Request Parameters:

Parameter
Type
Description

vote

Required string

"liked" or "disliked"

message_id

Required string

llm-conversation message UUID

feedback_message

string

optional text for dislike

AiConversationsController#delete_feedback

DELETE /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback/:feedback_id

Scope: url:DELETE|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback/:feedback_id

Remove a previously submitted vote (toggling off like/dislike).

Ownership: load_conversation gates this action — only the conversation owner or a course manager reaches here. Sub-resource (message_id, feedback_id within the conversation) scoping is delegated to llma.


This documentation is generated directly from the Canvas LMS source code, available on Github.

Last updated

Was this helpful?