Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FewShotExample ¶
type FewShotExample struct {
Query string
Thought string
Action string
ActionInput map[string]any
Observation string
FinalAnswer string
}
FewShotExample represents a few-shot learning example
type ModelConfig ¶
type ModelConfig struct {
Name string
MaxContextSize int
Temperature float32
TopP float32
TopK int
RepeatPenalty float32
StopSequences []string
SystemPrompt string
}
ModelConfig contains model-specific configurations
func GetModelConfig ¶
func GetModelConfig(modelName string) *ModelConfig
GetModelConfig returns optimized configuration for specific models
type OutputFormat ¶
type OutputFormat struct {
ThoughtPrefix string
ActionPrefix string
ActionInputPrefix string
ObservationPrefix string
FinalAnswerPrefix string
JSONDelimiters bool
StrictFormatting bool
}
OutputFormat defines the expected output structure
type ReActTemplate ¶
type ReActTemplate struct {
ModelName string
SystemPrompt string
FewShotExamples []FewShotExample
OutputFormat OutputFormat
}
ReActTemplate defines a ReAct prompt template
func GetReActTemplate ¶
func GetReActTemplate(modelName string) *ReActTemplate
GetReActTemplate returns an optimized ReAct template for the model
func (*ReActTemplate) BuildPrompt ¶
func (t *ReActTemplate) BuildPrompt(tools []Tool, messages []Message) string
BuildPrompt constructs the full ReAct prompt with tools
Click to show internal directories.
Click to hide internal directories.