🎨 1.优化前端渲染功能(html和对话消息格式)
2.优化流式传输,新增流式渲染功能 3.优化正则处理逻辑 4.新增context budget管理系统 5.优化对话消息失败处理逻辑 6.新增前端卡功能(待完整测试)
This commit is contained in:
@@ -255,7 +255,7 @@ func (a *ConversationApi) regenerateMessageStream(c *gin.Context, userID, conver
|
||||
|
||||
go func() {
|
||||
if err := service.ServiceGroupApp.AppServiceGroup.ConversationService.RegenerateMessageStream(
|
||||
userID, conversationID, streamChan, doneChan,
|
||||
c.Request.Context(), userID, conversationID, streamChan, doneChan,
|
||||
); err != nil {
|
||||
errorChan <- err
|
||||
}
|
||||
@@ -347,7 +347,7 @@ func (a *ConversationApi) SendMessageStream(c *gin.Context, userID, conversation
|
||||
// 启动流式传输
|
||||
go func() {
|
||||
err := service.ServiceGroupApp.AppServiceGroup.ConversationService.SendMessageStream(
|
||||
userID, conversationID, req, streamChan, doneChan,
|
||||
c.Request.Context(), userID, conversationID, req, streamChan, doneChan,
|
||||
)
|
||||
if err != nil {
|
||||
errorChan <- err
|
||||
|
||||
@@ -51,6 +51,13 @@ func (a *RegexScriptApi) GetRegexScriptList(c *gin.Context) {
|
||||
scopeInt, _ := strconv.Atoi(scope)
|
||||
req.Scope = &scopeInt
|
||||
}
|
||||
if ownerCharID := c.Query("ownerCharId"); ownerCharID != "" {
|
||||
ownerCharIDUint, err := strconv.ParseUint(ownerCharID, 10, 32)
|
||||
if err == nil {
|
||||
v := uint(ownerCharIDUint)
|
||||
req.OwnerCharID = &v
|
||||
}
|
||||
}
|
||||
|
||||
if req.Page < 1 {
|
||||
req.Page = 1
|
||||
|
||||
Reference in New Issue
Block a user