Skip to content

Commit 8a95eb1

Browse files
authored
chore(langchain_v1): remove union return type in init_embeddings (#33062)
Fix the return type of init_embeddings
1 parent 4d1cfa4 commit 8a95eb1

File tree

1 file changed

+1
-2
lines changed
  • libs/langchain_v1/langchain/embeddings

1 file changed

+1
-2
lines changed

libs/langchain_v1/langchain/embeddings/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import Any
66

77
from langchain_core.embeddings import Embeddings
8-
from langchain_core.runnables import Runnable
98

109
_SUPPORTED_PROVIDERS = {
1110
"azure_openai": "langchain_openai",
@@ -126,7 +125,7 @@ def init_embeddings(
126125
*,
127126
provider: str | None = None,
128127
**kwargs: Any,
129-
) -> Embeddings | Runnable[Any, list[float]]:
128+
) -> Embeddings:
130129
"""Initialize an embeddings model from a model name and optional provider.
131130
132131
**Note:** Must have the integration package corresponding to the model provider

0 commit comments

Comments
 (0)