utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath(fileName ...string) string

func InitConfig

func InitConfig(fileName string) error

func UserPrompt

func UserPrompt(args []string) string

Types

type AppConf

type AppConf struct {
	LLM    LLM            `yaml:"llm" json:"llm"`
	LLMs   map[string]LLM `yaml:"llms,omitempty" json:"llms,omitempty"`
	Prompt *Prompt
}

func LoadConfig

func LoadConfig(fileName string) (*AppConf, error)

func (*AppConf) PickupModel

func (c *AppConf) PickupModel()

type LLM

type LLM struct {
	Gateway  string `yaml:"gateway,omitempty" json:"gateway,omitempty"`
	ApiKey   string `yaml:"apiKey,omitempty" json:"apiKey,omitempty"`
	Provider string `yaml:"provider" json:"provider"`
	Model    string `yaml:"model" json:"model"`
}

type Prompt

type Prompt struct {
	System        string
	Images        []string
	User          string
	WithUsage     bool
	JsonMode      bool
	OverrideModel string
	OnlyCodeBlock bool
	MCPServers    *mcps.MCPs
}

Jump to

Keyboard shortcuts

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