Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDocumentTransformers(filetype string) (transformers []types.DocumentTransformer)
- func GetTransformer(name string) (types.DocumentTransformer, error)
- type ExtraMetadata
- type FilterMarkdownDocsNoContent
- type GenericTransformer
- type KeywordExtractor
- type MetadataManipulation
- type MetadataManipulationOperator
- type MetadataManipulator
Constants ¶
View Source
const ExtraMetadataName = "extra_metadata"
View Source
const FilterMarkdownDocsNoContentName = "filter_markdown_docs_no_content"
View Source
const KeywordExtractorName = "keywords"
View Source
const MetadataManipulatorName = "metadata"
Variables ¶
View Source
var TransformerMap = map[string]types.DocumentTransformer{ ExtraMetadataName: &ExtraMetadata{}, FilterMarkdownDocsNoContentName: &FilterMarkdownDocsNoContent{}, KeywordExtractorName: &KeywordExtractor{}, MetadataManipulatorName: &MetadataManipulator{}, }
Functions ¶
func DefaultDocumentTransformers ¶
func DefaultDocumentTransformers(filetype string) (transformers []types.DocumentTransformer)
func GetTransformer ¶
func GetTransformer(name string) (types.DocumentTransformer, error)
Types ¶
type ExtraMetadata ¶
func (*ExtraMetadata) Name ¶ added in v0.1.9
func (e *ExtraMetadata) Name() string
type FilterMarkdownDocsNoContent ¶
type FilterMarkdownDocsNoContent struct{}
FilterMarkdownDocsNoContent filters out Markdown documents with no content or only headings
TODO: this may be moved into the MarkdownTextSplitter
func (*FilterMarkdownDocsNoContent) Name ¶ added in v0.1.9
func (f *FilterMarkdownDocsNoContent) Name() string
type GenericTransformer ¶
type KeywordExtractor ¶
func NewKeyWordExtractor ¶
func NewKeyWordExtractor(numKeywords int, llm llm.LLM) *KeywordExtractor
func (*KeywordExtractor) Name ¶ added in v0.1.9
func (k *KeywordExtractor) Name() string
type MetadataManipulation ¶ added in v0.4.12
type MetadataManipulation struct { Operator MetadataManipulationOperator `json:"operator,omitempty" mapstructure:"operator"` Key string `json:"key,omitempty" mapstructure:"key"` Value any `json:"value,omitempty" mapstructure:"value"` }
type MetadataManipulationOperator ¶ added in v0.4.12
type MetadataManipulationOperator string
const ( MetadataManipulationOperatorAdd MetadataManipulationOperator = "add" MetadataManipulationOperatorUpdate MetadataManipulationOperator = "upsert" MetadataManipulationOperatorRemove MetadataManipulationOperator = "remove" )
type MetadataManipulator ¶ added in v0.4.12
type MetadataManipulator struct {
Manipulations []MetadataManipulation
}
func (*MetadataManipulator) Name ¶ added in v0.4.12
func (m *MetadataManipulator) Name() string
Click to show internal directories.
Click to hide internal directories.