INNER CODE UNIT · Python

update_documents_in_index

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

async def update_documents_in_index(
    index_name: str,
    request: UpdateDocumentRequest,
):
    start_time = time.perf_counter()
    status = STATUS_FAILURE  # Default status

    try:
        result = await rag_ops.update_documents(
            index_name=index_name, documents=request.documents
        )
        status = STATUS_SUCCESS
        return result
    except HTTPException as http_exc:
        raise http_exc
    except Exception as e:
        logger.error("Update documents failed for '%s'", index_name, exc_info=True)
        raise HTTPException(status_code=500, detail=str(e))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…