Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) OpenPage ¶
func (c *Client) OpenPage(ctx context.Context, cfg RuntimeConfig, req OpenPageRequest) (*OpenPageResponse, error)
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, cfg RuntimeConfig, req SearchRequest) (*SearchResponse, error)
type Config ¶
type Config struct {
SearchProvider SearchProvider `json:"search_provider"`
PageObservationMode PageObservationMode `json:"page_observation_mode"`
SearXNGBaseURL string `json:"searxng_base_url"`
JinaSearchBaseURL string `json:"jina_search_base_url"`
JinaReaderBaseURL string `json:"jina_reader_base_url"`
JinaAPIKeySecretName string `json:"jina_api_key_secret_name,omitempty"`
SearchReady bool `json:"search_ready"`
PageReadReady bool `json:"page_read_ready"`
Warnings []string `json:"warnings"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type OpenPageRequest ¶
type OpenPageRequest struct {
URL string
Mode PageObservationMode
MaxCharacters int
}
type OpenPageResponse ¶
type OpenPageResponse struct {
URL string `json:"url"`
FinalURL string `json:"final_url,omitempty"`
Mode PageObservationMode `json:"mode"`
StatusCode int `json:"status_code,omitempty"`
ContentType string `json:"content_type,omitempty"`
Title string `json:"title,omitempty"`
Content string `json:"content"`
Truncated bool `json:"truncated,omitempty"`
}
type PageObservationMode ¶
type PageObservationMode string
const ( PageObservationModeHTTP PageObservationMode = "http" PageObservationModeJina PageObservationMode = "jina" )
type RuntimeConfig ¶
type SearchProvider ¶
type SearchProvider string
const ( SearchProviderDisabled SearchProvider = "disabled" SearchProviderSearXNG SearchProvider = "searxng" SearchProviderJina SearchProvider = "jina" )
type SearchRequest ¶
type SearchResponse ¶
type SearchResponse struct {
Provider SearchProvider `json:"provider"`
Query string `json:"query"`
ResultCount int `json:"result_count,omitempty"`
Results []SearchResult `json:"results,omitempty"`
Content string `json:"content,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
type SearchResult ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(configs *query.AppConfigStore, secrets *query.SecretStore, allowPrivateNetwork ...bool) *Store
Click to show internal directories.
Click to hide internal directories.