Added the janky version of openai embeddings #45
Merged
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.
What
Added a transformer for OpenAI embeddings.
It's currently janky in that you can only pass one sentence at a time when using it in a binding. We'll have to fix this by updating
lexy.core.celery_tasks.save_records_to_index
so that it accepts additional types of mappings/sequences. More to come.Minimal example
Why
Most people start off using embeddings from OpenAI.
Test plan
pytest sdk-python
examples/tests.ipynb
and verify that there are no errorsexamples/tutorial.ipynb
and verify that the tutorial works as expectedexamples/images.ipynb
and verify that the tutorial works as expected