Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Apr 5, 2024
1 parent fb21201 commit 14cedf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class HuggingFaceAPITextEmbedder:
```python
from haystack.components.embedders import HuggingFaceAPITextEmbedder
from haystack.utils import Secret
text_embedder = HuggingFaceAPITextEmbedder(api_type="serverless_inference_api",
text_embedder = HuggingFaceAPITextEmbedder(api_type="inference_endpoints",
api_params={"model": "BAAI/bge-small-en-v1.5"},
token=Secret.from_token("<your-api-key>"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from unittest.mock import MagicMock, Mock, patch
from unittest.mock import MagicMock, patch

import pytest
from huggingface_hub import TextGenerationOutputToken, TextGenerationStreamDetails, TextGenerationStreamOutput
from huggingface_hub.utils import RepositoryNotFoundError
from numpy import array, random

from haystack.components.embedders import HuggingFaceAPITextEmbedder
from haystack.dataclasses import StreamingChunk
from haystack.utils.auth import Secret
from haystack.utils.hf import HFEmbeddingAPIType

Expand Down

0 comments on commit 14cedf4

Please sign in to comment.