Documentation
¶
Index ¶
- Variables
- func CollectThreadComments(ctx context.Context, repo interfaces.Repository, ticketID types.TicketID, ...) []ticket.Comment
- func GenerateChatSystemPrompt(ctx context.Context, target *ticket.Ticket, alertCount int, ...) (string, error)
- func ToolCallToText(ctx context.Context, llmClient gollem.LLMClient, spec *gollem.ToolSpec, ...) string
- type Option
- func WithFrontendURL(url string) Option
- func WithNoAuthorization(noAuthz bool) Option
- func WithSlackService(svc *slackService.Service) Option
- func WithStorageClient(client interfaces.StorageClient) Option
- func WithStoragePrefix(prefix string) Option
- func WithStrategyFactory(f StrategyFactory) Option
- func WithSubAgents(subAgents []*agent.SubAgent) Option
- func WithTools(tools []gollem.ToolSet) Option
- func WithTraceRepository(repo trace.Repository) Option
- func WithUserSystemPrompt(prompt string) Option
- type PlanExecChat
- type PlanProgressReporter
- type StrategyFactory
- type StrategyParams
Constants ¶
This section is empty.
Variables ¶
var ( // ErrSessionAborted is returned when a session is aborted by user request ErrSessionAborted = goerr.New("session aborted by user") )
Functions ¶
func CollectThreadComments ¶
func CollectThreadComments(ctx context.Context, repo interfaces.Repository, ticketID types.TicketID, currentSession *session.Session) []ticket.Comment
CollectThreadComments delegates to the shared chat package implementation.
func GenerateChatSystemPrompt ¶
func GenerateChatSystemPrompt(ctx context.Context, target *ticket.Ticket, alertCount int, additionalInstructions string, knowledges []*knowledge.Knowledge, requesterID string, threadComments []ticket.Comment, userSystemPrompt string) (string, error)
GenerateChatSystemPrompt generates the chat system prompt from template and parameters.
Types ¶
type Option ¶
type Option func(*PlanExecChat)
Option configures a PlanExecChat.
func WithFrontendURL ¶
WithFrontendURL sets the frontend URL for session links.
func WithNoAuthorization ¶
WithNoAuthorization disables policy-based authorization checks.
func WithSlackService ¶
func WithSlackService(svc *slackService.Service) Option
WithSlackService sets the Slack service for message routing.
func WithStorageClient ¶
func WithStorageClient(client interfaces.StorageClient) Option
WithStorageClient sets the storage client for history persistence.
func WithStoragePrefix ¶
WithStoragePrefix sets the storage prefix for history paths.
func WithStrategyFactory ¶
func WithStrategyFactory(f StrategyFactory) Option
WithStrategyFactory sets the strategy factory for agent execution.
func WithSubAgents ¶
WithSubAgents sets the sub-agents available to the agent.
func WithTraceRepository ¶
func WithTraceRepository(repo trace.Repository) Option
WithTraceRepository sets the trace repository for execution tracing.
func WithUserSystemPrompt ¶
WithUserSystemPrompt sets the user system prompt.
type PlanExecChat ¶
type PlanExecChat struct {
// contains filtered or unexported fields
}
PlanExecChat implements interfaces.ChatUseCase with the Plan & Execute strategy.
func NewPlanExecChat ¶
func NewPlanExecChat(repo interfaces.Repository, llmClient gollem.LLMClient, policyClient interfaces.PolicyClient, opts ...Option) *PlanExecChat
NewPlanExecChat creates a new PlanExecChat with the given dependencies and options.
type PlanProgressReporter ¶
type PlanProgressReporter interface {
Planned() bool
}
PlanProgressReporter reports whether planning occurred during execution.
type StrategyFactory ¶
type StrategyFactory func(ctx context.Context, params *StrategyParams) (gollem.Strategy, PlanProgressReporter)
StrategyFactory creates a gollem execution strategy for a chat session. It returns the strategy and an optional PlanProgressReporter for tracking plan progress.
func DefaultStrategyFactory ¶
func DefaultStrategyFactory() StrategyFactory
DefaultStrategyFactory creates the standard Plan & Execute strategy with progress tracking.
type StrategyParams ¶
type StrategyParams struct {
LLMClient gollem.LLMClient
Session *session.Session
Repository interfaces.Repository
RequestID string
PlanFunc func(context.Context, string)
}
StrategyParams holds the parameters needed to create a strategy.