mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-26 06:18:56 +00:00
1.9 KiB
1.9 KiB
In [8]:
from langchain.embeddings import HuggingFaceInstructEmbeddingsIn [9]:
embeddings = HuggingFaceInstructEmbeddings(
query_instruction="Represent the query for retrieval: "
)load INSTRUCTOR_Transformer max_seq_length 512
In [10]:
text = "This is a test document."In [11]:
query_result = embeddings.embed_query(text)In [ ]: