yao/kb/providers/factory/interfaces.go
Max 6acea5b004 Refactor extractor to extraction provider and update related configurations
- Renamed extractor provider to extraction provider across the codebase for consistency and clarity.
- Updated references in configuration files, provider factories, and asset management to reflect the new terminology.
- Removed the extractor provider implementation and associated test files, streamlining the provider structure.
- Adjusted test cases and documentation to align with the new extraction provider framework.
2025-08-13 16:32:30 +08:00

43 lines
1.1 KiB
Go

package factory
import (
"github.com/yaoapp/gou/graphrag/types"
kbtypes "github.com/yaoapp/yao/kb/types"
)
// Chunking is a factory for chunking providers
type Chunking interface {
Make(option *kbtypes.ProviderOption) (types.Chunking, error)
Options(option *kbtypes.ProviderOption) (*types.ChunkingOptions, error)
Schema
}
// Converter is a factory for converter providers
type Converter interface {
Make(option *kbtypes.ProviderOption) (types.Converter, error)
AutoDetect(filename, contentTypes string) (bool, int, error)
Schema
}
// Embedding is a factory for embedding providers
type Embedding interface {
Make(options *kbtypes.ProviderOption) (types.Embedding, error)
Schema
}
// Extraction is a factory for extraction providers
type Extraction interface {
Make(option *kbtypes.ProviderOption) (types.Extraction, error)
Schema
}
// Fetcher is a factory for fetcher providers
type Fetcher interface {
Make(option *kbtypes.ProviderOption) (types.Fetcher, error)
Schema
}
// Schema interface for providers
type Schema interface {
Schema(provider *kbtypes.Provider, locale string) (*kbtypes.ProviderSchema, error)
}