Documentation
¶
Overview ¶
Package prompt provides a easy way to format a prompt using the Go template engine. Prompts are defined using a template string and a list of inputs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AudioResponseFormat ¶
type AudioResponseFormat string
const ( AudioResponseFormatText AudioResponseFormat = "" AudioResponseFormatJSON AudioResponseFormat = "json" AudioResponseFormatSRT AudioResponseFormat = "srt" AudioResponseFormatVTT AudioResponseFormat = "vtt" )
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func NewPromptTemplate ¶
func (*Template) Format ¶
Format formats the prompt using the template engine and the provided inputs.
func (*Template) WithInputs ¶
type WhisperPrompt ¶
type WhisperPrompt struct {
// contains filtered or unexported fields
}
func NewPromptFromAudioFile ¶
func NewPromptFromAudioFile( ctx context.Context, filePath string, audioResponseFormat AudioResponseFormat, ) (*WhisperPrompt, error)
func (*WhisperPrompt) String ¶
func (p *WhisperPrompt) String() string
func (*WhisperPrompt) WithClient ¶
func (p *WhisperPrompt) WithClient(client *openai.Client) *WhisperPrompt
Click to show internal directories.
Click to hide internal directories.