Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type Document struct {
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
ContentHash string `json:"content_hash"`
Embedding pgvector.Vector `json:"embedding"`
Similarity float32 `json:"similarity"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Document 文档
type SearchOptions ¶
SearchOptions 搜索配置
type VDB ¶
type VDB interface {
Create(context.Context) error
Store(context.Context, ...*Document) error
SearchWithOptions(context.Context, []float32, *SearchOptions) ([]*Document, error)
Search(context.Context, []float32, ...SearchOption) ([]*Document, error)
SearchQuery(context.Context, string, ...SearchOption) ([]*Document, error)
SearchQueryWithOptions(context.Context, string, *SearchOptions) ([]*Document, error)
Delete(context.Context, string) error
Close() error
}
VDB ...
Click to show internal directories.
Click to hide internal directories.