Skip to content

Commit

Permalink
separate config for preprocessing config on kb create
Browse files Browse the repository at this point in the history
  • Loading branch information
dusvyat committed Dec 12, 2024
1 parent bbfbf5d commit ecd5cfb
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit ecd5cfb

Please sign in to comment.