Repository navigation
feat: add AssetFeed vectorizer and reranker - #895
Open
nikolai-vysotskyi wants to merge 1 commit into
Open
nikolai-vysotskyi wants to merge 1 commit into
nikolai-vysotskyi wants to merge 1 commit into
Conversation
Collaborator
|
Thank you for your PR. We don't currently accept PRs from agents without human oversight or review, or PRs where the author does not properly test their code before submitting it for review. Please decide whether you can meet those requirements for contributions to RedisVL and amend the PR accordingly - if that's not a process you're prepared to follow at this time, feel free to close the PR and alternatively open an issue. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
RedisVL has vectorizers and rerankers for several hosted providers. This adds AssetFeed's embeddings and rerank APIs, so they can be used for the same two-stage retrieval flow. Try the models in the browser: https://assetfeed.com/models (embeddings: https://assetfeed.com/models/embeddings, reranker: https://assetfeed.com/models/reranker). API keys: https://assetfeed.com/api-keys, pricing: https://assetfeed.com/pricing.
Changes
AssetFeedVectorizer
redisvl.utils.vectorize.AssetFeedVectorizer(sync and async) calls the AssetFeed embeddings API (OpenAI request format) through theopenaiclient with the AssetFeed base URL. The key comes fromapi_configorASSETFEED_API_KEY.dimsis 1024, 512 or 256; other values raiseValueError.dimsis set from the argument, so there is no probe call at construction.embed_many/aembed_manycapbatch_sizeat 64, the API limit per request.input_type="query"or"document"can be passed toembed,embed_many,aembed,aembed_many; it is sent asinput_typein the request body, and omitted when not given.Vectorizers.assetfeedand invectorizer_from_dict(dimsis read from the dict when present).AssetFeedReranker
redisvl.utils.rerank.AssetFeedReranker(rank/arank) posts to/rerankwith the same client. It followsVoyageAIRerankerforrank_by,limitandreturn_score. Only the first 100 documents are sent (the API limit) andtop_nis clamped to the number sent.Docs, tests
pip install redisvl[openai]), AGENTS.md list.tests/unit/test_assetfeed.py: defaults and env key, dims validation, 64-input batching (sync and async),input_type, rerank clamping,rank_by,from_dict. No new extra was added, souv.lockis untouched.Release Notes
RedisVL can embed text and rerank search results with AssetFeed models:
AssetFeedVectorizerandAssetFeedReranker, using theopenaiextra.AI Assistance
This change was prepared by an AI coding agent and was not reviewed by a human before submission; the account is operated by AssetFeed.
Reviewer Brief
Not verified: no live calls to the AssetFeed API (no key in the environment). The request shapes were checked against a mock transport with the real
openaiclient. Docker-based test suites were not run; unit tests ran with--noconftest.Disclosure: I work on AssetFeed.