VolcanoEmbeddings#
- class langchain_community.embeddings.volcengine.VolcanoEmbeddings[source]#
Bases:
BaseModel
,Embeddings
Volcengine Embeddings embedding models.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param chunk_size: int = 100#
Chunk size when multiple texts are input
- param client: Any = None#
volcano client
- param host: str = 'maas-api.ml-platform-cn-beijing.volces.com'#
host learn more from https://www.volcengine.com/docs/82379/1174746
- param model: str = 'bge-large-zh'#
Model name you could get from https://www.volcengine.com/docs/82379/1174746 for now, we support bge_large_zh
- param region: str = 'cn-beijing'#
region learn more from https://www.volcengine.com/docs/82379/1174746
- param version: str = '1.0'#
model version
- param volcano_ak: str | None = None#
volcano access key learn more from: https://www.volcengine.com/docs/6459/76491#ak-sk
- param volcano_sk: str | None = None#
volcano secret key learn more from: https://www.volcengine.com/docs/6459/76491#ak-sk
- async aembed_documents(texts: List[str]) List[List[float]] #
Asynchronous Embed search docs.
- Parameters:
texts (List[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
List[List[float]]
- async aembed_query(text: str) List[float] #
Asynchronous Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
List[float]
- embed_documents(texts: List[str]) List[List[float]] [source]#
Embeds a list of text documents using the AutoVOT algorithm.
- Parameters:
texts (List[str]) – A list of text documents to embed.
- Returns:
- A list of embeddings for each document in the input list.
Each embedding is represented as a list of float values.
- Return type:
List[List[float]]
Examples using VolcanoEmbeddings