ClovaXEmbeddings#
Bases:
BaseModel
,Embeddings
NCP ClovaStudio Embedding API.
following environment variables set or passed in constructor in lower case: -
NCP_CLOVASTUDIO_API_KEY
-NCP_APIGW_API_KEY
-NCP_CLOVASTUDIO_APP_ID
Example
from langchain_community import ClovaXEmbeddings model = ClovaXEmbeddings(model="clir-emb-dolphin") output = embedding.embed_documents(documents)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Automatically inferred from env are NCP_CLOVASTUDIO_API_BASE_URL if not provided.
NCP ClovaStudio embedding model name
Automatically inferred from env are NCP_APIGW_API_KEY if not provided.
Automatically inferred from env are NCP_CLOVASTUDIO_API_KEY if not provided.
false: use testapp, true: use service app on NCP Clova Studio
- Constraints:
gt = 0
Bases:
object
Asynchronous Embed search docs.
- Parameters:
texts (List[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
List[List[float]]
Asynchronous Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
List[float]
- Return type:
Dict[str, Any]
Embed search docs.
- Parameters:
texts (List[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
List[List[float]]
Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
List[float]