controller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOptions

func GetOptions(c *Controller, icon []byte, assets embed.FS) *options.App

Types

type Controller

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

func BuildFromConfig

func BuildFromConfig(cfg *config.Config) (ctrl *Controller, err error)

func (*Controller) AppMounted

func (c *Controller) AppMounted()

AppMounted is called when the frontend application is mounted (decided by the frontend itself)

func (*Controller) GetApplicationConfig

func (c *Controller) GetApplicationConfig() config.Config

func (*Controller) LLMAsk

func (c *Controller) LLMAsk(args LLMAskArgs) (string, error)

func (*Controller) LLMInterrupt

func (c *Controller) LLMInterrupt() (err error)

type LLMAskArgs

type LLMAskArgs struct {
	History LLMMessages
}

type LLMMessage

type LLMMessage struct {
	Role    string
	Content string
}

type LLMMessages

type LLMMessages []LLMMessage

func (LLMMessages) ToMessageContent

func (m LLMMessages) ToMessageContent(systemPrompt string) []llms.MessageContent

Jump to

Keyboard shortcuts

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