Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AI ¶
AI is a message formatter that returns an AI message.
func (AI) FormatMessages ¶
FormatMessages formats the message with the values given.
func (AI) InputVariables ¶
InputVariables returns the input variables the prompt expects.
type Generic ¶
Generic is a message formatter that returns message with the specified speaker.
func NewGeneric ¶
NewGeneric creates a new generic message prompt formatter.
func (Generic) FormatMessages ¶
FormatMessages formats the message with the values given.
func (Generic) InputVariables ¶
InputVariables returns the input variables the prompt expects.
type Human ¶
Human is a message formatter that returns a human message.
func (Human) FormatMessages ¶
FormatMessages formats the message with the values given.
func (Human) InputVariables ¶
InputVariables returns the input variables the prompt expects.
type Placeholder ¶
type Placeholder struct {
Variable string
}
Placeholder is a message formatter that returns a placeholder message.
func NewPlaceholder ¶
func NewPlaceholder(variable string) Placeholder
NewPlaceholder creates a new placeholder message prompt formatter.
func (Placeholder) FormatMessages ¶
func (p Placeholder) FormatMessages(values map[string]any) ([]llm.ChatMessage, error)
FormatMessages formats the messages from the values by variable name.
func (Placeholder) InputVariables ¶
func (p Placeholder) InputVariables() []string
InputVariables returns the input variables the prompt expect.
type System ¶
System is a message formatter that returns a system message.
func (System) FormatMessages ¶
FormatMessages formats the message with the values given.
func (System) InputVariables ¶
InputVariables returns the input variables the prompt expects.