PineconeUtils.EnsureValidMetadataAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Utility method to ensure that the metadata size is not too large. This is necessary because Pinecone has a limit on the size of the metadata associated with each vector.
public static System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.Pinecone.PineconeDocument> EnsureValidMetadataAsync (System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.Pinecone.PineconeDocument> documents);
static member EnsureValidMetadataAsync : System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.Pinecone.PineconeDocument> -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.Pinecone.PineconeDocument>
Public Shared Function EnsureValidMetadataAsync (documents As IAsyncEnumerable(Of PineconeDocument)) As IAsyncEnumerable(Of PineconeDocument)
Parameters
- documents
- IAsyncEnumerable<PineconeDocument>
Returns
A stream of documents with valid metadata.
Remarks
If the metadata size is too large, the document will be split into multiple documents. The text field will be removed from the metadata and the document ID will be set to {document ID}-{split counter} The text field will be added to the metadata of the split documents. The split documents will be returned in the same order as the original document.