Documentation
¶
Index ¶
- func AnalyzeSource(ctx context.Context, llm LLMChat, systemPrompt string, source scannedSource) (*domain.SimulationSourceReport, error)
- func FuseSynthesis(ctx context.Context, llm LLMChat, systemPrompt string, ...) (*domain.SimulationSynthesis, error)
- func MergeSynthesis(ctx context.Context, llm LLMChat, systemPrompt string, ...) (*domain.SimulationSynthesis, error)
- func Run(ctx context.Context, deps Deps, opts Options) (<-chan Event, error)
- func RunFetch(ctx context.Context, opts FetchOptions) (<-chan Event, error)
- func RunImport(ctx context.Context, st *store.Store, path string) (<-chan Event, error)
- type Deps
- type Event
- type FetchOptions
- type ImportResult
- type LLMChat
- type Options
- type Prompts
- type Stage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeSource ¶
func FuseSynthesis ¶ added in v0.7.0
func FuseSynthesis(ctx context.Context, llm LLMChat, systemPrompt string, base, persona *domain.SimulationProfile) (*domain.SimulationSynthesis, error)
FuseSynthesis 把"主画像基底 + 人格画像变奏"融合为一份 synthesis, 供竞稿写手作为唯一文风信号。融合规则在 systemPrompt (assets/prompts/simulation-persona-fuse.md)中声明:人格主导风格层、主画像主导结构层。 无主画像时调用方应直接用人格画像退化,不要调本函数。
func MergeSynthesis ¶
func MergeSynthesis(ctx context.Context, llm LLMChat, systemPrompt string, existing *domain.SimulationProfile, reports []domain.SimulationSourceReport) (*domain.SimulationSynthesis, error)
Types ¶
type FetchOptions ¶ added in v0.9.0
type FetchOptions struct {
SourceDir string // simulate 根目录(绝对路径,由 Host 解析)
Author string // 作者名,将作为 personas/ 子目录名
URLs []string // 待抓取 URL,仅支持 http/https
Client *http.Client
MaxBodyBytes int64
}
FetchOptions 是 RunFetch 的参数。Client/MaxBodyBytes 为测试注入位, 零值即生产默认(30s 超时客户端 / 20MB 上限)。
type ImportResult ¶
func ImportProfile ¶
Click to show internal directories.
Click to hide internal directories.