mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
1055b9a309
- **Description:** Implement ZhipuAIEmbeddings interface, include: - The `embed_query` method - The `embed_documents` method refer to [ZhipuAI Embedding-2](https://open.bigmodel.cn/dev/api#text_embedding) --------- Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
88 lines
2.4 KiB
Python
88 lines
2.4 KiB
Python
from langchain_community.embeddings import __all__, _module_lookup
|
|
|
|
EXPECTED_ALL = [
|
|
"ClovaEmbeddings",
|
|
"OpenAIEmbeddings",
|
|
"AnyscaleEmbeddings",
|
|
"AzureOpenAIEmbeddings",
|
|
"BaichuanTextEmbeddings",
|
|
"ClarifaiEmbeddings",
|
|
"CohereEmbeddings",
|
|
"DatabricksEmbeddings",
|
|
"ElasticsearchEmbeddings",
|
|
"FastEmbedEmbeddings",
|
|
"HuggingFaceEmbeddings",
|
|
"HuggingFaceInferenceAPIEmbeddings",
|
|
"InfinityEmbeddings",
|
|
"InfinityEmbeddingsLocal",
|
|
"GradientEmbeddings",
|
|
"JinaEmbeddings",
|
|
"LaserEmbeddings",
|
|
"LlamaCppEmbeddings",
|
|
"LlamafileEmbeddings",
|
|
"LLMRailsEmbeddings",
|
|
"HuggingFaceHubEmbeddings",
|
|
"MlflowAIGatewayEmbeddings",
|
|
"MlflowEmbeddings",
|
|
"MlflowCohereEmbeddings",
|
|
"ModelScopeEmbeddings",
|
|
"TensorflowHubEmbeddings",
|
|
"SagemakerEndpointEmbeddings",
|
|
"HuggingFaceInstructEmbeddings",
|
|
"MosaicMLInstructorEmbeddings",
|
|
"SelfHostedEmbeddings",
|
|
"SelfHostedHuggingFaceEmbeddings",
|
|
"SelfHostedHuggingFaceInstructEmbeddings",
|
|
"FakeEmbeddings",
|
|
"DeterministicFakeEmbedding",
|
|
"AlephAlphaAsymmetricSemanticEmbedding",
|
|
"AlephAlphaSymmetricSemanticEmbedding",
|
|
"SentenceTransformerEmbeddings",
|
|
"GooglePalmEmbeddings",
|
|
"MiniMaxEmbeddings",
|
|
"VertexAIEmbeddings",
|
|
"BedrockEmbeddings",
|
|
"DeepInfraEmbeddings",
|
|
"EdenAiEmbeddings",
|
|
"DashScopeEmbeddings",
|
|
"EmbaasEmbeddings",
|
|
"OctoAIEmbeddings",
|
|
"SpacyEmbeddings",
|
|
"NLPCloudEmbeddings",
|
|
"GPT4AllEmbeddings",
|
|
"GigaChatEmbeddings",
|
|
"XinferenceEmbeddings",
|
|
"LocalAIEmbeddings",
|
|
"AwaEmbeddings",
|
|
"HuggingFaceBgeEmbeddings",
|
|
"IpexLLMBgeEmbeddings",
|
|
"ErnieEmbeddings",
|
|
"JavelinAIGatewayEmbeddings",
|
|
"OllamaEmbeddings",
|
|
"OracleEmbeddings",
|
|
"OVHCloudEmbeddings",
|
|
"QianfanEmbeddingsEndpoint",
|
|
"JohnSnowLabsEmbeddings",
|
|
"VoyageEmbeddings",
|
|
"BookendEmbeddings",
|
|
"VolcanoEmbeddings",
|
|
"OCIGenAIEmbeddings",
|
|
"QuantizedBiEncoderEmbeddings",
|
|
"NeMoEmbeddings",
|
|
"SparkLLMTextEmbeddings",
|
|
"SambaStudioEmbeddings",
|
|
"TitanTakeoffEmbed",
|
|
"QuantizedBgeEmbeddings",
|
|
"PremAIEmbeddings",
|
|
"YandexGPTEmbeddings",
|
|
"OpenVINOEmbeddings",
|
|
"OpenVINOBgeEmbeddings",
|
|
"SolarEmbeddings",
|
|
"ZhipuAIEmbeddings",
|
|
]
|
|
|
|
|
|
def test_all_imports() -> None:
|
|
assert set(__all__) == set(EXPECTED_ALL)
|
|
assert set(__all__) == set(_module_lookup.keys())
|