mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
Update text2vec.py (#19657)
Add that URL of the embedding tool "text2vec". Fix minor mistakes in the doc-string.
This commit is contained in:
parent
7630e9529c
commit
dc2c9dd4d7
@ -10,6 +10,7 @@ class Text2vecEmbeddings(Embeddings, BaseModel):
|
||||
"""text2vec embedding models.
|
||||
|
||||
Install text2vec first, run 'pip install -U text2vec'.
|
||||
The gitbub repository for text2vec is : https://github.com/shibing624/text2vec
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
@ -17,11 +18,11 @@ class Text2vecEmbeddings(Embeddings, BaseModel):
|
||||
from langchain_community.embeddings.text2vec import Text2vecEmbeddings
|
||||
|
||||
embedding = Text2vecEmbeddings()
|
||||
bookend.embed_documents([
|
||||
embedding.embed_documents([
|
||||
"This is a CoSENT(Cosine Sentence) model.",
|
||||
"It maps sentences to a 768 dimensional dense vector space.",
|
||||
])
|
||||
bookend.embed_query(
|
||||
embedding.embed_query(
|
||||
"It can be used for text matching or semantic search."
|
||||
)
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user