feat: Introduce conversation configuration management and localization updates
- Added new ConversationConfig interface and API endpoints for retrieving and updating conversation settings. - Enhanced AgentSettings.vue to include UI for configuring conversation parameters such as prompt, context template, temperature, and max tokens. - Updated localization files in English and Chinese to include new strings for conversation settings. - Implemented logic to load and save conversation configuration for tenants, ensuring defaults are applied when no specific configuration exists.
This commit is contained in:
@@ -97,9 +97,9 @@ func (h *Handler) CreateSession(c *gin.Context) {
|
||||
if request.SessionStrategy.SummaryParameters != nil {
|
||||
createdSession.SummaryParameters = request.SessionStrategy.SummaryParameters
|
||||
} else {
|
||||
createdSession.SummaryParameters = h.createDefaultSummaryConfig()
|
||||
createdSession.SummaryParameters = h.createDefaultSummaryConfig(ctx)
|
||||
}
|
||||
h.fillSummaryConfigDefaults(createdSession.SummaryParameters)
|
||||
h.fillSummaryConfigDefaults(ctx, createdSession.SummaryParameters)
|
||||
|
||||
logger.Debug(ctx, "Custom session strategy set")
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ func (h *Handler) CreateSession(c *gin.Context) {
|
||||
createdSession.VectorThreshold = h.config.Conversation.VectorThreshold
|
||||
createdSession.RerankThreshold = h.config.Conversation.RerankThreshold
|
||||
createdSession.RerankTopK = h.config.Conversation.RerankTopK
|
||||
createdSession.SummaryParameters = h.createDefaultSummaryConfig()
|
||||
createdSession.SummaryParameters = h.createDefaultSummaryConfig(ctx)
|
||||
|
||||
logger.Debug(ctx, "Using default session strategy")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user