Crate ragit

Source

Re-exports§

pub use chunk::Chunk;
pub use chunk::ChunkBuildInfo;
pub use chunk::ChunkSource;
pub use chunk::merge_and_convert_chunks;

Modules§

chunk
schema
Ragit uses json to interact with the world. This module defines json schema of ragit objects. Some objects are valid json schema by themselves. For example, a chunk is just a json file. There’s no need to define a new schema for it. So it’s just a type alias: type ChunkSchema = Chunk;. There’s a Prettify trait, which makes ragit needlessly complex. Please read the doc of the trait.

Structs§

AddResult
ApiConfig
Audit
BuildConfig
Index
This is a knowledge-base itself. I am trying my best to define a method for each command.
Keywords
MergeResult
MultiTurnSchema
Ragit supports multi-turn conversations. Since the pipeline can handle only 1 query at a time, a multi-turn conversation has to be rephrased into a single query. Ragit uses a prompt to do that. This struct is a result of the prompt. If is_query is set, the rephrasing is successful and you can find the query in query. Otherwise, the last turn of the conversation is not a query.
ProcessedDoc
It stores term-frequency of each chunk.
QueryConfig
QueryResponse
QueryTurn
RecoverResult
RemoveResult
TfidfResult
Uid
Each chunk, image and file has uid.
UidQueryConfig
UidQueryResult
VersionInfo

Enums§

AddMode
Error
IIStatus
LoadMode
If you want to do something with chunks, use LoadMode::QuickCheck.If you have nothing to do with chunks, use LoadMode::OnlyJson.If something’s broken and you don’t want it to crash, use LoadMode::Minimum. It can still crash, though.If you want to be very sure that nothing’s broken and you don’t care about init-time, use LoadMode::Check.
MergeMode

Constants§

API_CONFIG_FILE_NAME
ARCHIVE_DIR_NAME
BUILD_CONFIG_FILE_NAME
CHUNK_DIR_NAME
CONFIG_DIR_NAME
FILE_INDEX_DIR_NAME
II_DIR_NAME
IMAGE_DIR_NAME
INDEX_DIR_NAME
INDEX_FILE_NAME
LOG_DIR_NAME
METADATA_FILE_NAME
MODEL_FILE_NAME
PROMPT_DIR_NAME
QUERY_CONFIG_FILE_NAME
VERSION

Functions§

get_compatibility_warning