INNER CODE UNIT · Python

persist_index

kaito-project/kaito · presets/ragengine/main.py:713

async def persist_index(
    index_name: str,
    path: str = Query(
        DEFAULT_VECTOR_DB_PERSIST_DIR,
        description="Path where the index will be persisted",
    ),
):
    start_time = time.perf_counter()
    status = STATUS_FAILURE  # Default status

    try:
        # Append index to save path to prevent saving conflicts/overwriting
        path = (
            os.path.join(path, index_name)
            if path == DEFAULT_VECTOR_DB_PERSIST_DIR
            else path
        )
        path = resolve_storage_path(path)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…