Documentation
¶
Overview ¶
Package websearch 公开资料检索抽象:接口可插拔,缺省实现 SearXNG 自建实例 (免 API key、零调用成本)。与 knowledge/rag 互补——本包面向外网公开资料。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Title string `json:"title"`
URL string `json:"url"`
Snippet string `json:"snippet"`
}
Result 单条检索结果。
type Searxng ¶
type Searxng struct {
BaseURL string
Language string // 缺省 "zh-CN";空串=不传 language 参数
DefaultTopK int // AsTool 用;≤0 兜底 5
HTTP *http.Client
}
Searxng SearXNG 自建实例客户端(GET /search?format=json——实例 settings.yml 须启用 formats: [html, json])。零 API key、零调用成本;商业后端后续按同 Service 接口接入。
func NewSearxng ¶
NewSearxng 构造(timeout 为单次检索上限;≤0 用 10s 兜底)。
Click to show internal directories.
Click to hide internal directories.