Expand description
What a chatbot request says about the course material page the learner has open.
Structs§
- Chatbot
Page Context - What the learner has open when they send a message.
Constants§
- PAGE_
CONTEXT_ 🔒RESPONSE_ ID - Stands in for the Azure response id of a page context message, which we write ourselves and
which therefore has no Azure response behind it. The
not_null_for_llm_generated_messagescheck constraint demands one for every message that is not from the user; the initial assistant message of a conversation stands in for it the same way.
Functions§
- insert_
page_ context_ message_ if_ changed - Records what the learner is looking at as a developer message in the conversation, so that it survives a history rebuild instead of being prepended in memory on every request.
- page_
context_ 🔒message - page_
context_ 🔒text - Describes the learner’s place in the course to the model. Parts that could not be resolved are left out rather than named as unknown.
- resolve_
page_ context - The page the learner claims to have open, or
Nonewhen nothing about it may be shown to the model.