-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new integration for YandexGPT Embedding Model #14313
base: main
Are you sure you want to change the base?
Add new integration for YandexGPT Embedding Model #14313
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
llama-index-integrations/embeddings/llama-index-embeddings-yandexgpt/README.md
Outdated
Show resolved
Hide resolved
...rations/embeddings/llama-index-embeddings-yandexgpt/llama_index/embeddings/yandexgpt/base.py
Outdated
Show resolved
Hide resolved
...rations/embeddings/llama-index-embeddings-yandexgpt/llama_index/embeddings/yandexgpt/util.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KirillKukharev.
I pushed a commit to pass our lint checks. Left also a minor comment wrt pyproject.toml
llama-index-integrations/embeddings/llama-index-embeddings-yandexgpt/pyproject.toml
Outdated
Show resolved
Hide resolved
|
||
def _get_query_embedding(self, text: str) -> List[float]: | ||
"""Get query embedding sync.""" | ||
return self._embed(text, is_document=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be is_document=False?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(maybe I misunderstand this option though, but the query is not a document)
"""Get list of queries embeddings sync.""" | ||
embeddings = [] | ||
for text in texts: | ||
embeddings.append(self._embed(text, is_document=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here?
Oh, I'm sorry, I didn't fully understand the difference between text and query. According to docs clarifai, embedding methods should be named vice versa. I have swapped the names of the embedding methods, please see if it's ok?
Description
This pull request introduces a new class YandexGPTEmbedding for generating embeddings using the Yandex Cloud API.
Fixes # (issue)
New Package?
Version Bump?
Type of Change
How Has This Been Tested?
Suggested Checklist:
make format; make lint
to appease the lint gods