Module swiftide_core::indexing_traits
source · Expand description
Traits in Swiftide allow for easy extendability
All steps defined in the indexing pipeline and the generic transformers can also take a trait. To bring your own transformers, models and loaders, all you need to do is implement the trait and it should work out of the box.
Traits§
- Transforms batched single nodes into streams of nodes
- Turns one node into many nodes
- Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.
- Starting point of a stream
- Caches nodes, typically by their path and hash Recommended to namespace on the storage
- Persists nodes
- Given a string prompt, queries an LLM
- Transforms single nodes into single nodes