Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

feat: model: Optional[str] = None

莘权 马cd8bd2821668
diff --git a/metagpt/tools/libs/index_repo.py b/metagpt/tools/libs/index_repo.py
index a3efa6d27..1501b8e28 100644
--- a/metagpt/tools/libs/index_repo.py
+++ b/metagpt/tools/libs/index_repo.py
@@ -29,7 +29,7 @@ class IndexRepo(BaseModel):
filename: str
root_path: str
fingerprint_filename: str = "fingerprint.json"
- model: str = "text-embedding-ada-002"
+ model: Optional[str] = None
min_token_count: int = 5000
max_token_count: int = 100000
recall_count: int = 5
@@ -95,7 +95,8 @@ class IndexRepo(BaseModel):
"""
if not self.embedding:
config = Config.default()
- config.embedding.model = self.model
+ if self.model:
+ config.embedding.model = self.model
factory = RAGEmbeddingFactory(config)
self.embedding = factory.get_rag_embedding()