Documentation
¶
Index ¶
- func FillInSopCheckPrompt(ctx context.Context, lf *LLMFeedback, a schema.Agent, ...) bool
- func FillInStabilityPrompt(ctx context.Context, lf *LLMFeedback, a schema.Agent, ...) bool
- func SopAccessCondition(_ context.Context, lf *LLMFeedback, _ schema.Agent, messages []schema.Message, ...) bool
- type ContentFeedback
- type Feedback
- type FeedbackInfo
- type FeedbackType
- type LLMFeedback
- type LLMFeedbackOption
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillInSopCheckPrompt ¶
func FillInSopCheckPrompt(ctx context.Context, lf *LLMFeedback, a schema.Agent, messages []schema.Message, _ []schema.StepAction, steps []schema.StepAction, _ string) bool
func FillInStabilityPrompt ¶
func FillInStabilityPrompt(ctx context.Context, lf *LLMFeedback, a schema.Agent, messages []schema.Message, actions []schema.StepAction, steps []schema.StepAction, _ string) bool
func SopAccessCondition ¶
func SopAccessCondition(_ context.Context, lf *LLMFeedback, _ schema.Agent, messages []schema.Message, _ []schema.StepAction, _ []schema.StepAction, _ string) bool
Types ¶
type ContentFeedback ¶
type ContentFeedback struct{}
func (*ContentFeedback) Feedback ¶
func (*ContentFeedback) Feedback(_ context.Context, agent schema.Agent, messages []schema.Message, actions []schema.StepAction, steps []schema.StepAction, _ string) *FeedbackInfo
type Feedback ¶
type Feedback interface {
Feedback(ctx context.Context, agent schema.Agent, messages []schema.Message, actions []schema.StepAction,
steps []schema.StepAction, prompt string) *FeedbackInfo
}
func NewContentFeedback ¶
func NewContentFeedback() Feedback
func NewLLMFeedback ¶
func NewLLMFeedback(LLM llm.LLM, opts ...LLMFeedbackOption) (Feedback, error)
type FeedbackInfo ¶
type FeedbackInfo struct {
Type FeedbackType `json:"type"`
Msg string `json:"msg"`
Token int `json:"token"`
}
type FeedbackType ¶
type FeedbackType = string
const ( Approved FeedbackType = "Approved" NotApproved FeedbackType = "NotApproved" )
type LLMFeedback ¶
func (*LLMFeedback) Feedback ¶
func (lf *LLMFeedback) Feedback(ctx context.Context, agent schema.Agent, messages []schema.Message, actions []schema.StepAction, steps []schema.StepAction, prompt string) *FeedbackInfo
type LLMFeedbackOption ¶
type LLMFeedbackOption func(*LLMFeedback)
func WithExpertNum ¶
func WithExpertNum(num int) LLMFeedbackOption
func WithMaxConBlock ¶
func WithMaxConBlock(block int) LLMFeedbackOption
func WithMiddlewares ¶
func WithMiddlewares(middlewares ...Middleware) LLMFeedbackOption
func WithPromptTemplate ¶
func WithPromptTemplate(template string) LLMFeedbackOption
type Middleware ¶
type Middleware func(context.Context, *LLMFeedback, schema.Agent, []schema.Message, []schema.StepAction, []schema.StepAction, string) bool
Click to show internal directories.
Click to hide internal directories.