Documentation ¶
Index ¶
- Constants
- type ChannelName
- type Chat
- type Chatter
- type Fabric
- func (o *Fabric) CopyToClipboard(message string) (err error)
- func (o *Fabric) CreateOutputFile(message string, fileName string) (err error)
- func (o *Fabric) GetChatter(model string, stream bool, dryRun bool) (ret *Chatter, err error)
- func (o *Fabric) SaveEnvFile() (err error)
- func (o *Fabric) Setup() (err error)
- func (o *Fabric) SetupDefaultModel() (err error)
- func (o *Fabric) SetupVendors() (err error)
- type PatternsLoader
- type VendorsManager
- type VendorsModels
- func (o *VendorsModels) AddError(err error)
- func (o *VendorsModels) AddVendorModels(vendor string, models []string)
- func (o *VendorsModels) FindVendorsByModel(model string) (vendors []string)
- func (o *VendorsModels) FindVendorsByModelFirst(model string) (ret string)
- func (o *VendorsModels) GetVendorAndModelByModelIndex(modelIndex int) (vendor string, model string)
- func (o *VendorsModels) GetVendorModels(vendor string) (models []string)
- func (o *VendorsModels) HasVendor(vendor string) (ret bool)
- func (o *VendorsModels) Print()
- func (o *VendorsModels) PrintVendor(vendor string, modelIndex int) (currentModelIndex int)
Constants ¶
View Source
const DefaultPatternsGitRepoFolder = "patterns"
View Source
const DefaultPatternsGitRepoUrl = "https://github.com/danielmiessler/fabric.git"
View Source
const NoSessionPatternUserMessages = "no session, pattern or user messages provided"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelName ¶
type ChannelName struct {
// contains filtered or unexported fields
}
type Chat ¶
type Chatter ¶
func (*Chatter) NewChat ¶
func (o *Chatter) NewChat(request *common.ChatRequest) (ret *Chat, err error)
func (*Chatter) Send ¶
func (o *Chatter) Send(request *common.ChatRequest, opts *common.ChatOptions) (message string, err error)
type Fabric ¶
type Fabric struct { *common.Configurable *VendorsManager VendorsAll *VendorsManager *PatternsLoader *youtube.YouTube Jina *jina.Client Db *db.Db DefaultVendor *common.Setting DefaultModel *common.SetupQuestion }
func NewFabricBase ¶
NewFabricBase Create a new Fabric from a list of already configured VendorsController
func NewFabricForSetup ¶
func (*Fabric) CopyToClipboard ¶
func (*Fabric) CreateOutputFile ¶
func (*Fabric) GetChatter ¶
func (*Fabric) SaveEnvFile ¶
func (*Fabric) SetupDefaultModel ¶
func (*Fabric) SetupVendors ¶
type PatternsLoader ¶
type PatternsLoader struct { *common.Configurable Patterns *db.Patterns DefaultGitRepoUrl *common.SetupQuestion DefaultFolder *common.SetupQuestion // contains filtered or unexported fields }
func NewPatternsLoader ¶
func NewPatternsLoader(patterns *db.Patterns) (ret *PatternsLoader)
func (*PatternsLoader) PersistPatterns ¶
func (o *PatternsLoader) PersistPatterns() (err error)
PersistPatterns copies custom patterns to the updated patterns directory
func (*PatternsLoader) PopulateDB ¶
func (o *PatternsLoader) PopulateDB() (err error)
PopulateDB downloads patterns from the internet and populates the patterns folder
type VendorsManager ¶
type VendorsManager struct { Vendors map[string]vendors.Vendor Models *VendorsModels }
func NewVendorsManager ¶
func NewVendorsManager() *VendorsManager
func (*VendorsManager) AddVendors ¶
func (o *VendorsManager) AddVendors(vendors ...vendors.Vendor)
func (*VendorsManager) FindByName ¶
func (o *VendorsManager) FindByName(name string) vendors.Vendor
func (*VendorsManager) GetModels ¶
func (o *VendorsManager) GetModels() *VendorsModels
func (*VendorsManager) HasVendors ¶
func (o *VendorsManager) HasVendors() bool
type VendorsModels ¶
func NewVendorsModels ¶
func NewVendorsModels() *VendorsModels
func (*VendorsModels) AddError ¶
func (o *VendorsModels) AddError(err error)
func (*VendorsModels) AddVendorModels ¶
func (o *VendorsModels) AddVendorModels(vendor string, models []string)
func (*VendorsModels) FindVendorsByModel ¶
func (o *VendorsModels) FindVendorsByModel(model string) (vendors []string)
func (*VendorsModels) FindVendorsByModelFirst ¶
func (o *VendorsModels) FindVendorsByModelFirst(model string) (ret string)
func (*VendorsModels) GetVendorAndModelByModelIndex ¶
func (o *VendorsModels) GetVendorAndModelByModelIndex(modelIndex int) (vendor string, model string)
func (*VendorsModels) GetVendorModels ¶
func (o *VendorsModels) GetVendorModels(vendor string) (models []string)
func (*VendorsModels) HasVendor ¶
func (o *VendorsModels) HasVendor(vendor string) (ret bool)
func (*VendorsModels) Print ¶
func (o *VendorsModels) Print()
func (*VendorsModels) PrintVendor ¶
func (o *VendorsModels) PrintVendor(vendor string, modelIndex int) (currentModelIndex int)
Click to show internal directories.
Click to hide internal directories.