Versions in this module Expand all Collapse all v2 v2.2.0 Jan 7, 2025 Changes in this version + func GenerateTestIndexName() string + func WaitUntilIndexReady(ts *IntegrationTests, ctx context.Context) (bool, error) + type Client struct + Inference *InferenceService + func NewClient(in NewClientParams) (*Client, error) + func NewClientBase(in NewClientBaseParams) (*Client, error) + func (c *Client) ConfigureIndex(ctx context.Context, name string, in ConfigureIndexParams) (*Index, error) + func (c *Client) CreateCollection(ctx context.Context, in *CreateCollectionRequest) (*Collection, error) + func (c *Client) CreatePodIndex(ctx context.Context, in *CreatePodIndexRequest) (*Index, error) + func (c *Client) CreateServerlessIndex(ctx context.Context, in *CreateServerlessIndexRequest) (*Index, error) + func (c *Client) DeleteCollection(ctx context.Context, collectionName string) error + func (c *Client) DeleteIndex(ctx context.Context, idxName string) error + func (c *Client) DescribeCollection(ctx context.Context, collectionName string) (*Collection, error) + func (c *Client) DescribeIndex(ctx context.Context, idxName string) (*Index, error) + func (c *Client) Index(in NewIndexConnParams, dialOpts ...grpc.DialOption) (*IndexConnection, error) + func (c *Client) ListCollections(ctx context.Context) ([]*Collection, error) + func (c *Client) ListIndexes(ctx context.Context) ([]*Index, error) + type Cloud string + const Aws + const Azure + const Gcp + type Collection struct + Dimension int32 + Environment string + Name string + Size int64 + Status CollectionStatus + VectorCount int32 + type CollectionStatus string + const CollectionStatusInitializing + const CollectionStatusReady + const CollectionStatusTerminating + type ConfigureIndexParams struct + DeletionProtection DeletionProtection + PodType string + Replicas int32 + Tags IndexTags + type CreateCollectionRequest struct + Name string + Source string + type CreatePodIndexRequest struct + DeletionProtection DeletionProtection + Dimension int32 + Environment string + MetadataConfig *PodSpecMetadataConfig + Metric IndexMetric + Name string + PodType string + Replicas int32 + Shards int32 + SourceCollection *string + Tags *IndexTags + func (req CreatePodIndexRequest) ReplicaCount() int32 + func (req CreatePodIndexRequest) ShardCount() int32 + func (req CreatePodIndexRequest) TotalCount() int + type CreateServerlessIndexRequest struct + Cloud Cloud + DeletionProtection DeletionProtection + Dimension int32 + Metric IndexMetric + Name string + Region string + Tags *IndexTags + type DeletionProtection string + const DeletionProtectionDisabled + const DeletionProtectionEnabled + type DescribeIndexStatsResponse struct + Dimension uint32 + IndexFullness float32 + Namespaces map[string]*NamespaceSummary + TotalVectorCount uint32 + type Document map[string]string + type EmbedParameters struct + InputType string + Truncate string + type EmbedRequest struct + Model string + Parameters EmbedParameters + TextInputs []string + type EmbedResponse struct + Data []Embedding + Model string + Usage struct{ ... } + type Embedding struct + Values *[]float32 + type FetchVectorsResponse struct + Namespace string + Usage *Usage + Vectors map[string]*Vector + type Import struct + CreatedAt *time.Time + Error *string + FinishedAt *time.Time + Id string + PercentComplete float32 + RecordsImported int64 + Status ImportStatus + Uri string + type ImportErrorMode string + const Abort + const Continue + type ImportStatus string + const Cancelled + const Completed + const Failed + const InProgress + const Pending + type Index struct + DeletionProtection DeletionProtection + Dimension int32 + Host string + Metric IndexMetric + Name string + Spec *IndexSpec + Status *IndexStatus + Tags *IndexTags + func BuildPodTestIndex(in *Client, name string, tags IndexTags) *Index + func BuildServerlessTestIndex(in *Client, idxName string, tags IndexTags) *Index + type IndexConnection struct + Namespace string + func (idx *IndexConnection) CancelImport(ctx context.Context, id string) error + func (idx *IndexConnection) Close() error + func (idx *IndexConnection) DeleteAllVectorsInNamespace(ctx context.Context) error + func (idx *IndexConnection) DeleteVectorsByFilter(ctx context.Context, metadataFilter *MetadataFilter) error + func (idx *IndexConnection) DeleteVectorsById(ctx context.Context, ids []string) error + func (idx *IndexConnection) DescribeImport(ctx context.Context, id string) (*Import, error) + func (idx *IndexConnection) DescribeIndexStats(ctx context.Context) (*DescribeIndexStatsResponse, error) + func (idx *IndexConnection) DescribeIndexStatsFiltered(ctx context.Context, metadataFilter *MetadataFilter) (*DescribeIndexStatsResponse, error) + func (idx *IndexConnection) FetchVectors(ctx context.Context, ids []string) (*FetchVectorsResponse, error) + func (idx *IndexConnection) ListImports(ctx context.Context, limit *int32, paginationToken *string) (*ListImportsResponse, error) + func (idx *IndexConnection) ListVectors(ctx context.Context, in *ListVectorsRequest) (*ListVectorsResponse, error) + func (idx *IndexConnection) QueryByVectorId(ctx context.Context, in *QueryByVectorIdRequest) (*QueryVectorsResponse, error) + func (idx *IndexConnection) QueryByVectorValues(ctx context.Context, in *QueryByVectorValuesRequest) (*QueryVectorsResponse, error) + func (idx *IndexConnection) StartImport(ctx context.Context, uri string, integrationId *string, ...) (*StartImportResponse, error) + func (idx *IndexConnection) UpdateVector(ctx context.Context, in *UpdateVectorRequest) error + func (idx *IndexConnection) UpsertVectors(ctx context.Context, in []*Vector) (uint32, error) + type IndexMetric string + const Cosine + const Dotproduct + const Euclidean + type IndexSpec struct + Pod *PodSpec + Serverless *ServerlessSpec + type IndexStatus struct + Ready bool + State IndexStatusState + type IndexStatusState string + const InitializationFailed + const Initializing + const Ready + const ScalingDown + const ScalingDownPodSize + const ScalingUp + const ScalingUpPodSize + const Terminating + type IndexTags map[string]string + type InferenceService struct + func (i *InferenceService) Embed(ctx context.Context, in *EmbedRequest) (*EmbedResponse, error) + func (i *InferenceService) Rerank(ctx context.Context, in *RerankRequest) (*RerankResponse, error) + type IntegrationTests struct + func (ts *IntegrationTests) SetupSuite() + func (ts *IntegrationTests) TearDownSuite() + type ListImportsRequest struct + Limit *int32 + PaginationToken *string + type ListImportsResponse struct + Imports []*Import + NextPaginationToken *string + type ListVectorsRequest struct + Limit *uint32 + PaginationToken *string + Prefix *string + type ListVectorsResponse struct + Namespace string + NextPaginationToken *string + Usage *Usage + VectorIds []*string + type Metadata = structpb.Struct + type MetadataFilter = structpb.Struct + type NamespaceSummary struct + VectorCount uint32 + type NewClientBaseParams struct + Headers map[string]string + Host string + RestClient *http.Client + SourceTag string + type NewClientParams struct + ApiKey string + Headers map[string]string + Host string + RestClient *http.Client + SourceTag string + type NewIndexConnParams struct + AdditionalMetadata map[string]string + Host string + Namespace string + type PineconeError struct + Code int + Msg error + func (pe *PineconeError) Error() string + type PodSpec struct + Environment string + MetadataConfig *PodSpecMetadataConfig + PodCount int + PodType string + Replicas int32 + ShardCount int32 + SourceCollection *string + type PodSpecMetadataConfig struct + Indexed *[]string + type QueryByVectorIdRequest struct + IncludeMetadata bool + IncludeValues bool + MetadataFilter *MetadataFilter + SparseValues *SparseValues + TopK uint32 + VectorId string + type QueryByVectorValuesRequest struct + IncludeMetadata bool + IncludeValues bool + MetadataFilter *MetadataFilter + SparseValues *SparseValues + TopK uint32 + Vector []float32 + type QueryVectorsResponse struct + Matches []*ScoredVector + Namespace string + Usage *Usage + type RankedDocument struct + Document *Document + Index int + Score float32 + type RerankRequest struct + Documents []Document + Model string + Parameters *map[string]string + Query string + RankFields *[]string + ReturnDocuments *bool + TopN *int + type RerankResponse struct + Data []RankedDocument + Model string + Usage RerankUsage + type RerankUsage struct + RerankUnits *int + type ScoredVector struct + Score float32 + Vector *Vector + type ServerlessSpec struct + Cloud Cloud + Region string + type SparseValues struct + Indices []uint32 + Values []float32 + type StartImportResponse struct + Id string + type UpdateVectorRequest struct + Id string + Metadata *Metadata + SparseValues *SparseValues + Values []float32 + type Usage struct + ReadUnits uint32 + type Vector struct + Id string + Metadata *Metadata + SparseValues *SparseValues + Values []float32 + func GenerateVectors(numOfVectors int, dimension int32, isSparse bool, metadata *Metadata) []*Vector Other modules containing this package github.com/pinecone-io/go-pinecone github.com/pinecone-io/go-pinecone/v3