Expand description
Module implementing prompts and prompt templates.
Contains the prompt!
macro, Prompts and PromptTemplates.
Structs
- The
ChatMessage
struct represents a chat message. It has two fields: - A collection of chat messages with various roles (e.g., user, assistant, system).
- A template for a prompt. This is a string that can be formatted with a set of parameters.
- 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
- The
ChatRole
enum represents the role of a chat message sender in a conversation. - An enum representing either a collection of chat messages or a single text.
Type Aliases
- A chat conversation.
- A chat conversation of string templates.
- A prompt.
- A prompt template.