mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-27 16:57:12 +08:00
fix: improve JSON extraction to handle UTF-8 Chinese characters properly
- Replace byte-based brace counting with UTF-8 aware rune iteration - Add proper string state tracking to handle escaped quotes - Add comprehensive test cases for Chinese character handling - Fix parsing errors when JSON contains Chinese text like 2048经典
This commit is contained in:
@@ -19,14 +19,13 @@ type LLMContentParser interface {
|
||||
}
|
||||
|
||||
func NewLLMContentParser(modelType option.LLMServiceType) LLMContentParser {
|
||||
switch modelType {
|
||||
case option.DOUBAO_1_5_UI_TARS_250428:
|
||||
if option.IS_UI_TARS(modelType) {
|
||||
return &UITARSContentParser{
|
||||
modelType: modelType,
|
||||
systemPrompt: doubao_1_5_ui_tars_planning_prompt,
|
||||
actionMapping: doubao_1_5_ui_tars_action_mapping,
|
||||
}
|
||||
default:
|
||||
} else {
|
||||
return &JSONContentParser{
|
||||
modelType: modelType,
|
||||
systemPrompt: doubao_1_5_thinking_vision_pro_planning_prompt,
|
||||
|
||||
Reference in New Issue
Block a user