A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://python.langchain.com/docs/integrations/text_embedding/yandex below:

YandexGPT | 🦜️🔗 LangChain

YandexGPT

This notebook goes over how to use Langchain with YandexGPT embeddings models.

To use, you should have the yandexcloud python package installed.

%pip install --upgrade --quiet  yandexcloud

First, you should create service account with the ai.languageModels.user role.

Next, you have two authentication options:

To specify the model you can use model_uri parameter, see the documentation for more details.

By default, the latest version of text-search-query is used from the folder specified in the parameter folder_id or YC_FOLDER_ID environment variable.

from langchain_community.embeddings.yandex import YandexGPTEmbeddings
embeddings = YandexGPTEmbeddings()
text = "This is a test document."
query_result = embeddings.embed_query(text)
doc_result = embeddings.embed_documents([text])
[-0.021392822265625,
0.096435546875,
-0.046966552734375,
-0.0183258056640625,
-0.00555419921875]
[-0.021392822265625,
0.096435546875,
-0.046966552734375,
-0.0183258056640625,
-0.00555419921875]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4