repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | |
| #2 | from unittest.mock import patch |
| #3 | |
| #4 | from embedchain.config import BaseEmbedderConfig |
| #5 | from embedchain.embedder.huggingface import HuggingFaceEmbedder |
| #6 | |
| #7 | |
| #8 | def test_huggingface_embedder_with_model(monkeypatch): |
| #9 | config = BaseEmbedderConfig(model="test-model", model_kwargs={"param": "value"}) |
| #10 | with patch('embedchain.embedder.huggingface.HuggingFaceEmbeddings') as mock_embeddings: |
| #11 | embedder = HuggingFaceEmbedder(config=config) |
| #12 | assert embedder.config.model == "test-model" |
| #13 | assert embedder.config.model_kwargs == {"param": "value"} |
| #14 | mock_embeddings.assert_called_once_with( |
| #15 | model_name="test-model", |
| #16 | model_kwargs={"param": "value"} |
| #17 | ) |
| #18 | |
| #19 | |
| #20 |