Versions in this module Expand all Collapse all v0 v0.0.1 Aug 9, 2024 Changes in this version + const EnvironmentVariableAPIKey + const EnvironmentVariableEndpoint + var ErrAssertingContent = errors.New("couldn't assert content to string") + var ErrAssertingMetadata = errors.New("couldn't assert metadata to string") + var ErrAssertingSearchScore = errors.New("couldn't assert @search.score to float64") + var ErrMissingEmbedded = errors.New("missing embedder") + var ErrMissingEnvVariableAzureAISearchEndpoint = errors.New("missing azureAISearchEndpoint") + var ErrNumberOfVectorDoesNotMatch = errors.New("number of vectors from embedder does not match number of documents") + var ErrSendingRequest = errors.New("error sedding request") + func WithFilters(filters any) vectorstores.Option + type FieldType = string + const FieldTypeBoolean + const FieldTypeComplexType + const FieldTypeDatetimeOffset + const FieldTypeDouble + const FieldTypeInt32 + const FieldTypeInt64 + const FieldTypeSingle + const FieldTypeString + func CollectionField(fieldType FieldType) FieldType + type IndexOption func(indexMap *map[string]interface{}) + type Option func(p *Store) + func WithAPIKey(azureAISearchAPIKey string) Option + func WithEmbedder(e embeddings.Embedder) Option + func WithHTTPClient(client *http.Client) Option + type QueryCaptions string + const QueryTypeExtractive + const QueryTypeNone + type QueryType string + const QueryTypeFull + const QueryTypeSemantic + const QueryTypeSimple + type SearchDocumentsRequestInput struct + Captions QueryCaptions + Count bool + Facets []string + Filter string + Highlight string + HighlightPostTag string + HighlightPreTag string + MinimumCoverage int16 + Orderby string + QueryLanguage string + QueryType QueryType + ScoringParameters []string + ScoringProfile string + ScoringStatistics string + Search string + SearchFields string + SearchMode string + Select string + SemanticConfiguration string + SessionID string + Skip int + Speller SpellerType + Top int + VectorFilterMode string + Vectors []SearchDocumentsRequestInputVector + type SearchDocumentsRequestInputVector struct + Exhaustive bool + Fields string + K int + Kind string + Value []float32 + type SearchDocumentsRequestOuput struct + OdataCount int + OdataNextLink string + SearchFacets struct{ ... } + SearchNextPageParameters SearchDocumentsRequestInput + Value []map[string]interface{} + type SpellerType string + const SpellerTypeLexicon + const SpellerTypeNone + type Store struct + func New(opts ...Option) (Store, error) + func (s *Store) AddDocuments(ctx context.Context, docs []schema.Document, options ...vectorstores.Option) ([]string, error) + func (s *Store) CreateIndex(ctx context.Context, indexName string, opts ...IndexOption) error + func (s *Store) CreateIndexAPIRequest(ctx context.Context, indexName string, payload any) error + func (s *Store) DeleteIndex(ctx context.Context, indexName string) error + func (s *Store) ListIndexes(ctx context.Context, output *map[string]interface{}) error + func (s *Store) RetrieveIndex(ctx context.Context, indexName string, output *map[string]interface{}) error + func (s *Store) SearchDocuments(ctx context.Context, indexName string, payload SearchDocumentsRequestInput, ...) error + func (s *Store) SimilaritySearch(ctx context.Context, query string, numDocuments int, ...) ([]schema.Document, error) + func (s *Store) UploadDocument(ctx context.Context, id string, indexName string, text string, ...) error + func (s *Store) UploadDocumentAPIRequest(ctx context.Context, indexName string, document any) error