2026-07-07 23:15:37 +08:00
|
|
|
package design
|
|
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
|
|
type ResearchResult struct {
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
URL string `json:"url"`
|
|
|
|
|
Snippet string `json:"snippet"`
|
2026-07-08 10:56:31 +08:00
|
|
|
Content string `json:"content,omitempty"`
|
2026-07-07 23:15:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ResearchReport struct {
|
|
|
|
|
Kind string `json:"kind"`
|
|
|
|
|
Source string `json:"source"`
|
|
|
|
|
Query string `json:"query"`
|
|
|
|
|
Results []ResearchResult `json:"results"`
|
|
|
|
|
Error string `json:"error,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Researcher interface {
|
|
|
|
|
Research(ctx context.Context, prompt string) (ResearchReport, error)
|
|
|
|
|
}
|