ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConversationIcon = "# "
	TokenIcon        = "T "
	HelpIcon         = "? "
	PromptIcon       = "> "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InputMode

type InputMode int
const (
	InputModelSingleLine InputMode = iota
	InputModelMultiLine
)

type KeyMapConfig

type KeyMapConfig struct {
	SwitchMultiline      []string
	Submit               []string
	Help                 []string
	Quit                 []string
	CopyLastAnswer       []string
	PreviousQuestion     []string
	NextQuestion         []string
	NewConversation      []string
	ForgetContext        []string
	RemoveConversation   []string
	PreviousConversation []string
	NextConversation     []string
	ScrollUp             []string
	ScrollDown           []string
}

Add this struct definition

type LLM

type LLM interface {
	GenerateResponse(question string) (string, error)
}

type Model

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

func InitialModel

func InitialModel(llm LLM, keyMapConfig KeyMapConfig) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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