Skip to main content

Module message_suggestion

Module message_suggestion 

Source

Structs§

ChatbotNextMessageSuggestionResponse 🔒
Shape of the structured LLM output response, defined by the JSONSchema in response_format

Constants§

RECENT_MESSAGES_IN_PROMPT 🔒
How much of the transcript the suggestion prompt carries. A suggestion only answers the recent thread, so a long conversation does not pay to send all of it.
RESPONSE_FORMAT_NAME
Names this feature’s structured output to Azure. The test-mode mock Azure API picks its canned answer for this feature by this name.
SYSTEM_PROMPT 🔒
System prompt instructions for generating suggested next messages
USER_PROMPT
User prompt instructions for generating suggested next messages

Functions§

create_conversation_from_msgs 🔒
Take ChatbotConversationMessages from a list until no more fit into the token budget. Transcribe the conversation’s messages’ content into a string.
create_msg_string 🔒
generate_suggested_messages
Calls an LLM and generates suggested messages for a chatbot conversation
response_format 🔒
The structured output format the suggestion LLM is asked to answer in. Must stay in sync with ChatbotNextMessageSuggestionResponse.