Module traits

Source
Expand description

Common traits for common behaviour, re-exported from indexing and query

Modules§

__mock_MockAnswer
__mock_MockAnswer_Answer
__mock_MockAnswer_Clone
__mock_MockBatchableTransformer
__mock_MockBatchableTransformer_BatchableTransformer
__mock_MockBatchableTransformer_Clone
__mock_MockChunkerTransformer
__mock_MockChunkerTransformer_ChunkerTransformer
__mock_MockChunkerTransformer_Clone
__mock_MockEmbeddingModel
__mock_MockEmbeddingModel_Clone
__mock_MockEmbeddingModel_EmbeddingModel
__mock_MockEvaluateQuery
__mock_MockEvaluateQuery_Clone
__mock_MockEvaluateQuery_EvaluateQuery
__mock_MockLoader
__mock_MockLoader_Clone
__mock_MockLoader_Loader
__mock_MockNodeCache
__mock_MockNodeCache_Clone
__mock_MockNodeCache_NodeCache
__mock_MockPersist
__mock_MockPersist_Clone
__mock_MockPersist_Persist
__mock_MockSimplePrompt
__mock_MockSimplePrompt_Clone
__mock_MockSimplePrompt_SimplePrompt
__mock_MockSparseEmbeddingModel
__mock_MockSparseEmbeddingModel_Clone
__mock_MockSparseEmbeddingModel_SparseEmbeddingModel
__mock_MockTransformQuery
__mock_MockTransformQuery_Clone
__mock_MockTransformQuery_TransformQuery
__mock_MockTransformResponse
__mock_MockTransformResponse_Clone
__mock_MockTransformResponse_TransformResponse
__mock_MockTransformer
__mock_MockTransformer_Clone
__mock_MockTransformer_Transformer

Structs§

CommandOutput
Output from a Command
MockAnswer
MockBatchableTransformer
MockChunkerTransformer
MockEmbeddingModel
MockEvaluateQuery
MockLoader
MockNodeCache
MockPersist
MockSimplePrompt
MockSparseEmbeddingModel
MockTransformQuery
MockTransformResponse
MockTransformer

Enums§

Command
Commands that can be executed by the executor Conceptually, Shell allows any kind of input, and other commands enable more optimized implementations.
CommandError
ToolFeedback
Feedback that can be given on a tool, i.e. with a human in the loop

Traits§

AgentContext
Acts as the interface to the external world and manages messages for completion
Answer
Can answer the original query
BatchableTransformer
Transforms batched single nodes into streams of nodes
ChatCompletion
ChunkerTransformer
Turns one node into many nodes
DynClone
This trait is implemented by any type that implements [std::clone::Clone].
EmbeddingModel
Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.
EvaluateQuery
Evaluates a query
Loader
Starting point of a stream
MessageHistory
A backend for the agent context. A default is provided for Arc<Mutex<Vec>>
NodeCache
Caches nodes, typically by their path and hash Recommended to namespace on the storage
Persist
Persists nodes
Retrieve
Can retrieve documents given a SearchStrategy
SearchStrategy
A search strategy for the query pipeline
SimplePrompt
Given a string prompt, queries an LLM
SparseEmbeddingModel
Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.
Tool
The Tool trait is the main interface for chat completion and agent tools.
ToolBox
A toolbox is a collection of tools
ToolExecutor
A tool executor that can be used within an AgentContext
TransformQuery
Can transform queries before retrieval
TransformResponse
Can transform a response after retrieval
Transformer
Transforms single nodes into single nodes
WithBatchIndexingDefaults
Allows for passing defaults from the pipeline to the batch transformer Required for batch transformers as at least a marker, implementation is not required
WithIndexingDefaults
Allows for passing defaults from the pipeline to the transformer Required for batch transformers as at least a marker, implementation is not required

Type Aliases§

ChatCompletionStream