Documentation
¶
Index ¶
- type Extraction
- func (extra *Extraction) Deduplicate(ctx context.Context, results []*types.ExtractionResult) ([]types.Node, []types.Relationship, error)
- func (extra *Extraction) Embedding(embedding types.Embedding) *Extraction
- func (extra *Extraction) EmbeddingNodes(ctx context.Context, nodes []types.Node, callback ...types.EmbeddingProgress) error
- func (extra *Extraction) EmbeddingRelationships(ctx context.Context, relationships []types.Relationship, ...) error
- func (extra *Extraction) EmbeddingResults(ctx context.Context, results []*types.ExtractionResult, ...) error
- func (extra *Extraction) ExtractDocuments(ctx context.Context, texts []string, callback ...types.ExtractionProgress) ([]*types.ExtractionResult, error)
- func (extra *Extraction) ExtractQuery(ctx context.Context, text string, callback ...types.ExtractionProgress) (*types.ExtractionResult, error)
- func (extra *Extraction) Use(extraction types.Extraction) *Extraction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extraction ¶
type Extraction struct {
Options types.ExtractionOptions
}
Extraction represents the extraction process
func New ¶
func New(options types.ExtractionOptions) *Extraction
New creates a new extraction instance
func (*Extraction) Deduplicate ¶
func (extra *Extraction) Deduplicate(ctx context.Context, results []*types.ExtractionResult) ([]types.Node, []types.Relationship, error)
Deduplicate deduplicates the results
func (*Extraction) Embedding ¶
func (extra *Extraction) Embedding(embedding types.Embedding) *Extraction
Embedding sets the embedding function to use
func (*Extraction) EmbeddingNodes ¶
func (extra *Extraction) EmbeddingNodes(ctx context.Context, nodes []types.Node, callback ...types.EmbeddingProgress) error
EmbeddingNodes embeds the nodes
func (*Extraction) EmbeddingRelationships ¶
func (extra *Extraction) EmbeddingRelationships(ctx context.Context, relationships []types.Relationship, callback ...types.EmbeddingProgress) error
EmbeddingRelationships embeds the relationships
func (*Extraction) EmbeddingResults ¶
func (extra *Extraction) EmbeddingResults(ctx context.Context, results []*types.ExtractionResult, callback ...types.EmbeddingProgress) error
EmbeddingResults embeds the results
func (*Extraction) ExtractDocuments ¶
func (extra *Extraction) ExtractDocuments(ctx context.Context, texts []string, callback ...types.ExtractionProgress) ([]*types.ExtractionResult, error)
ExtractDocuments extracts entities and relationships from documents
func (*Extraction) ExtractQuery ¶
func (extra *Extraction) ExtractQuery(ctx context.Context, text string, callback ...types.ExtractionProgress) (*types.ExtractionResult, error)
ExtractQuery extracts entities and relationships from a query
func (*Extraction) Use ¶
func (extra *Extraction) Use(extraction types.Extraction) *Extraction
Use sets the extraction method to use
Click to show internal directories.
Click to hide internal directories.