prompts

package
v0.0.0-...-9a0c461 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssistantMessageTemplate

func AssistantMessageTemplate(template string) llmcomposer.MessageTemplate

func MessagesPlaceholder

func MessagesPlaceholder(variableName string) llmcomposer.MessageTemplate

func SystemMessageTemplate

func SystemMessageTemplate(template string) llmcomposer.MessageTemplate

func UserMessageTemplate

func UserMessageTemplate(template string) llmcomposer.MessageTemplate

Types

type Chat

Chat is a prompt that can be used with Chat style LLMs. It will format a list of messages, each with a role and a prompt.

func (Chat) Format

func (t Chat) Format(values ...llmcomposer.Values) string

func (Chat) Messages

func (t Chat) Messages(values llmcomposer.Values) []llmcomposer.MessageTemplate

type HistoryMessagesTemplate

type HistoryMessagesTemplate string

func (HistoryMessagesTemplate) Format

func (t HistoryMessagesTemplate) Format(values ...llmcomposer.Values) string

func (HistoryMessagesTemplate) Messages

type String

type String string

String allows you to use a string as a prompt.

func (String) Format

func (s String) Format(...llmcomposer.Values) string

type Template

type Template string

Template is a prompt that can be used to format a string with variables. It uses a simple template syntax, where variables are enclosed in curly braces.

func (Template) Format

func (t Template) Format(values ...llmcomposer.Values) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL