Expand description
Module implementing prompts and prompt templates.
Contains the prompt!
macro, Prompts and PromptTemplates.
Structs§
- Chat
Message - The
ChatMessage
struct represents a chat message. It has two fields: - Chat
Message Collection - A collection of chat messages with various roles (e.g., user, assistant, system).
- String
Template - A template for a prompt. This is a string that can be formatted with a set of parameters.
- String
Template Error - An error that can occur when formatting a prompt template. This is a wrapper around the underlying error type, as the underlying error type doesn’t have a stable API.
Enums§
- Chat
Role - The
ChatRole
enum represents the role of a chat message sender in a conversation. - Data
- An enum representing either a collection of chat messages or a single text.
Type Aliases§
- Conversation
- A chat conversation.
- Conversation
Template - A chat conversation of string templates.
- Prompt
- A prompt.
- Prompt
Template - A prompt template.