[ENH] VoyageAI embedding function#1871
Conversation
VoyageAI Embedding function
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
| self._client.embed( | ||
| input[i : i + self._batch_size], | ||
| model=self._model_name, | ||
| input_type="document", |
There was a problem hiding this comment.
is there a separate input_type for queries? https://docs.voyageai.com/docs/embeddings#python-api
can you expand on how this needs to work?
There was a problem hiding this comment.
@jeffchuber, reading the API docs, I help but notice that there is special prompt that gets prepended to each document. We don't have semantics to represent what the embedding will be used for, and I think we should not default to anything else than None to avoid skewing results.
| body: JSON.stringify({ | ||
| input: texts.slice(index, index + this.batch_size), | ||
| model: this.model_name, | ||
| truncation: this.truncation, |
There was a problem hiding this comment.
does this take a document/query param like python?
Voyageai embedding function
Voyageai embedding function
[ENH] Corrections due to the comments
[ENH] Corrections due to the comments
Corrections due to the comments: removing the loop, raising exception
|
@tazarov Can you please recheck this PR? |
|
@tazarov I just tried, but Prettier modified lots of files for me. |
I know. We recently added prettier to |
|
Our underlying impl has changed and so this PR is not landable as is. That being said - we'd still like to add this functionality and that is now tracked in this issue. |
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?