-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
428 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from .bedrock import BedrockEmbeddings | ||
from .google import GoogleGenerativeAIEmbeddings | ||
from .huggingface import HuggingFaceEmbeddings | ||
from .ollama import OllamaEmbeddings | ||
from .openai import OpenAIEmbeddings | ||
|
||
__all__ = [ | ||
"BedrockEmbeddings", | ||
"GoogleGenerativeAIEmbeddings", | ||
"HuggingFaceEmbeddings", | ||
"OllamaEmbeddings", | ||
"OpenAIEmbeddings", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from langchain_community.embeddings import ( | ||
HuggingFaceEmbeddings as LangchainHuggingFaceEmbeddings, | ||
) | ||
|
||
from ..core import BaseEmbeddings | ||
|
||
|
||
class HuggingFaceEmbeddings(LangchainHuggingFaceEmbeddings, BaseEmbeddings): | ||
def __init__( | ||
self, | ||
*, | ||
model_name: str = "sentence-transformers/all-MiniLM-L6-v2", | ||
**kwargs, | ||
) -> None: | ||
super().__init__( | ||
model_name=model_name, | ||
**kwargs, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.