yao/kb/providers/factory/interfaces.go
Max 7fa825a334 Remove obsolete configuration and test files for Knowledge Base
- Deleted config.go, config_test.go, types.go, and related test files to streamline the codebase and remove deprecated components.
- Refactored Knowledge Base loading logic to utilize updated configuration structures, enhancing clarity and maintainability.
- Updated references in kb.go to align with the new configuration types, ensuring compatibility with the latest changes.
2025-07-25 11:36:15 +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
}
// Extractor is a factory for extractor providers
type Extractor 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) (*kbtypes.ProviderSchema, error)
}