Documentation ¶
Index ¶
- type Client
- type Endpoint
- type ErrorResponse
- type FetchRequest
- type FetchResponse
- type GRPCClient
- func (p *GRPCClient) Close() error
- func (p *GRPCClient) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
- func (p *GRPCClient) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)
- func (p *GRPCClient) Upsert(ctx context.Context, req *UpsertRequest) (*UpsertResponse, error)
- type Match
- type Options
- type QueryRequest
- type QueryResponse
- type RestClient
- func (p *RestClient) Close() error
- func (p *RestClient) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
- func (p *RestClient) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)
- func (p *RestClient) Upsert(ctx context.Context, req *UpsertRequest) (*UpsertResponse, error)
- type UpsertRequest
- type UpsertResponse
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Upsert(ctx context.Context, req *UpsertRequest) (*UpsertResponse, error) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error) Close() error }
type ErrorResponse ¶ added in v0.0.64
type FetchRequest ¶
FetchRequest represents the parameters for a fetch vectors request. https://docs.pinecone.io/reference/fetch for more informations.
type FetchResponse ¶
type FetchResponse struct { Vectors map[string]*Vector `json:"vectors"` Namespace string `json:"namespace"` }
FetchResponse represents the response from a fetch vectors request.
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func NewGRPCClient ¶
func NewGRPCClient(apiKey string, endpoint Endpoint) (*GRPCClient, error)
func (*GRPCClient) Close ¶
func (p *GRPCClient) Close() error
func (*GRPCClient) Fetch ¶
func (p *GRPCClient) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
func (*GRPCClient) Query ¶
func (p *GRPCClient) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)
func (*GRPCClient) Upsert ¶
func (p *GRPCClient) Upsert(ctx context.Context, req *UpsertRequest) (*UpsertResponse, error)
type QueryRequest ¶
type QueryRequest struct { Filter map[string]any `json:"filter"` IncludeValues bool `json:"includeValues"` IncludeMetadata bool `json:"includeMetadata"` Vector []float32 `json:"vector"` Namespace string `json:"namespace"` TopK int64 `json:"topK"` ID string `json:"id"` }
QueryRequest represents the parameters for a query request. See https://docs.pinecone.io/reference/query for more information.
type QueryResponse ¶
QueryResponse represents the response from a query request.
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRestClient ¶
func NewRestClient(apiKey string, endpoint Endpoint) (*RestClient, error)
func (*RestClient) Close ¶ added in v0.0.13
func (p *RestClient) Close() error
func (*RestClient) Fetch ¶
func (p *RestClient) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
func (*RestClient) Query ¶
func (p *RestClient) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)
func (*RestClient) Upsert ¶
func (p *RestClient) Upsert(ctx context.Context, req *UpsertRequest) (*UpsertResponse, error)
type UpsertRequest ¶
type UpsertRequest struct { Vectors []*Vector `json:"vectors"` Namespace string `json:"namespace"` }
UpsertRequest represents the parameters for an upsert vectors request. See https://docs.pinecone.io/reference/upsert for more informations.
type UpsertResponse ¶
type UpsertResponse struct {
UpsertedCount uint32 `json:"upsertedCount"`
}
UpsertResponse represents the response from an upsert vectors request.
Click to show internal directories.
Click to hide internal directories.