prompt

package
v0.0.0-...-7716eb3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Items = []list.Item{
	OpenaiModelItem(openai.GPT432K0314),
	OpenaiModelItem(openai.GPT432K),
	OpenaiModelItem(openai.GPT40314),
	OpenaiModelItem(openai.GPT4),
	OpenaiModelItem(openai.GPT3Dot5Turbo0301),
	OpenaiModelItem(openai.GPT3Dot5Turbo),
}

Functions

func ConvertItemToString

func ConvertItemToString(item list.Item) string

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func InitializeModel

func InitializeModel(req *model.GenerateRequest) *Model

func (*Model) Init

func (pm *Model) Init() tea.Cmd

func (*Model) Update

func (pm *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (pm *Model) View() string
type NavigationStep int
const (
	Goals NavigationStep = iota
	Language
	LanguageVersion
	OutputPath
	OpenaiApiKey
	OpenaiModel
	Loading
	End
)
type Navigator struct {
	CurrentStep NavigationStep
}

func NewNavigator

func NewNavigator(pm *Model) *Navigator
func (n *Navigator) Current(pm *Model) NavigationStep
func (n *Navigator) Next(pm *Model) NavigationStep

type OpenaiModelInputModel

type OpenaiModelInputModel struct {
	Input list.Model
}

func NewOpenaiModelInputModel

func NewOpenaiModelInputModel() OpenaiModelInputModel

func (*OpenaiModelInputModel) Init

func (m *OpenaiModelInputModel) Init()

func (*OpenaiModelInputModel) Update

func (m *OpenaiModelInputModel) Update(pm *Model, msg tea.Msg) (tea.Model, tea.Cmd)

func (*OpenaiModelInputModel) View

func (m *OpenaiModelInputModel) View() string

type OpenaiModelItem

type OpenaiModelItem string

func (OpenaiModelItem) FilterValue

func (i OpenaiModelItem) FilterValue() string

type OutputPathInputModel

type OutputPathInputModel struct {
	Input            textinput.Model
	DetectedLanguage *data.Language
}

func NewOutputPathInputModel

func NewOutputPathInputModel() OutputPathInputModel

func (*OutputPathInputModel) Init

func (m *OutputPathInputModel) Init()

func (*OutputPathInputModel) Update

func (m *OutputPathInputModel) Update(pm *Model, msg tea.Msg) (tea.Model, tea.Cmd)

func (*OutputPathInputModel) View

func (m *OutputPathInputModel) View() string

Jump to

Keyboard shortcuts

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