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

fix: fix get vectors #775

Merged
merged 3 commits into from
Sep 13, 2024
Merged

fix: fix get vectors #775

merged 3 commits into from
Sep 13, 2024

Conversation

joein
Copy link
Member

@joein joein commented Sep 13, 2024

No description provided.

Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 0746648
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/66e45bfcbc787c000840f337
😎 Deploy Preview https://deploy-preview-775--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@joein joein requested a review from agourlay September 13, 2024 14:34
@joein joein changed the title fix: fix nested prefetch fix: fix get vectors Sep 13, 2024
@@ -456,7 +456,7 @@ def _get_payload(
def _get_vectors(
self, idx: int, with_vectors: Union[bool, Sequence[str]] = False
) -> Optional[models.VectorStruct]:
if not with_vectors:
if not with_vectors and with_vectors != DEFAULT_VECTOR_NAME:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking my brain, I am not used to implicit conversion in Python.
What about having two disjoint if?

  • one for not DEFAULT_VECTOR_NAME
  • one for the bool false

@joein joein requested a review from agourlay September 13, 2024 15:36
@joein joein merged commit 75597a9 into dev Sep 13, 2024
14 checks passed
joein added a commit that referenced this pull request Sep 16, 2024
* fix: fix nested prefetch

* refactoring: simplify condition

* fix: fix condition in get vectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants