初始化提交
This commit is contained in:
commit
887c1f449e
963 files changed
+166869
No files matched your search
@@ -0,0 +1,20 @@
|
||||
// Package providers 封装搜索提供商适配。
|
||||
package providers
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chenxin/hunjing/mcp/web-search/internal/models"
|
||||
)
|
||||
|
||||
// SearchProvider 搜索提供商接口。
|
||||
type SearchProvider interface {
|
||||
// Name 返回提供商标识。
|
||||
Name() models.ProviderKind
|
||||
// Search 执行搜索。apiKey 由负载均衡器传入,provider 本身不管理密钥。
|
||||
Search(ctx context.Context, apiKey string, req *models.SearchRequest) (*models.SearchResult, error)
|
||||
// HealthCheck 健康检查。
|
||||
HealthCheck(ctx context.Context) error
|
||||
// MaxResults 返回单次搜索最大数量。
|
||||
MaxResults() int
|
||||
}
|
||||
Reference in new issue
Block a user