LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • PineconeEmbeddingStorageService(url)
  • Properties
  • ApiKey
  • MaxBatchSize
  • URL
  • Methods
  • ExistsAsync(collectionName, documentName)
  • GetApiKey()
  • QueryAsync(collectionName, query, topN, minSimilarity, filter)
  • QueryAsync(collectionName, documentName, query, topN, minSimilarity)
  • RemoveAsync(collectionName, filter)
  • RemoveAsync(collectionName, documentName)
  • RetrieveAsync(collectionName, documentName, includeEmbedding)
  • RetrieveAsync(collectionName, includeEmbedding, filter)
  • StoreAsync(collectionName, document)
  • Implements
Export as PDF
  1. Components
  2. API
  3. Services
  4. IEmbeddingStorageService

PineconeEmbeddingStorageService

Wisej.AI.Services.PineconeEmbeddingStorageService

PreviousMemoryEmbeddingStorageServiceNextQdrantEmbeddingStorageService

Last updated 5 days ago

Namespace: Wisej.AI.Services

Assembly: Wisej.AI (3.5.0.0)

Represents a service for storing and retrieving embeddings using Pinecone.

public class PineconeEmbeddingStorageService : IEmbeddingStorageService
Public Class PineconeEmbeddingStorageService
    Inherits IEmbeddingStorageService

This class provides methods to store, retrieve, query, and remove embedded documents in a Pinecone vector database. It uses an HTTP client service to communicate with the Pinecone API.

Constructors

PineconeEmbeddingStorageService(url)

Initializes a new instance of the class.

Name
Type
Description

url

The URL of the Pinecone service. Default is null.

Properties

ApiKey

: Gets or sets the API key for the Pinecone service. (Default: null)

MaxBatchSize

: Gets or sets the maximum batch size used to store document vectors into the database. (Default: 100)

Methods

Checks if a document exists in the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

Retrieves the API key for the Pinecone service.

Queries the specified collection for documents similar to the given query vector.

Parameter
Type
Description

collectionName

The name of the collection.

query

The query vector.

topN

The number of top similar documents to retrieve.

minSimilarity

The minimum similarity threshold.

An optional filter to apply to the documents. Default is null.

Queries the specified collection for a document similar to the given query vector.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

query

The query vector.

topN

The number of top similar documents to retrieve.

minSimilarity

The minimum similarity threshold.

Throws:

Removes documents from the specified collection that match the given filter.

Parameter
Type
Description

collectionName

The name of the collection.

An optional filter to apply to the documents. Default is null.

Removes a document from the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

Retrieves a document from the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

includeEmbedding

A value indicating whether to include the embedding in the result.

Retrieves documents from the specified collection that match the given filter.

Parameter
Type
Description

collectionName

The name of the collection.

includeEmbedding

A value indicating whether to include the embedding in the result.

An optional filter to apply to the documents. Default is null.

Stores a document in the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

document

The document to store.

Throws:

Implements

Name
Description

Represents a service for storing and querying embedded documents within specified collections.

URL

: Gets or sets the URL of the Pinecone service. (Default: null)

ExistsAsync(collectionName, documentName)

Returns: . A task that represents the asynchronous operation. The task result contains a boolean indicating whether the document exists.

GetApiKey()

Returns: . The API key for the Pinecone service.

QueryAsync(collectionName, query, topN, minSimilarity, filter)

filter

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

QueryAsync(collectionName, documentName, query, topN, minSimilarity)

Returns: . A task that represents the asynchronous operation. The task result contains an object.

Thrown when the document is null.

RemoveAsync(collectionName, filter)

filter

Returns: . A task that represents the asynchronous operation.

RemoveAsync(collectionName, documentName)

Returns: . A task that represents the asynchronous operation.

RetrieveAsync(collectionName, documentName, includeEmbedding)

Returns: . A task that represents the asynchronous operation. The task result contains an object.

RetrieveAsync(collectionName, includeEmbedding, filter)

filter

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

StoreAsync(collectionName, document)

Returns: . A task that represents the asynchronous operation.

Thrown when the document is null.

String
Task<Boolean>
String
Task<EmbeddedDocument[]>
EmbeddedDocument
Task<EmbeddedDocument>
EmbeddedDocument
ArgumentNullException
Task
Task
Task<EmbeddedDocument>
EmbeddedDocument
Task<EmbeddedDocument[]>
EmbeddedDocument
Task
ArgumentNullException
String
String
String
String
Single[]
Int32
Single
Predicate<EmbeddedDocument>
String
String
Single[]
Int32
Single
String
Predicate<EmbeddedDocument>
String
String
String
String
Boolean
String
Boolean
Predicate<EmbeddedDocument>
String
EmbeddedDocument
IEmbeddingStorageService
PineconeEmbeddingStorageService
String
Int32