Documentation
¶
Index ¶
- Variables
- func NewExecutiveSummaryWriterOps(g *graph.GenericOps) *executiveSummaryWriterOps
- func NewOpenAIChatModel(modelName, apiKey string, ops ...func(o *openAiModelConfig)) (model.ToolCallingChatModel, error)
- func RetryChatModel(c model.ToolCallingChatModel) model.ToolCallingChatModel
- func WithBaseURL(url string) func(o *openAiModelConfig)
- func WithMaxToken(n int) func(o *openAiModelConfig)
- func WithRetry(n int) func(o *openAiModelConfig)
- func WithTemperature(n float32) func(o *openAiModelConfig)
- type DeepResearchClarifier
- type DeepResearchClarifierInput
- type DeepResearchClarifierOps
- type DeepResearchClarifierOutput
- type ExecutiveSummaryWriter
- type ExecutiveSummaryWriterInput
- type ExecutiveSummaryWriterOutput
- type ExtractFieldSpec
- type ExtractFieldSpecs
- type Material
- type MaterialExtract
- type MaterialExtractInput
- type MaterialExtractOps
- type MaterialExtractOutput
- type MemorySummarizer
- type MemorySummarizerInput
- type MemorySummarizerOps
- type MemorySummarizerOutput
- type Rule
- type RuleMatcher
- type RuleMatcherInput
- type RuleMatcherOps
- type RuleMatcherOutput
- type RuleResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DeepseekBaseURL = "https://api.deepseek.com/v1" OpenAIBaseURL = "https://api.openai.com/v1" AliBailianIntlBaseURL = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1" AliBailianCnBaseURL = "https://dashscope.aliyuncs.com/compatible-mode/v1" OpenRouterBaseURL = "https://openrouter.ai/api/v1" )
Functions ¶
func NewExecutiveSummaryWriterOps ¶
func NewExecutiveSummaryWriterOps(g *graph.GenericOps) *executiveSummaryWriterOps
func NewOpenAIChatModel ¶
func NewOpenAIChatModel(modelName, apiKey string, ops ...func(o *openAiModelConfig)) (model.ToolCallingChatModel, error)
NewOpenAIChatModel creates a new OpenAI-compatible chat model.
Example:
model, err := NewOpenAIChatModel("qwen3-max", apiKey,
WithTemperature(0.3),
WithMaxToken(32768),
WithRetry(3),
)
func RetryChatModel ¶
func RetryChatModel(c model.ToolCallingChatModel) model.ToolCallingChatModel
RetryChatModel wraps c with a default retry count of 3.
func WithBaseURL ¶ added in v0.0.11
func WithBaseURL(url string) func(o *openAiModelConfig)
func WithMaxToken ¶
func WithMaxToken(n int) func(o *openAiModelConfig)
func WithTemperature ¶
func WithTemperature(n float32) func(o *openAiModelConfig)
Types ¶
type DeepResearchClarifier ¶ added in v0.0.4
type DeepResearchClarifier struct {
// contains filtered or unexported fields
}
func NewDeepResearchClarifier ¶ added in v0.0.4
func NewDeepResearchClarifier(rail flow.Rail, chatModel model.ToolCallingChatModel, ops *DeepResearchClarifierOps) (*DeepResearchClarifier, error)
func (*DeepResearchClarifier) Execute ¶ added in v0.0.4
func (w *DeepResearchClarifier) Execute(rail flow.Rail, input DeepResearchClarifierInput) (DeepResearchClarifierOutput, error)
type DeepResearchClarifierInput ¶ added in v0.0.4
type DeepResearchClarifierOps ¶ added in v0.0.4
type DeepResearchClarifierOps struct {
// Injected variables: ${language}
SystemMessagePrompt string
// Injected variables: ${now} ${conversation}, ${memory}
UserMessagePrompt string
// contains filtered or unexported fields
}
func NewDeepResearchClarifierOps ¶ added in v0.0.4
func NewDeepResearchClarifierOps(g *graph.GenericOps) *DeepResearchClarifierOps
type DeepResearchClarifierOutput ¶ added in v0.0.4
type ExecutiveSummaryWriter ¶
type ExecutiveSummaryWriter struct {
// contains filtered or unexported fields
}
func NewExecutiveSummaryWriter ¶
func NewExecutiveSummaryWriter(rail flow.Rail, chatModel model.ToolCallingChatModel, ops *executiveSummaryWriterOps) (*ExecutiveSummaryWriter, error)
func (*ExecutiveSummaryWriter) Execute ¶
func (w *ExecutiveSummaryWriter) Execute(rail flow.Rail, input ExecutiveSummaryWriterInput) (*ExecutiveSummaryWriterOutput, error)
type ExecutiveSummaryWriterOutput ¶
type ExecutiveSummaryWriterOutput struct {
Summary string `json:"summary"`
}
type ExtractFieldSpec ¶ added in v0.0.6
type ExtractFieldSpecs ¶ added in v0.0.6
type ExtractFieldSpecs []ExtractFieldSpec
type MaterialExtract ¶ added in v0.0.6
type MaterialExtract struct {
// contains filtered or unexported fields
}
func NewMaterialExtract ¶ added in v0.0.6
func NewMaterialExtract(rail flow.Rail, chatModel model.ToolCallingChatModel, ops *MaterialExtractOps) (*MaterialExtract, error)
func (*MaterialExtract) Execute ¶ added in v0.0.6
func (b *MaterialExtract) Execute(rail flow.Rail, input MaterialExtractInput) (MaterialExtractOutput, error)
Execute.
If there are lots of fields, use MaterialExtract.ParallelExecute instead.
func (*MaterialExtract) ParallelExecute ¶ added in v0.0.9
func (b *MaterialExtract) ParallelExecute(rail flow.Rail, input MaterialExtractInput, batchSize int, pool async.AsyncPool) (MaterialExtractOutput, error)
type MaterialExtractInput ¶ added in v0.0.6
type MaterialExtractInput struct {
Context string `json:"context"`
Materials []Material `json:"materials"`
Fields []ExtractFieldSpec `json:"fields"`
// contains filtered or unexported fields
}
type MaterialExtractOps ¶ added in v0.0.6
type MaterialExtractOps struct {
// Injected variables: ${context}, ${language}, ${now}
SystemMessagePrompt string
// Injected variables: ${materials}, ${fields}, ${extractedInfo}
UserMessagePrompt string
TimeZoneHourOffset float64
// contains filtered or unexported fields
}
func NewMaterialExtractOps ¶ added in v0.0.6
func NewMaterialExtractOps(g *graph.GenericOps) *MaterialExtractOps
type MaterialExtractOutput ¶ added in v0.0.6
type MemorySummarizer ¶ added in v0.0.5
type MemorySummarizer struct {
// contains filtered or unexported fields
}
func NewMemorySummarizer ¶ added in v0.0.5
func NewMemorySummarizer(rail flow.Rail, chatModel model.ToolCallingChatModel, ops *MemorySummarizerOps) (*MemorySummarizer, error)
func (*MemorySummarizer) Execute ¶ added in v0.0.5
func (w *MemorySummarizer) Execute(rail flow.Rail, input MemorySummarizerInput) (MemorySummarizerOutput, error)
type MemorySummarizerInput ¶ added in v0.0.5
type MemorySummarizerOps ¶ added in v0.0.5
type MemorySummarizerOps struct {
// Injected variables: ${language}
SystemMessagePrompt string
// Injected variables: ${context}, ${report}
UserMessagePrompt string
// contains filtered or unexported fields
}
func NewMemorySummarizerOps ¶ added in v0.0.5
func NewMemorySummarizerOps(g *graph.GenericOps) *MemorySummarizerOps
type MemorySummarizerOutput ¶ added in v0.0.5
type MemorySummarizerOutput struct {
Summary string `json:"summary"`
}
type RuleMatcher ¶ added in v0.0.6
type RuleMatcher struct {
// contains filtered or unexported fields
}
func NewRuleMatcher ¶ added in v0.0.6
func NewRuleMatcher(rail flow.Rail, chatModel model.ToolCallingChatModel, ops *RuleMatcherOps) (*RuleMatcher, error)
func (*RuleMatcher) Execute ¶ added in v0.0.6
func (b *RuleMatcher) Execute(rail flow.Rail, input RuleMatcherInput) (RuleMatcherOutput, error)
Execute.
If there are lots of rules, use RuleMatcher.ParallelExecute instead.
func (*RuleMatcher) ParallelExecute ¶ added in v0.0.9
func (b *RuleMatcher) ParallelExecute(rail flow.Rail, input RuleMatcherInput, batchSize int, pool async.AsyncPool) (RuleMatcherOutput, error)
type RuleMatcherInput ¶ added in v0.0.6
type RuleMatcherInput struct {
// Additional instruction about the task
//
// How should LLM make decision on whether the target matches the given rule or not.
TaskInstruction string `json:"taskInstruction"`
// context about the target
//
// e.g., if we are running a background check for a company, the context will be the information about the company.
Context string `json:"context"`
// Rules
Rules []Rule `json:"Rules"`
// contains filtered or unexported fields
}
type RuleMatcherOps ¶ added in v0.0.6
type RuleMatcherOps struct {
// Injected variables: ${taskInstruction}, ${language}, ${now}
SystemMessagePrompt string
// Injected variables: ${rule}, ${context}
UserMessagePrompt string
TimeZoneHourOffset float64
// contains filtered or unexported fields
}
func NewRuleMatcherOps ¶ added in v0.0.6
func NewRuleMatcherOps(g *graph.GenericOps) *RuleMatcherOps
type RuleMatcherOutput ¶ added in v0.0.6
type RuleMatcherOutput struct {
Rules []RuleResult `json:"rules"`
}
type RuleResult ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.