from meibelai import Meibelai
import os
with Meibelai(
api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER", ""),
) as m_client:
res = m_client.datasources.rag.add_rag_config(datasource_id="<id>", collection_id="<id>", description="which gloomy regarding rosemary provider vivaciously fat willow", extractor_model={
"name": "<value>",
"endpoint": "<value>",
}, embedding_model={
"name": "<value>",
"endpoint": "<value>",
"dimensions": 66789,
}, sparse_embedding_model={
"name": "<value>",
"endpoint": "<value>",
}, collect_metadata=False, metadata_options={
"create_title": None,
"extract_questions_answers": False,
"extract_summary": True,
"has_consumer_content": True,
"get_bibliographical_information": False,
})
# Handle response
print(res)