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 DeepInfra Embedding Model #13323
Conversation
Add New Integration for DeepInfra Embedding Model
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
""" | ||
self._model_id = model_id | ||
self._normalize = normalize | ||
self._api_token = os.getenv(ENV_VARIABLE, api_token) |
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 api_token or os.getenv(..)
? Otherwise it ignores the api key in the constructor
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.
Yes that makes sense. Thanks for the feedback.
self._text_prefix = text_prefix | ||
self._batch_size = batch_size | ||
|
||
super().__init__(callback_manager=callback_manager) |
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.
Normally I would call super first
self._api_token = os.getenv(ENV_VARIABLE, api_token) | ||
self._query_prefix = query_prefix | ||
self._text_prefix = text_prefix | ||
self._batch_size = batch_size |
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.
There is already a parameter on the parent class for this embed_batch_size
-- we should use that instead
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.
@logan-markewich Thanks for your feedback.
fix(api_token): argument is more prior to the environment
Description
This pull request introduces a new integration for the DeepInfra Inference API.
Motivation and Context
Users are able to use DeepInfra's models using llama_index.
Fixes
New Package?
If yes, I have filled in the
tool.llamahub
section in thepyproject.toml
and provided a detailedREADME.md
for my new integration.Version Bump?
Type of Change
How Has This Been Tested?
Suggested Checklist:
make format; make lint
to appease the lint gods