Documentation ¶
Index ¶
Constants ¶
View Source
const CONTEXT_PREIX = "Context:"
View Source
const FORMAT_STRING = "%s %s\nExplanation: %s\nContent:\n%s"
Variables ¶
View Source
var DEFAULT_FILE_LISTING_CONFIG = FileListingConfig{ ItemConfigBase: ItemConfigBase{ Enabled: true, Priority: 10, }, }
View Source
var DEFAULT_SHELL_CONFIG = ShellConfig{ ItemConfigBase: ItemConfigBase{ Enabled: true, Priority: 11, }, }
Functions ¶
This section is empty.
Types ¶
type FileListing ¶
type FileListing struct {
ItemBase
}
func NewFileListing ¶
func NewFileListing(cfg FileListingConfig) (*FileListing, error)
func (*FileListing) Build ¶
func (f *FileListing) Build() (msg ai.ChatCompletionMessage, err error)
func (FileListing) Name ¶
func (f FileListing) Name() string
type FileListingConfig ¶
type FileListingConfig struct {
ItemConfigBase
}
type Item ¶
type Item interface { // Build returns a ChatCompletionMessage that can be used to send to the AI Build() (ai.ChatCompletionMessage, error) // Name returns the name of the context item Name() string }
Item provides context to the AI in a specific message
type ItemBase ¶
type ItemBase struct { // Name is the name of the context item Name string // Explanation is the explanation of the context item Explanation string // Priority is used to determine the order of the context items // Higher number -> earlier in the request // The position can _slightly_ affet how much attention the AI pays to the context item Priority int // Content is the content of the context item Content string }
GenericItem is a generic context item used for embedding in other structs
type ItemConfigBase ¶
type Shell ¶
type Shell struct {
ItemBase
}
func NewShell ¶
func NewShell(cfg ShellConfig) (*Shell, error)
type ShellConfig ¶
type ShellConfig struct {
ItemConfigBase
}
Click to show internal directories.
Click to hide internal directories.