mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
feat: model: Optional[str] = None
This commit is contained in:
parent
d5c29a16ad
commit
cd8bd28216
1 changed files with 3 additions and 2 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue