Documentation ¶
Overview ¶
Package sillybot implements the common code used by both discord-bot and slack-bot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig []byte
Default configuration with well known models and sane presets.
Functions ¶
Types ¶
type Config ¶
type Config struct { Bot struct { LLM llm.Options ImageGen imagegen.Options `yaml:"image_gen"` Settings Settings } KnownLLMs []llm.KnownLLM }
Config defines the configuration format.
func (*Config) LoadOrDefault ¶
LoadOrDefault loads a config or write the default to disk.
type Settings ¶
type Settings struct { // PromptSystem is the default system prompt to use. Is a Go template as // documented at https://pkg.go.dev/text/template. Values provided by LLM are: // - Now: current time in ISO-8601, including the server's time zone. // - Model: the model name. PromptSystem string `yaml:"prompt_system"` // PromptLabels is the prompt used to generate meme labels via a short // description. PromptLabels string `yaml:"prompt_labels"` // PromptImage is the prompt used to generate an image via a short // description. PromptImage string `yaml:"prompt_image"` }
Settings is the bot settings.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
discord-bot
Silly bot to chat with.
|
Silly bot to chat with. |
slack-bot
Silly bot to chat with.
|
Silly bot to chat with. |
Package huggingface is the best library to fetch files from an huggingface repository.
|
Package huggingface is the best library to fetch files from an huggingface repository. |
Package imagegen runs an image generator.
|
Package imagegen runs an image generator. |
Package internal contains various random shared code.
|
Package internal contains various random shared code. |
Package llm runs a LLM locally via llama.cpp, llamafile, or with a python server.
|
Package llm runs a LLM locally via llama.cpp, llamafile, or with a python server. |
tools
Package tools contains structures to generate function calls, tool calling from LLMs.
|
Package tools contains structures to generate function calls, tool calling from LLMs. |
Package py manages the python backends.
|
Package py manages the python backends. |
Click to show internal directories.
Click to hide internal directories.