Skip to main content
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

collection_id
string
required
description
string | null
extractor_model
object | null

ExtractorModel

embedding_model
object | null

EmbeddingModel

sparse_embedding_model
object | null

SparseEmbeddingModel

collect_metadata
boolean | null
default:false
metadata_options
object | null

MetadataOptions

Response

Successful Response

AddRagConfigResponse

message
string
required
I