mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-26 01:06:27 +02:00
use model_name in embedding
This commit is contained in:
parent
db26406b95
commit
5f1ca3ca7e
2 changed files with 3 additions and 3 deletions
|
|
@ -89,9 +89,9 @@ class RAGEmbeddingFactory(GenericFactory):
|
|||
return OllamaEmbedding(**params)
|
||||
|
||||
def _try_set_model_and_batch_size(self, params: dict):
|
||||
"""Set the model and embed_batch_size only when they are specified."""
|
||||
"""Set the model_name and embed_batch_size only when they are specified."""
|
||||
if config.embedding.model:
|
||||
params["model"] = config.embedding.model
|
||||
params["model_name"] = config.embedding.model
|
||||
|
||||
if config.embedding.embed_batch_size:
|
||||
params["embed_batch_size"] = config.embedding.embed_batch_size
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class TestRAGEmbeddingFactory:
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"model, embed_batch_size, expected_params",
|
||||
[("test_model", 100, {"model": "test_model", "embed_batch_size": 100}), (None, None, {})],
|
||||
[("test_model", 100, {"model_name": "test_model", "embed_batch_size": 100}), (None, None, {})],
|
||||
)
|
||||
def test_try_set_model_and_batch_size(self, mock_config, model, embed_batch_size, expected_params):
|
||||
# Mock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue