prompt

package
v0.0.8-beta2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 9 Imported by: 0

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

View Source
var (
	ErrFormatting     = errors.New("formatting prompt error")
	ErrDecoding       = errors.New("decoding input error")
	ErrTemplateEngine = errors.New("template engine error")
)

Functions

func New

func New(text string) *prompt

func NewPromptFromAudioFile added in v0.0.3

func NewPromptFromAudioFile(ctx context.Context, filePath string, audioResponseFormat AudioResponseFormat) (*whisperPrompt, error)

func NewPromptTemplate

func NewPromptTemplate(text string) *template

Types

type AudioResponseFormat added in v0.0.4

type AudioResponseFormat string
const (
	AudioResponseFormatText AudioResponseFormat = ""
	AudioResponseFormatJSON AudioResponseFormat = "json"
	AudioResponseFormatSRT  AudioResponseFormat = "srt"
	AudioResponseFormatVTT  AudioResponseFormat = "vtt"
)

Jump to

Keyboard shortcuts

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