langtree.prompting.message_types¶
Module Contents¶
Classes¶
A generic chat message with attributes role and content. |
|
A system message with predefined role as "system" and an attribute content. |
|
An assistant message with predefined role as "assistant" and an attribute content. |
|
A user message with predefined role as "user" and an attribute content. |
|
A function message with attributes role, content, and name. |
- class langtree.prompting.message_types.ChatMessage(role=None, content=None)[source]¶
Bases:
langtree.utils.data.DataA generic chat message with attributes role and content.
- role¶
- content¶
- class langtree.prompting.message_types.SystemMessage(content=None)[source]¶
Bases:
ChatMessageA system message with predefined role as “system” and an attribute content.
- role = 'system'¶
- content¶
- class langtree.prompting.message_types.AssistantMessage(content=None)[source]¶
Bases:
ChatMessageAn assistant message with predefined role as “assistant” and an attribute content.
- role = 'assistant'¶
- content¶
- class langtree.prompting.message_types.UserMessage(content=None)[source]¶
Bases:
ChatMessageA user message with predefined role as “user” and an attribute content.
- role = 'user'¶
- content¶
- class langtree.prompting.message_types.FunctionMessage(content=None)[source]¶
Bases:
ChatMessageA function message with attributes role, content, and name. The role is predefined as “function”.
- role = 'function'¶
- name¶