Documentation ¶
Index ¶
- Variables
- func GetBlueprint(name string) ([]byte, error)
- type DocumentLoaderConfig
- type FlowConfig
- type FlowConfigEntry
- type FlowConfigEntryGlobalOpts
- type FlowConfigGlobalsIngestion
- type GenericBaseConfig
- type IngestionFlowConfig
- type QueryModifierConfig
- type RetrievalFlowConfig
- type RetrieverConfig
- type TextSplitterConfig
- type TransformerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var BlueprintContext []byte
View Source
var BlueprintDefault []byte
View Source
var Blueprints = map[string][]byte{ "default": BlueprintDefault, "context": BlueprintContext, }
Functions ¶
func GetBlueprint ¶ added in v0.4.9
Types ¶
type DocumentLoaderConfig ¶
type DocumentLoaderConfig struct {
GenericBaseConfig
}
type FlowConfig ¶
type FlowConfig struct { Flows map[string]FlowConfigEntry `json:"flows" yaml:"flows" mapstructure:"flows"` Datasets map[string]string `json:"datasets,omitempty" yaml:"datasets" mapstructure:"datasets"` }
func FromBlueprint ¶ added in v0.4.9
func FromBlueprint(name string) (*FlowConfig, error)
func FromBytes ¶ added in v0.4.9
func FromBytes(content []byte) (*FlowConfig, error)
func FromFile ¶
func FromFile(filename string) (*FlowConfig, error)
FromFile reads a configuration file and returns a FlowConfig.
func Load ¶ added in v0.4.9
func Load(reference string) (*FlowConfig, error)
func (*FlowConfig) ForDataset ¶
func (f *FlowConfig) ForDataset(name string) (*FlowConfigEntry, error)
func (*FlowConfig) GetDefaultFlowConfigEntry ¶
func (f *FlowConfig) GetDefaultFlowConfigEntry() (*FlowConfigEntry, error)
func (*FlowConfig) GetFlow ¶
func (f *FlowConfig) GetFlow(name string) (*FlowConfigEntry, error)
func (*FlowConfig) Validate ¶
func (f *FlowConfig) Validate() error
type FlowConfigEntry ¶
type FlowConfigEntry struct { Default bool `json:"default,omitempty" yaml:"default" mapstructure:"default"` Globals FlowConfigEntryGlobalOpts `json:"globals,omitempty" yaml:"globals" mapstructure:"globals"` Ingestion []IngestionFlowConfig `json:"ingestion,omitempty" yaml:"ingestion" mapstructure:"ingestion"` Retrieval *RetrievalFlowConfig `json:"retrieval,omitempty" yaml:"retrieval" mapstructure:"retrieval"` }
type FlowConfigEntryGlobalOpts ¶ added in v0.4.8
type FlowConfigEntryGlobalOpts struct {
Ingestion FlowConfigGlobalsIngestion `json:"ingestion,omitempty" yaml:"ingestion" mapstructure:"ingestion"`
}
type FlowConfigGlobalsIngestion ¶ added in v0.4.8
type GenericBaseConfig ¶
type IngestionFlowConfig ¶
type IngestionFlowConfig struct { Filetypes []string `json:"filetypes" yaml:"filetypes" mapstructure:"filetypes"` DocumentLoader DocumentLoaderConfig `json:"documentLoader,omitempty" yaml:"documentLoader" mapstructure:"documentLoader"` TextSplitter TextSplitterConfig `json:"textSplitter,omitempty" yaml:"textSplitter" mapstructure:"textSplitter"` Transformers []TransformerConfig `json:"transformers,omitempty" yaml:"transformers" mapstructure:"transformers"` }
func (*IngestionFlowConfig) AsIngestionFlow ¶
func (i *IngestionFlowConfig) AsIngestionFlow(globals *FlowConfigGlobalsIngestion) (*flows.IngestionFlow, error)
AsIngestionFlow converts an IngestionFlowConfig to an actual flows.IngestionFlow.
type QueryModifierConfig ¶
type QueryModifierConfig struct {
GenericBaseConfig
}
type RetrievalFlowConfig ¶
type RetrievalFlowConfig struct { // QueryModifiers allows to modify the input query before it is passed to the retriever. (Query-Rewriting) QueryModifiers []QueryModifierConfig `json:"queryModifiers,omitempty" yaml:"queryModifiers" mapstructure:"queryModifiers"` // Retriever is the configuration for the retriever to be used. E.g. instead of using a naive retriever, you can use a recursive or refining retriever. Retriever *RetrieverConfig `json:"retriever,omitempty" yaml:"retriever" mapstructure:"retriever"` // Postprocessors are used to process the retrieved documents before they are returned. This may include stripping metadata or re-ranking. Postprocessors []TransformerConfig `json:"postprocessors,omitempty" yaml:"postprocessors" mapstructure:"postprocessors"` }
func (*RetrievalFlowConfig) AsRetrievalFlow ¶
func (r *RetrievalFlowConfig) AsRetrievalFlow() (*flows.RetrievalFlow, error)
type RetrieverConfig ¶
type RetrieverConfig struct {
GenericBaseConfig
}
type TextSplitterConfig ¶
type TextSplitterConfig struct {
GenericBaseConfig
}
type TransformerConfig ¶
type TransformerConfig struct {
GenericBaseConfig
}
Click to show internal directories.
Click to hide internal directories.