Documentation
¶
Index ¶
- func GetOptions(c *Controller, icon []byte, assets embed.FS) *options.App
- type AssetMeta
- type Controller
- func (c *Controller) AppMounted()
- func (c *Controller) GetApplicationConfig() config.Config
- func (c *Controller) GetAssetMeta(path string) (AssetMeta, error)
- func (c *Controller) GetLastState() string
- func (c *Controller) IsAppMounted() bool
- func (c *Controller) LLMAsk(args LLMAskArgs) (result string, err error)
- func (c *Controller) LLMInterrupt() (err error)
- func (c *Controller) LLMWait() (result string, err error)
- func (c *Controller) Log(level string, jsonArgs string)
- func (c *Controller) OpenFileDialog(args OpenFileDialogArgs) ([]string, error)
- func (c *Controller) Restart(state string)
- func (c *Controller) Shutdown()
- func (c *Controller) TriggerRestart()
- type LLMAskArgs
- type LLMMessage
- type LLMMessageContentPart
- type LLMMessageContentPartType
- type LLMMessages
- type OpenFileDialogArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOptions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func BuildFromConfig ¶
func BuildFromConfig(cfg *config.Config, lastState string) (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) GetAssetMeta ¶ added in v0.6.0
func (c *Controller) GetAssetMeta(path string) (AssetMeta, error)
func (*Controller) GetLastState ¶ added in v0.9.0
func (c *Controller) GetLastState() string
func (*Controller) IsAppMounted ¶ added in v0.9.0
func (c *Controller) IsAppMounted() bool
func (*Controller) LLMAsk ¶
func (c *Controller) LLMAsk(args LLMAskArgs) (result string, err error)
func (*Controller) LLMInterrupt ¶
func (c *Controller) LLMInterrupt() (err error)
func (*Controller) LLMWait ¶ added in v0.3.0
func (c *Controller) LLMWait() (result string, err error)
func (*Controller) Log ¶ added in v0.8.0
func (c *Controller) Log(level string, jsonArgs string)
func (*Controller) OpenFileDialog ¶ added in v0.5.0
func (c *Controller) OpenFileDialog(args OpenFileDialogArgs) ([]string, error)
func (*Controller) Restart ¶ added in v0.9.0
func (c *Controller) Restart(state string)
func (*Controller) Shutdown ¶ added in v0.8.0
func (c *Controller) Shutdown()
func (*Controller) TriggerRestart ¶ added in v0.9.0
func (c *Controller) TriggerRestart()
type LLMAskArgs ¶
type LLMAskArgs struct {
History LLMMessages
}
type LLMMessage ¶
type LLMMessage struct {
Role string
ContentParts []LLMMessageContentPart
}
type LLMMessageContentPart ¶ added in v0.5.0
type LLMMessageContentPart struct {
Type LLMMessageContentPartType
Content string
}
type LLMMessageContentPartType ¶ added in v0.5.0
type LLMMessageContentPartType string
const ( LLMMessageContentPartTypeAttachment LLMMessageContentPartType = "attachment" LLMMessageContentPartTypeText LLMMessageContentPartType = "text" )
type LLMMessages ¶
type LLMMessages []LLMMessage
func (LLMMessages) ToMessageContent ¶
func (m LLMMessages) ToMessageContent(systemPrompt string) ([]llms.MessageContent, error)
type OpenFileDialogArgs ¶ added in v0.5.0
type OpenFileDialogArgs struct {
Title string
}
Click to show internal directories.
Click to hide internal directories.