Fix: trigger auto turn cannot be empty
empty message means to continue merging new reply to the last message
This commit is contained in:
4
bot.go
4
bot.go
@@ -498,7 +498,6 @@ func monitorModelLoad(modelID string) {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// extractDetailedErrorFromBytes extracts detailed error information from response body bytes
|
// extractDetailedErrorFromBytes extracts detailed error information from response body bytes
|
||||||
func extractDetailedErrorFromBytes(body []byte, statusCode int) string {
|
func extractDetailedErrorFromBytes(body []byte, statusCode int) string {
|
||||||
// Try to parse as JSON to extract detailed error information
|
// Try to parse as JSON to extract detailed error information
|
||||||
@@ -1352,9 +1351,10 @@ func triggerPrivateMessageResponses(msg models.RoleMsg) {
|
|||||||
return // user in known_to => user's turn
|
return // user in known_to => user's turn
|
||||||
}
|
}
|
||||||
// Trigger the recipient character to respond
|
// Trigger the recipient character to respond
|
||||||
|
triggerMsg := recipient + ":\n"
|
||||||
// Send empty message so LLM continues naturally from the conversation
|
// Send empty message so LLM continues naturally from the conversation
|
||||||
crr := &models.ChatRoundReq{
|
crr := &models.ChatRoundReq{
|
||||||
UserMsg: "", // Empty message - LLM will continue the conversation
|
UserMsg: triggerMsg,
|
||||||
Role: recipient,
|
Role: recipient,
|
||||||
}
|
}
|
||||||
chatRoundChan <- crr
|
chatRoundChan <- crr
|
||||||
|
|||||||
Reference in New Issue
Block a user