Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate config for preprocessing config on kb create #67

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions minds/knowledge_bases/knowledge_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class KnowledgeBaseConfig(BaseModel):
description: str
vector_store_config: Optional[VectorStoreConfig] = None
embedding_config: Optional[EmbeddingConfig] = None
preprocessing_config: Optional[PreprocessingConfig] = None
# Params to apply to retrieval pipeline.
params: Optional[Dict] = None

Expand Down Expand Up @@ -129,6 +130,8 @@ def create(self, config: KnowledgeBaseConfig) -> KnowledgeBase:
if config.embedding_config.params is not None:
embedding_data.update(config.embedding_config.params)
create_request['embedding_model'] = embedding_data
if config.preprocessing_config is not None:
create_request['preprocessing'] = config.preprocessing_config.model_dump()
if config.params is not None:
create_request['params'] = config.params

Expand Down
Loading