HunyuanEmbeddings#
- class langchain_community.embeddings.hunyuan.HunyuanEmbeddings[source]#
Bases:
Embeddings
,BaseModel
Tencent Hunyuan embedding models API by Tencent.
For more information, see https://cloud.tencent.com/document/product/1729
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.
- param client: Any = None#
The tencentcloud client.
- param embedding_ctx_length: int = 1024#
The max embedding context length of hunyuan embedding (defaults to 1024).
- param hunyuan_secret_id: SecretStr | None = None (alias 'secret_id')#
Hunyuan Secret ID
- param hunyuan_secret_key: SecretStr | None = None (alias 'secret_key')#
Hunyuan Secret Key
- param region: Literal['ap-guangzhou', 'ap-beijing'] = 'ap-guangzhou'#
The region of hunyuan service.
- param request_cls: Type | None = None#
The request class of tencentcloud sdk.
- param show_progress_bar: bool = False#
Show progress bar when embedding. Default is False.
- async aembed_documents(texts: List[str]) List[List[float]] [source]#
Asynchronous Embed search docs.
- Parameters:
texts (List[str])
- Return type:
List[List[float]]
- async aembed_query(text: str) List[float] [source]#
Asynchronous Embed query text.
- Parameters:
text (str)
- Return type:
List[float]