Versions in this module Expand all Collapse all v0 v0.2.66 Sep 2, 2025 v0.2.65 Sep 2, 2025 Changes in this version + func APIEmbeddingToEmbedding(embedding openapiclient.EmbeddingsInner) *types.Embedding + func APIEmbeddingsToEmbeddings(embeddings []openapiclient.EmbeddingsInner) []*types.Embedding + func GetStringTypeOfEmbeddingFunction(ef types.EmbeddingFunction) string + type Client struct + APIVersion semver.Version + ApiClient *openapiclient.APIClient + BasePath string + Database string + Tenant string + func NewClient(options ...ClientOption) (*Client, error) + func (c *Client) Close() error + func (c *Client) CountCollections(ctx context.Context) (int32, error) + func (c *Client) CreateCollection(ctx context.Context, collectionName string, metadata map[string]interface{}, ...) (*Collection, error) + func (c *Client) CreateDatabase(ctx context.Context, databaseName string, tenantName *string) (*openapiclient.Database, error) + func (c *Client) CreateTenant(ctx context.Context, tenantName string) (*openapiclient.Tenant, error) + func (c *Client) DeleteCollection(ctx context.Context, collectionName string) (*Collection, error) + func (c *Client) GetCollection(ctx context.Context, collectionName string, ...) (*Collection, error) + func (c *Client) GetDatabase(ctx context.Context, databaseName string, tenantName *string) (*openapiclient.Database, error) + func (c *Client) GetTenant(ctx context.Context, tenantName string) (*openapiclient.Tenant, error) + func (c *Client) Heartbeat(ctx context.Context) (map[string]float32, error) + func (c *Client) ListCollections(ctx context.Context) ([]*Collection, error) + func (c *Client) NewCollection(ctx context.Context, name string, options ...collection.Option) (*Collection, error) + func (c *Client) PreflightChecks(ctx context.Context) (map[string]interface{}, error) + func (c *Client) Reset(ctx context.Context) (bool, error) + func (c *Client) SetDatabase(database string) + func (c *Client) SetTenant(tenant string) + func (c *Client) Version(ctx context.Context) (string, error) + type ClientConfiguration struct + BasePath string + DefaultHeaders map[string]string + EmbeddingFunction types.EmbeddingFunction + type ClientOption func(p *Client) error + func WithAuth(provider types.CredentialsProvider) ClientOption + func WithBasePath(basePath string) ClientOption + func WithDatabase(database string) ClientOption + func WithDebug(debug bool) ClientOption + func WithDefaultHeaders(headers map[string]string) ClientOption + func WithHTTPClient(client *http.Client) ClientOption + func WithInsecure() ClientOption + func WithSSLCert(certPath string) ClientOption + func WithTenant(tenant string) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type Collection struct + ApiClient *openapiclient.APIClient + Database string + EmbeddingFunction types.EmbeddingFunction + ID string + Metadata map[string]interface{} + Name string + Tenant string + func NewCollection(chromaClient *Client, id string, name string, metadata *map[string]interface{}, ...) *Collection + func (c *Collection) Add(ctx context.Context, embeddings []*types.Embedding, ...) (*Collection, error) + func (c *Collection) AddRecords(ctx context.Context, recordSet *types.RecordSet) (*Collection, error) + func (c *Collection) Count(ctx context.Context) (int32, error) + func (c *Collection) Delete(ctx context.Context, ids []string, where map[string]interface{}, ...) ([]string, error) + func (c *Collection) Get(ctx context.Context, where map[string]interface{}, ...) (*GetResults, error) + func (c *Collection) GetWithOptions(ctx context.Context, options ...types.CollectionQueryOption) (*GetResults, error) + func (c *Collection) Modify(ctx context.Context, embeddings []*types.Embedding, ...) (*Collection, error) + func (c *Collection) Query(ctx context.Context, queryTexts []string, nResults int32, ...) (*QueryResults, error) + func (c *Collection) QueryWithOptions(ctx context.Context, queryOptions ...types.CollectionQueryOption) (*QueryResults, error) + func (c *Collection) String() string + func (c *Collection) Update(ctx context.Context, newName string, newMetadata *map[string]interface{}) (*Collection, error) + func (c *Collection) Upsert(ctx context.Context, embeddings []*types.Embedding, ...) (*Collection, error) + type GetResults struct + Documents []string + Embeddings []*types.Embedding + Ids []string + Metadatas []map[string]interface{} + type QueryResults struct + Distances [][]float32 + Documents [][]string + Ids [][]string + Metadatas [][]map[string]interface{} + QueryEmbeddings []*types.Embedding + QueryTexts []string + QueryTextsGeneratedEmbeddings []*types.Embedding