feat(admin-brand): add question expansion service and related functionality
- Implemented QuestionExpansionService for generating and materializing questions based on combinations and AI distillation. - Added question metadata classification logic to infer intent and layer of questions. - Created API handlers for question expansion operations including combination preview, AI distillation, metadata classification, and materialization. - Introduced database migrations to support new question-related fields and constraints in brand_questions and brand_keywords tables. - Added caching mechanism for AI distillation results to improve performance. - Defined JSON schemas for question distillation responses to ensure data integrity.
This commit is contained in:
@@ -88,6 +88,10 @@ func brandLibrarySummaryCacheKey(tenantID int64) string {
|
||||
return fmt.Sprintf("brand:library_summary:%d", tenantID)
|
||||
}
|
||||
|
||||
func tenantQuestionQuotaLockKey(tenantID int64) string {
|
||||
return fmt.Sprintf("tenant:%d:question_quota", tenantID)
|
||||
}
|
||||
|
||||
func brandDetailCacheKey(tenantID, brandID int64) string {
|
||||
return fmt.Sprintf("brand:detail:%d:%d", tenantID, brandID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user