POST
/
datasource
/
{datasource_id}
/
rag_config
Python (SDK)
from meibelai import Meibelai
import os


with Meibelai(
    api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER", ""),
) as m_client:

    res = m_client.rag.add_rag_config(datasource_id="<id>", collection_id="<id>", description="unto yippee unknown from", extractor_model={
        "name": "<value>",
        "endpoint": "<value>",
    }, embedding_model={
        "name": "<value>",
        "endpoint": "<value>",
        "dimensions": 107326,
    }, sparse_embedding_model={
        "name": "<value>",
        "endpoint": "<value>",
    }, collect_metadata=True, metadata_options={
        "create_title": True,
        "extract_questions_answers": False,
        "extract_summary": False,
        "has_consumer_content": None,
        "get_bibliographical_information": None,
    })

    # Handle response
    print(res)
{
  "message": "<string>"
}

Authorizations

Meibel-API-Key
string
header
required

Path Parameters

datasource_id
string
required

Body

application/json

AddRagConfigRequest

Response

200
application/json

Successful Response

AddRagConfigResponse