Closed omikader closed 8 months ago
Hey @omikader, thanks for the great PR description and fix. This looks like it makes sense to me, I'll let CI run and merge when ready, thank you!
Validating CI in a draft here since forks don't share secrets: https://github.com/pinecone-io/pinecone-ts-client/pull/200
Problem
This PR makes it so that you don't need to supply all of the required fields in your custom metadata interface when updating a vector using the TS client.
For example, say I have a metadata interface defined as the following:
I want to update the value for
isArchived
, but I want to leave the values fortitle
andsource
as is. I'd write the following code, but I get a type error because no value fortitle
orsource
were providedSolution
By wrapping the generic in
Partial
, we make it so that all of the fields in the interface are optional which is the intent of this method according to the documentationType of Change
Test Plan
N/A