feat(kol): enrich assist generate with URL references and template prompt
- Add kolAssistURLResolver that fetches reference articles via the Ark
URL extractor when the user's description contains http(s) links, and
merges up to kolAssistReferenceContentMaxRunes of extracted content
into the generate description.
- Rewrite the generate user prompt into a strict template-authoring
brief: output only the final prompt template in Chinese, parameterize
variable info as {{placeholder}}, require at least 3 placeholders
when references exist, and cover goal/topic/title/structure/style/
interaction/constraints.
- Wire LLMConfig and logger through NewKolAssistService and the
handler.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ func NewKolManageHandler(a *bootstrap.App, assets *AssetHandler) *KolManageHandl
|
||||
profileSvc: profileSvc,
|
||||
pkgSvc: app.NewKolPackageService(profileSvc, a.KolPackages, a.KolPrompts).WithCache(a.Cache),
|
||||
promptSvc: app.NewKolPromptService(a.DB, profileSvc, a.KolPackages, a.KolPrompts, a.KolSubscriptions, a.KolPromptAsset).WithCache(a.Cache),
|
||||
assistSvc: app.NewKolAssistService(profileSvc, a.KolAssists, a.LLM, a.RabbitMQ),
|
||||
assistSvc: app.NewKolAssistService(profileSvc, a.KolAssists, a.LLM, a.RabbitMQ, a.Config.LLM, a.Logger),
|
||||
assets: assets,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user