Documentation
¶
Index ¶
- func NewWebFetchExecutor() tools.Executor
- func NewWebFetchExecutorWithService(web *WebService) tools.Executor
- func NewWebResearchExecutors(engine *webresearch.Engine) []tools.Executor
- func NewWebResearchExecutorsWithService(web *WebService) []tools.Executor
- func NewWebSearchExecutor(config func() (WebSearchProviderConfig, error)) tools.Executor
- func NewWebSearchExecutorWithService(web *WebService) tools.Executor
- type WebFetchParams
- type WebFetchResponseMetadata
- type WebFetchedPage
- type WebSearchParams
- type WebSearchProviderConfig
- type WebSearchResponseMetadata
- type WebSearchResult
- type WebService
- func (s *WebService) Ask(ctx context.Context, request webresearch.AskRequest) (webresearch.ResearchResult, error)
- func (s *WebService) Research(ctx context.Context, request webresearch.ResearchRequest) (webresearch.ResearchResult, error)
- func (s *WebService) ResearchConfigured() bool
- func (s *WebService) Search(ctx context.Context, query string, limit int) ([]WebSearchResult, string, error)
- func (s *WebService) Status(ctx context.Context, request webresearch.StatusRequest) (webresearch.ResearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebFetchExecutor ¶
func NewWebFetchExecutorWithService ¶
func NewWebFetchExecutorWithService(web *WebService) tools.Executor
func NewWebResearchExecutors ¶
func NewWebResearchExecutors(engine *webresearch.Engine) []tools.Executor
func NewWebResearchExecutorsWithService ¶
func NewWebResearchExecutorsWithService(web *WebService) []tools.Executor
func NewWebSearchExecutor ¶
func NewWebSearchExecutor(config func() (WebSearchProviderConfig, error)) tools.Executor
func NewWebSearchExecutorWithService ¶
func NewWebSearchExecutorWithService(web *WebService) tools.Executor
Types ¶
type WebFetchParams ¶
type WebFetchResponseMetadata ¶
type WebFetchResponseMetadata struct {
URL string `json:"url"`
Title string `json:"title,omitempty"`
StatusCode int `json:"status_code,omitempty"`
ContentType string `json:"content_type,omitempty"`
Truncated bool `json:"truncated,omitempty"`
CharCount int `json:"char_count,omitempty"`
ResearchID string `json:"research_id,omitempty"`
ArtifactIDs []string `json:"artifact_ids,omitempty"`
}
type WebFetchedPage ¶
type WebFetchedPage struct {
URL string `json:"url"`
Title string `json:"title,omitempty"`
Text string `json:"text,omitempty"`
HTML string `json:"html,omitempty"`
StatusCode int `json:"status_code,omitempty"`
ContentType string `json:"content_type,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
func FetchWebPage ¶
type WebSearchParams ¶
type WebSearchProviderConfig ¶
type WebSearchProviderConfig struct {
Provider string
TavilyKey string
SerperKey string
BaseURL string
}
WebSearchProviderConfig holds the active provider credentials for web search.
type WebSearchResponseMetadata ¶
type WebSearchResponseMetadata struct {
Query string `json:"query"`
Provider string `json:"provider"`
Results []WebSearchResult `json:"results"`
}
type WebSearchResult ¶
type WebSearchResult struct {
Position int `json:"position"`
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description,omitempty"`
}
func RunWebSearch ¶
func RunWebSearch(ctx context.Context, query string, limit int, cfg WebSearchProviderConfig) ([]WebSearchResult, string, error)
type WebService ¶
type WebService struct {
// contains filtered or unexported fields
}
func NewWebService ¶
func NewWebService(config func() (WebSearchProviderConfig, error), engine *webresearch.Engine) *WebService
func (*WebService) Ask ¶
func (s *WebService) Ask(ctx context.Context, request webresearch.AskRequest) (webresearch.ResearchResult, error)
func (*WebService) Research ¶
func (s *WebService) Research(ctx context.Context, request webresearch.ResearchRequest) (webresearch.ResearchResult, error)
func (*WebService) ResearchConfigured ¶
func (s *WebService) ResearchConfigured() bool
func (*WebService) Search ¶
func (s *WebService) Search(ctx context.Context, query string, limit int) ([]WebSearchResult, string, error)
func (*WebService) Status ¶
func (s *WebService) Status(ctx context.Context, request webresearch.StatusRequest) (webresearch.ResearchResult, error)
Click to show internal directories.
Click to hide internal directories.