Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

feat: split Pinecone query in vector / ID #111

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jvallesm
Copy link
Collaborator

@jvallesm jvallesm commented Jan 15, 2024

Because

  • TASK_QUERY in Pinecone admits both a vector (required) and an id parameter, but Pinecone API returns an error if both are provided.
  • Current solution is ignoring vector if id is provided. Relying on the field description to reflect this behaviour is more error-prone than having either-id-or-vector

This commit

  • Splits the query task in QUERY_BY_VECTOR and QUERY_BY_ID. We don't need to map each endpoint in the API with a task and this allows us to have a clearer user experience.

Notes

⚠️ ON HOLD. While the tests pass, this is a breaking change in the connector schema, which breaks the console. While we don't want to release breaking changes, for now it should be valid (versioned components aren't implemented yet but should come in a [near] future). Before merging this we should adapt the console to display broken connectors, forcing the user to reconfigure them.

@jvallesm jvallesm self-assigned this Jan 15, 2024
Copy link

linear bot commented Jan 15, 2024

@jvallesm jvallesm force-pushed the jvalles/ins-2326-feature-support-metadata-in-pinecone-connector branch 2 times, most recently from 7183707 to b4e7815 Compare January 15, 2024 07:23
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (7b64a70) 62.18% compared to head (3c0159a) 62.11%.

Files Patch % Lines
pkg/pinecone/main.go 50.00% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
- Coverage   62.18%   62.11%   -0.08%     
==========================================
  Files          18       18              
  Lines        1489     1510      +21     
==========================================
+ Hits          926      938      +12     
- Misses        440      446       +6     
- Partials      123      126       +3     
Flag Coverage Δ
unittests 62.11% <67.85%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jvallesm jvallesm changed the title jvalles/ins 2326 feature support metadata in pinecone connector feat: split Pinecone query in vector / ID Jan 15, 2024
@jvallesm jvallesm force-pushed the jvalles/ins-2326-feature-support-metadata-in-pinecone-connector branch from b4e7815 to 0d621dd Compare January 30, 2024 10:17
@jvallesm jvallesm force-pushed the jvalles/ins-2326-feature-support-metadata-in-pinecone-connector branch from 0d621dd to 3c0159a Compare January 30, 2024 10:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: 🚧 Planned
Development

Successfully merging this pull request may close these issues.

2 participants