fix(sse): correct UTF-8 handling and chunking in SSE streaming\n\n- Updated splitContentIntoSegments to handle runes instead of bytes\n- Fixed buildWebUIStreamForwarder to send delta chunks instead of cumulative content\n- Ensures proper handling of multi-byte characters in SSE streams
This commit is contained in:
@@ -48,8 +48,9 @@ type FeishuConfig struct {
|
||||
}
|
||||
|
||||
type WebUIConfig struct {
|
||||
ListenAddr string
|
||||
MaxUploadBytes int64
|
||||
ListenAddr string
|
||||
MaxUploadBytes int64
|
||||
ExposeReasoning bool
|
||||
}
|
||||
|
||||
type LLMConfig struct {
|
||||
@@ -110,8 +111,9 @@ func Load() (Config, error) {
|
||||
EventPath: defaultIfEmpty(os.Getenv("FEISHU_EVENT_PATH"), "/feishu/events"),
|
||||
},
|
||||
WebUI: WebUIConfig{
|
||||
ListenAddr: defaultIfEmpty(os.Getenv("WEBUI_LISTEN_ADDR"), ":8090"),
|
||||
MaxUploadBytes: int64(intFromEnv("WEBUI_MAX_UPLOAD_MB", 20)) * 1024 * 1024,
|
||||
ListenAddr: defaultIfEmpty(os.Getenv("WEBUI_LISTEN_ADDR"), ":8090"),
|
||||
MaxUploadBytes: int64(intFromEnv("WEBUI_MAX_UPLOAD_MB", 20)) * 1024 * 1024,
|
||||
ExposeReasoning: boolFromEnv("WEBUI_EXPOSE_REASONING", false),
|
||||
},
|
||||
LLM: LLMConfig{
|
||||
BaseURL: strings.TrimRight(defaultIfEmpty(os.Getenv("LLM_BASE_URL"), "https://api.openai.com/v1"), "/"),
|
||||
|
||||
Reference in New Issue
Block a user