Documentation ¶
Overview ¶
Base API definition
Embeddings definition ¶
Extractor definition ¶
Labels definition
Index ¶
- type API
- type Answer
- type Document
- type EmbeddingsAPI
- func (embeddings *EmbeddingsAPI) Add(documents interface{})
- func (embeddings *EmbeddingsAPI) Embeddings(t string) []float64
- func (embeddings *EmbeddingsAPI) Index()
- func (embeddings *EmbeddingsAPI) Search(q string, n int) []Score
- func (embeddings *EmbeddingsAPI) Similarity(search string, data []string) []float64
- type ExtractorAPI
- type LabelsAPI
- type Question
- type Score
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
Base API definition
type EmbeddingsAPI ¶
type EmbeddingsAPI struct {
// contains filtered or unexported fields
}
Embeddings definition
func (*EmbeddingsAPI) Add ¶
func (embeddings *EmbeddingsAPI) Add(documents interface{})
Adds a batch of documents for indexing.
func (*EmbeddingsAPI) Embeddings ¶
func (embeddings *EmbeddingsAPI) Embeddings(t string) []float64
Transforms text into an embeddings array.
func (*EmbeddingsAPI) Index ¶
func (embeddings *EmbeddingsAPI) Index()
Builds an embeddings index. No further documents can be added after this call.
func (*EmbeddingsAPI) Search ¶
func (embeddings *EmbeddingsAPI) Search(q string, n int) []Score
Runs an Embeddings search. Returns []Score.
func (*EmbeddingsAPI) Similarity ¶
func (embeddings *EmbeddingsAPI) Similarity(search string, data []string) []float64
Calculates the similarity between search and list of elements in data.
type ExtractorAPI ¶
type ExtractorAPI struct {
// contains filtered or unexported fields
}
Extractor definition
type LabelsAPI ¶
type LabelsAPI struct {
// contains filtered or unexported fields
}
Labels definition
type Question ¶
type Question struct { Name string `json:"name"` Query string `json:"query"` Question string `json:"question"` Snippet bool `json:"snippet"` }
Question parameters
Click to show internal directories.
Click to hide internal directories.