-
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
5 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from .bedrock import BedrockEmbeddings | ||
from .ollama import OllamaEmbeddings | ||
from .openai import OpenAIEmbeddings | ||
|
||
__all__ = [ | ||
"BedrockEmbeddings", | ||
"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,19 @@ | ||
from langchain_community.embeddings import ( | ||
BedrockEmbeddings as LangchainBedrockEmbeddings, | ||
) | ||
|
||
|
||
from ..core import BaseEmbeddings | ||
|
||
|
||
class BedrockEmbeddings(LangchainBedrockEmbeddings, BaseEmbeddings): | ||
def __init__( | ||
self, | ||
*, | ||
model_id: str = "amazon.titan-embed-text-v1", | ||
**kwargs, | ||
) -> None: | ||
super().__init__( | ||
model_id=model_id, | ||
**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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ def __init__( | |
) -> None: | ||
super().__init__( | ||
model=model, | ||
**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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from .bedrock_chat import BedrockChat | ||
from .chat_ollama import ChatOllama | ||
from .chat_openai import ChatOpenAI | ||
|
||
__all__ = [ | ||
"BedrockChat", | ||
"ChatOllama", | ||
"ChatOpenAI", | ||
] |
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,19 @@ | ||
from langchain_community.chat_models import BedrockChat as LangchainBedrockChat | ||
|
||
from ..core import BaseChatModel | ||
|
||
|
||
class BedrockChat(LangchainBedrockChat, BaseChatModel): | ||
def __init__( | ||
self, | ||
*, | ||
model_id: str, | ||
**kwargs, | ||
) -> None: | ||
super().__init__( | ||
model_id=model_id, | ||
**kwargs, | ||
) | ||
|
||
def supports_functions(self) -> bool: | ||
return False |