- Introduced a new search configuration structure, allowing for detailed settings for web, knowledge base, database, citation, and weights. - Updated the `Assistant` model to include a `Search` field, enabling assistant-specific search configurations. - Enhanced the loading and merging logic for search configurations, ensuring global defaults can be overridden by assistant-specific settings. - Added comprehensive tests for loading, saving, and updating assistants with search configurations, verifying the integrity of search settings. - Updated documentation in DESIGN.md to reflect the new search configuration hierarchy and usage, clarifying the interaction between global and assistant-level settings.
17 lines
540 B
Go
17 lines
540 B
Go
package interfaces
|
|
|
|
import (
|
|
"github.com/yaoapp/yao/agent/search/types"
|
|
)
|
|
|
|
// Searcher is the main interface exposed to external callers
|
|
type Searcher interface {
|
|
// Search executes a single search request
|
|
Search(req *types.Request) (*types.Result, error)
|
|
|
|
// SearchMultiple executes multiple searches (potentially in parallel)
|
|
SearchMultiple(reqs []*types.Request) ([]*types.Result, error)
|
|
|
|
// BuildReferences converts search results to unified Reference format for LLM
|
|
BuildReferences(results []*types.Result) []*types.Reference
|
|
}
|