Skip to content
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

VoyageAIRerank constructor fix #17343

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Adversarian
Copy link
Contributor

Description

In the new voyageai client, the rerank method does not take truncation as an optional nullable argument. Furthermore, top_n is an optional nullable argument but was defined as a non-optional non-nullable argument previously. This made it so that the construction of the class without all the unrequired arguments would result in a validation error from Pydantic.

This change shouldn't be breaking for all intents and purposes since default values have been supplied where necessary and they will be overridden if otherwise specified. A unit test was developed for this specific case.

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 21, 2024
@Adversarian Adversarian changed the title Voyageai constructor fix VoyageAIRerank constructor fix Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant