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 ¶ added in v0.0.4
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 ¶ added in v0.0.9
type WhisperPrompt ¶ added in v0.0.3
type WhisperPrompt struct {
// contains filtered or unexported fields
}
func NewPromptFromAudioFile ¶ added in v0.0.3
func NewPromptFromAudioFile(ctx context.Context, filePath string, audioResponseFormat AudioResponseFormat) (*WhisperPrompt, error)
func (*WhisperPrompt) String ¶ added in v0.0.9
func (p *WhisperPrompt) String() string
func (*WhisperPrompt) WithClient ¶ added in v0.0.9
func (p *WhisperPrompt) WithClient(client *openai.Client) *WhisperPrompt
Click to show internal directories.
Click to hide internal directories.