Documentation
¶
Index ¶
- Variables
- type Budget
- type Calibration
- type Citation
- type CreateJobRequest
- type EntityDisambiguation
- type Event
- type EventPublisher
- type Evidence
- type Handler
- func (h *Handler) CancelJob(c echo.Context) error
- func (h *Handler) CreateJob(c echo.Context) error
- func (h *Handler) GetJob(c echo.Context) error
- func (h *Handler) GetReport(c echo.Context) error
- func (h *Handler) ListJobs(c echo.Context) error
- func (h *Handler) RegisterGroup(g *echo.Group)
- func (h *Handler) RegisterRoutes(e *echo.Echo)
- func (h *Handler) SetJobCreator(creator interface{ ... })
- func (h *Handler) SetJobService(service interface{ ... })
- func (h *Handler) StreamEvents(c echo.Context) error
- type HeuristicPlanner
- type Job
- type JobStatus
- type JobSummary
- type Mode
- type Planner
- type Report
- type ResearchTraceEntry
- type RouteMode
- type RoutePolicy
- type SearchHit
- type Searcher
- type Service
- func (s *Service) CancelJob(id string) error
- func (s *Service) CancelJobForUser(id, userID, tenantID string) error
- func (s *Service) CreateJob(ctx context.Context, req CreateJobRequest) (*Job, error)
- func (s *Service) GetJob(id string) (*Job, error)
- func (s *Service) GetJobForUser(id, userID, tenantID string) (*Job, error)
- func (s *Service) GetReport(id string) (*Report, error)
- func (s *Service) GetReportForUser(id, userID, tenantID string) (*Report, error)
- func (s *Service) IsV2Enabled() bool
- func (s *Service) ListJobsForUser(userID, tenantID string, activeOnly bool) ([]JobSummary, error)
- func (s *Service) SetEventPublisher(publisher EventPublisher)
- func (s *Service) SetRoutePolicy(policy RoutePolicy)
- func (s *Service) SetSummarySynthesizer(synth SummarySynthesizer)
- func (s *Service) SetV2Enabled(enabled bool)
- func (s *Service) Subscribe(jobID string) (<-chan Event, func(), error)
- func (s *Service) SubscribeForUser(jobID, userID, tenantID string) (<-chan Event, func(), error)
- type SkillExecutor
- type SummaryInput
- type SummarySynthesizer
- type TakeawayCandidate
- type Task
- type TimelineSection
- type ToolWebSearcher
- type VerificationItem
- type VerificationSummary
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrJobNotFound = errors.New("job not found") ErrJobForbidden = errors.New("job forbidden") ErrReportNotReady = errors.New("report not ready") ErrJobAlreadyTerminal = errors.New("job already terminal") ErrInvalidRouteMode = errors.New("invalid route_mode") ErrRateLimited = errors.New("deep research rate limit exceeded") ErrTooManyActiveJobs = errors.New("too many deep research jobs in progress") )
Functions ¶
This section is empty.
Types ¶
type Calibration ¶
type Calibration struct {
Coverage float64 `json:"coverage"`
Groundedness float64 `json:"groundedness"`
Freshness float64 `json:"freshness"`
ConflictRisk string `json:"conflict_risk"`
Confidence float64 `json:"confidence"`
RecommendedAction string `json:"recommended_action"`
TakeawayCandidates []TakeawayCandidate `json:"takeaway_candidates,omitempty"`
}
type CreateJobRequest ¶
type CreateJobRequest struct {
RequestedID string `json:"requested_id,omitempty"`
UserID string `json:"user_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
ProviderID string `json:"provider_id,omitempty"`
Query string `json:"query"`
RetryContext string `json:"retry_context,omitempty"`
RetryFeedback map[string]interface{} `json:"retry_feedback,omitempty"`
Mode Mode `json:"mode,omitempty"`
RouteMode RouteMode `json:"route_mode,omitempty"`
Lang string `json:"lang,omitempty"`
Budget *Budget `json:"budget,omitempty"`
StrictEntity *bool `json:"strict_entity,omitempty"`
TimeWindows []string `json:"time_windows,omitempty"`
ReportStyle string `json:"report_style,omitempty"`
}
type EntityDisambiguation ¶
type EventPublisher ¶
type Evidence ¶
type Evidence struct {
ID string `json:"id"`
TaskID string `json:"task_id"`
Query string `json:"query"`
Title string `json:"title"`
URL string `json:"url"`
Snippet string `json:"snippet,omitempty"`
Source string `json:"source,omitempty"`
Domain string `json:"domain,omitempty"`
FetchedAt time.Time `json:"fetched_at"`
PublishedAt *time.Time `json:"published_at,omitempty"`
Author string `json:"author,omitempty"`
Quote string `json:"quote,omitempty"`
RelevanceScore float64 `json:"relevance_score"`
CredibilityScore float64 `json:"credibility_score"`
NoveltyScore float64 `json:"novelty_score"`
EntityScore float64 `json:"entity_score,omitempty"`
ClaimKey string `json:"claim_key,omitempty"`
TimeLabel string `json:"time_label,omitempty"`
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) RegisterGroup ¶
func (*Handler) RegisterRoutes ¶
func (*Handler) SetJobCreator ¶
func (*Handler) SetJobService ¶
func (h *Handler) SetJobService(service interface { ListJobsForUser(userID, tenantID string, activeOnly bool) ([]JobSummary, error) GetJobForUser(id, userID, tenantID string) (*Job, error) GetReportForUser(id, userID, tenantID string) (*Report, error) CancelJobForUser(id, userID, tenantID string) error SubscribeForUser(jobID, userID, tenantID string) (<-chan Event, func(), error) })
type HeuristicPlanner ¶
type HeuristicPlanner struct{}
func NewHeuristicPlanner ¶
func NewHeuristicPlanner() *HeuristicPlanner
type Job ¶
type Job struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id,omitempty"`
UserID string `json:"user_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
ProviderID string `json:"provider_id,omitempty"`
Query string `json:"query"`
RetryContext string `json:"retry_context,omitempty"`
RetryFeedback map[string]interface{} `json:"retry_feedback,omitempty"`
Lang string `json:"lang,omitempty"`
Mode Mode `json:"mode"`
RequestedRouteMode RouteMode `json:"requested_route_mode,omitempty"`
EffectiveRouteMode RouteMode `json:"effective_route_mode,omitempty"`
RouteReason string `json:"route_reason,omitempty"`
StrictEntity bool `json:"strict_entity,omitempty"`
TimeWindows []string `json:"time_windows,omitempty"`
ReportStyle string `json:"report_style,omitempty"`
Status JobStatus `json:"status"`
Budget Budget `json:"budget"`
Progress int `json:"progress"`
Stage string `json:"stage,omitempty"`
Iteration int `json:"iteration,omitempty"`
LatestGap string `json:"latest_gap,omitempty"`
LatestAction string `json:"latest_action,omitempty"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
Tasks []Task `json:"tasks,omitempty"`
Evidence []Evidence `json:"evidence,omitempty"`
Report *Report `json:"report,omitempty"`
}
type JobSummary ¶
type JobSummary struct {
ID string `json:"id"`
JobID string `json:"job_id"`
Query string `json:"query"`
Status JobStatus `json:"status"`
Stage string `json:"stage,omitempty"`
Progress int `json:"progress"`
Iteration int `json:"iteration,omitempty"`
LatestAction string `json:"latest_action,omitempty"`
LatestGap string `json:"latest_gap,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
type Report ¶
type Report struct {
Answer string `json:"answer"`
Confidence float64 `json:"confidence"`
Citations []Citation `json:"citations"`
OpenQuestions []string `json:"open_questions,omitempty"`
SupportCount int `json:"support_count,omitempty"`
ConflictCount int `json:"conflict_count,omitempty"`
HasConflict bool `json:"has_conflict,omitempty"`
Iterations int `json:"iterations,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
CitationCoverage float64 `json:"citation_coverage,omitempty"`
EntityDisambiguation *EntityDisambiguation `json:"entity_disambiguation,omitempty"`
StageErrors []string `json:"stage_errors,omitempty"`
TimelineSections []TimelineSection `json:"timeline_sections,omitempty"`
ResearchTrace []ResearchTraceEntry `json:"research_trace,omitempty"`
VerificationSummary *VerificationSummary `json:"verification_summary,omitempty"`
Calibration *Calibration `json:"calibration,omitempty"`
ItemsBySource map[string]interface{} `json:"items_by_source,omitempty"`
ErrorsBySource map[string]string `json:"errors_by_source,omitempty"`
Clusters []map[string]interface{} `json:"clusters,omitempty"`
LookbackDays int `json:"lookback_days,omitempty"`
BrowserAssisted bool `json:"browser_assisted,omitempty"`
RetrievalProfile string `json:"retrieval_profile,omitempty"`
}
type ResearchTraceEntry ¶
type ResearchTraceEntry struct {
Iteration int `json:"iteration"`
Focus string `json:"focus,omitempty"`
Gap string `json:"gap,omitempty"`
FollowUpQuery string `json:"follow_up_query,omitempty"`
EvidenceAdded int `json:"evidence_added,omitempty"`
VerificationOutcome string `json:"verification_outcome,omitempty"`
}
type RoutePolicy ¶
type RoutePolicy struct{}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CancelJobForUser ¶
func (*Service) GetJobForUser ¶
func (*Service) GetReportForUser ¶
func (*Service) IsV2Enabled ¶
func (*Service) ListJobsForUser ¶
func (s *Service) ListJobsForUser(userID, tenantID string, activeOnly bool) ([]JobSummary, error)
func (*Service) SetEventPublisher ¶
func (s *Service) SetEventPublisher(publisher EventPublisher)
func (*Service) SetRoutePolicy ¶
func (s *Service) SetRoutePolicy(policy RoutePolicy)
func (*Service) SetSummarySynthesizer ¶
func (s *Service) SetSummarySynthesizer(synth SummarySynthesizer)
func (*Service) SetV2Enabled ¶
type SkillExecutor ¶
type SkillExecutor struct {
// contains filtered or unexported fields
}
SkillExecutor adapts deep research service to builtin skill executor interface.
func NewSkillExecutor ¶
func NewSkillExecutor(service *Service) *SkillExecutor
func (*SkillExecutor) Execute ¶
func (e *SkillExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
Execute runs deep research synchronously for skill invocation and returns a map result.
func (*SkillExecutor) SetV2Enabled ¶
func (e *SkillExecutor) SetV2Enabled(enabled bool)
type SummaryInput ¶
type SummaryInput struct {
Query string
Lang string
Evidence []Evidence
AllEvidence []Evidence
Draft string
ResearchTrace []ResearchTraceEntry
VerificationSummary *VerificationSummary
}
type SummarySynthesizer ¶
type SummarySynthesizer interface {
Summarize(ctx context.Context, input SummaryInput) (string, error)
}
type TakeawayCandidate ¶
type TakeawayCandidate struct {
Lesson string `json:"lesson"`
WhenToApply string `json:"when_to_apply,omitempty"`
Evidence string `json:"evidence"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
TargetFile string `json:"target_file,omitempty"`
}
type Task ¶
type Task struct {
ID string `json:"id"`
Question string `json:"question"`
Priority int `json:"priority"`
Depth int `json:"depth"`
Status string `json:"status"`
Axis string `json:"axis,omitempty"`
Category string `json:"category,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
FollowUpOf string `json:"follow_up_of,omitempty"`
NegKeywords []string `json:"neg_keywords,omitempty"`
}
type TimelineSection ¶
type ToolWebSearcher ¶
type ToolWebSearcher struct {
// contains filtered or unexported fields
}
func NewToolWebSearcher ¶
func NewToolWebSearcher() *ToolWebSearcher
func NewToolWebSearcherWithConfig ¶
func NewToolWebSearcherWithConfig(cfg tools.WebSearchConfig) *ToolWebSearcher
type VerificationItem ¶
type VerificationSummary ¶
type VerificationSummary struct {
ResolvedCount int `json:"resolved_count,omitempty"`
ConflictedCount int `json:"conflicted_count,omitempty"`
InsufficientCount int `json:"insufficient_count,omitempty"`
Items []VerificationItem `json:"items,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.