Documentation
¶
Index ¶
- func Reflect[T any](ctx context.Context, req ReflectOptions) (def T, _ chat.Message, _ error)
- type AgentPromptTemplate
- type Book
- type Chapter
- type CodeBocks
- type GoalCompletion
- type Library
- type Objective
- type Page
- type Plan
- type PlanStatus
- type PlanStep
- type PlanStepStatus
- type ReflectOptions
- type Routing
- type SentimentScore
- type SimplePromptTemplate
- type SpeakerPrediction
- type Summary
- type Timeline
- type TimelineStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentPromptTemplate ¶
type AgentPromptTemplate struct { Profile agents.Profile SystemMessages []chat.Message Messages []*thoughtstream.Thought }
func (*AgentPromptTemplate) AsPrompt ¶
func (a *AgentPromptTemplate) AsPrompt() chain.Prompt
func (*AgentPromptTemplate) Build ¶
func (a *AgentPromptTemplate) Build(ctx chain.ChainContext) (chat.Message, error)
type Book ¶
type Book struct { psi.NodeBase Title string `json:"title" jsonschema:"title=Title,description=Title of the book."` Author string `json:"author" jsonschema:"title=Author,description=Author of the book."` Chapters []Chapter `json:"chapters" jsonschema:"title=Chapters,description=Chapters of the book."` }
type Chapter ¶
type Chapter struct { psi.NodeBase Title string `json:"title" jsonschema:"title=Title,description=Title of the chapter."` Description string `json:"body" jsonschema:"title=Body,description=Body of the chapter."` Pages []Page `json:"pages" jsonschema:"title=Pages,description=Pages of the chapter."` }
type CodeBocks ¶
func ExtractCodeBlocks ¶
type GoalCompletion ¶
type GoalCompletion struct { psi.NodeBase Goal string `json:"goal" jsonschema:"title=Goal,description=Description of the goal."` Completed bool `json:"completed" jsonschema:"title=Completed,description=Whether the goal is completed."` CompletionStepsCurrent int `json:"completionStepsCurrent" jsonschema:"title=Completion steps current,description=Number of steps completed."` CompletionStepsTotal int `json:"completionStepsTotal" jsonschema:"title=Completion steps total,description=Total number of steps."` Reasoning string `json:"reasoning" jsonschema:"title=Reasoning,description=Reasoning for the completion."` Feedback string `json:"feedback" jsonschema:"title=Feedback,description=Feedback for the completion."` }
func QueryGoalCompletion ¶
func QueryGoalCompletion(ctx context.Context, history []*thoughtstream.Thought) (GoalCompletion, error)
type Library ¶
type Library struct { psi.NodeBase Books []Book `json:"books" jsonschema:"title=Books,description=Books in the library."` }
func QueryLibrary ¶
type Objective ¶
type Objective struct { psi.NodeBase Name string `json:"Name" jsonschema:"title=Name,description=Name of the objective."` Description string `json:"Description" jsonschema:"title=Description,description=Description of the objective."` Keywords []string `json:"Keywords" jsonschema:"title=Keywords,description=Keywords of the objective."` PositivePlan Plan `json:"PositivePlan" jsonschema:"title=Positive plan,description=Plan to achieve the objective."` NegativePlan Plan `json:"NegativePlan" jsonschema:"title=Negative plan,description=Plan to avoid the objective."` VerificationPlan Plan `` /* 132-byte string literal not displayed */ Status GoalCompletion `json:"Status" jsonschema:"title=Status,description=Status of the goal."` }
func QueryObjective ¶
type Plan ¶
type PlanStatus ¶
type PlanStatus struct { psi.NodeBase Plan *Plan `json:"Plan" jsonschema:"title=Plan,description=Plan that was completed."` StepStatus []*PlanStepStatus `json:"StepStatus" jsonschema:"title=StepStatus,description=Status of each step in the plan."` Status *GoalCompletion `json:"Status" jsonschema:"title=Status,description=Status of the plan."` }
type PlanStepStatus ¶
type PlanStepStatus struct { psi.NodeBase Step *PlanStep `json:"Step" jsonschema:"title=Step,description=Step that was completed."` Status *GoalCompletion `json:"Status" jsonschema:"title=Status,description=Status of the step."` }
type ReflectOptions ¶
type ReflectOptions struct { History []*thoughtstream.Thought Query string ExampleInput any ExampleOutput any }
type Routing ¶
type Routing struct {
Recipients map[string][]string `` /* 169-byte string literal not displayed */
}
func QueryMessageRouting ¶
type SentimentScore ¶
type SentimentScore struct { Anger float64 `json:"anger"` Fear float64 `json:"fear"` Joy float64 `json:"joy"` Sadness float64 `json:"sadness"` Analytic float64 `json:"analytic"` Confident float64 `json:"confident"` Tentative float64 `json:"tentative"` }
func QuerySentimentScore ¶
func QuerySentimentScore(ctx context.Context, history []*thoughtstream.Thought) (SentimentScore, error)
type SimplePromptTemplate ¶
type SimplePromptTemplate struct {
Messages []*thoughtstream.Thought
}
func (*SimplePromptTemplate) AsPrompt ¶
func (a *SimplePromptTemplate) AsPrompt() chain.Prompt
func (*SimplePromptTemplate) Build ¶
func (a *SimplePromptTemplate) Build(ctx chain.ChainContext) (chat.Message, error)
type SpeakerPrediction ¶
type SpeakerPrediction struct {
NextSpeaker string `json:"NextSpeaker" jsonschema:"description=The next speaker"`
}
func PredictNextSpeaker ¶
func PredictNextSpeaker(ctx context.Context, plan Plan, history ...*thoughtstream.Thought) (SpeakerPrediction, error)
type Summary ¶
type Summary struct { Title string `json:"title" jsonschema:"title=Title,description=Title of the message."` Summary string `json:"summary" jsonschema:"title=Summary,description=Summary of the message."` }
func QuerySummary ¶
type Timeline ¶
type Timeline struct { psi.NodeBase Title string `json:"title" jsonschema:"title=Title,description=Title of the timeline."` Steps []TimelineStep `json:"steps" jsonschema:"title=Steps,description=Steps of the timeline."` }
func QueryTimeline ¶
Click to show internal directories.
Click to hide internal directories.