Documentation ¶
Index ¶
- Constants
- func MustRegisterVectorStoreDelete(r *orchestrator.Registry)
- func MustRegisterVectorStoreQuery(r *orchestrator.Registry)
- func MustRegisterVectorStoreUpsert(r *orchestrator.Registry)
- type Config
- type VectorStore
- type VectorStoreDelete
- type VectorStoreDeleteBuilder
- type VectorStoreQuery
- type VectorStoreQueryBuilder
- type VectorStoreUpsert
- type VectorStoreUpsertBuilder
Constants ¶
View Source
const TypeVectorStoreDelete = "vectorstore_delete"
View Source
const TypeVectorStoreQuery = "vectorstore_query"
View Source
const TypeVectorStoreUpsert = "vectorstore_upsert"
Variables ¶
This section is empty.
Functions ¶
func MustRegisterVectorStoreDelete ¶
func MustRegisterVectorStoreDelete(r *orchestrator.Registry)
func MustRegisterVectorStoreQuery ¶
func MustRegisterVectorStoreQuery(r *orchestrator.Registry)
func MustRegisterVectorStoreUpsert ¶
func MustRegisterVectorStoreUpsert(r *orchestrator.Registry)
Types ¶
type VectorStore ¶
type VectorStore interface { Upsert(ctx context.Context, documents []*llmflow.Document) error Query(ctx context.Context, vector llmflow.Vector, topK int, minScore float64) (similarities []*llmflow.Similarity, err error) // Delete deletes the chunks belonging to the given sourceIDs. // As a special case, empty documentIDs means deleting all chunks. Delete(ctx context.Context, sourceIDs ...string) error }
type VectorStoreDelete ¶
type VectorStoreDelete struct { orchestrator.TaskHeader Input struct { Vendor string `json:"vendor"` Config *Config `json:"config"` } `json:"input"` // contains filtered or unexported fields }
func (*VectorStoreDelete) Execute ¶
func (vs *VectorStoreDelete) Execute(ctx context.Context, input orchestrator.Input) (orchestrator.Output, error)
func (*VectorStoreDelete) Init ¶
func (vs *VectorStoreDelete) Init(r *orchestrator.Registry) error
func (*VectorStoreDelete) String ¶
func (vs *VectorStoreDelete) String() string
type VectorStoreDeleteBuilder ¶
type VectorStoreDeleteBuilder struct {
// contains filtered or unexported fields
}
func NewVectorStoreDelete ¶
func NewVectorStoreDelete(name string) *VectorStoreDeleteBuilder
func (*VectorStoreDeleteBuilder) Build ¶
func (b *VectorStoreDeleteBuilder) Build() orchestrator.Task
type VectorStoreQuery ¶
type VectorStoreQuery struct { orchestrator.TaskHeader Input struct { Vendor string `json:"vendor"` Config *Config `json:"config"` Vector orchestrator.Expr[llmflow.Vector] `json:"vector"` TopK int `json:"top_k"` MinScore float64 `json:"min_score"` } `json:"input"` // contains filtered or unexported fields }
func (*VectorStoreQuery) Execute ¶
func (vs *VectorStoreQuery) Execute(ctx context.Context, input orchestrator.Input) (orchestrator.Output, error)
func (*VectorStoreQuery) Init ¶
func (vs *VectorStoreQuery) Init(r *orchestrator.Registry) error
func (*VectorStoreQuery) String ¶
func (vs *VectorStoreQuery) String() string
type VectorStoreQueryBuilder ¶
type VectorStoreQueryBuilder struct {
// contains filtered or unexported fields
}
func NewVectorStoreQuery ¶
func NewVectorStoreQuery(name string) *VectorStoreQueryBuilder
func (*VectorStoreQueryBuilder) Build ¶
func (b *VectorStoreQueryBuilder) Build() orchestrator.Task
type VectorStoreUpsert ¶
type VectorStoreUpsert struct { orchestrator.TaskHeader Input struct { Vendor string `json:"vendor"` Config *Config `json:"config"` Vectors orchestrator.Expr[[]llmflow.Vector] `json:"vectors"` Documents orchestrator.Expr[[]*llmflow.Document] `json:"documents"` } `json:"input"` // contains filtered or unexported fields }
func (*VectorStoreUpsert) Execute ¶
func (vs *VectorStoreUpsert) Execute(ctx context.Context, input orchestrator.Input) (orchestrator.Output, error)
func (*VectorStoreUpsert) Init ¶
func (vs *VectorStoreUpsert) Init(r *orchestrator.Registry) error
func (*VectorStoreUpsert) String ¶
func (vs *VectorStoreUpsert) String() string
type VectorStoreUpsertBuilder ¶
type VectorStoreUpsertBuilder struct {
// contains filtered or unexported fields
}
func NewVectorStoreUpsert ¶
func NewVectorStoreUpsert(name string) *VectorStoreUpsertBuilder
func (*VectorStoreUpsertBuilder) Build ¶
func (b *VectorStoreUpsertBuilder) Build() orchestrator.Task
Source Files ¶
Click to show internal directories.
Click to hide internal directories.