feat: enhance VLM response parsing and DOUBAO model support

- Fix JSON extraction logic by prioritizing brace counting method
- Add support for DOUBAO string array coordinate format
- Introduce IS_UI_TARS helper function for model type checking
- Add comprehensive tests for JSON parsing and coordinate handling
- Improve error handling with retry delays for LLM service failures
This commit is contained in:
lilong.129
2025-06-10 15:56:13 +08:00
parent 4959c2e47e
commit 88ae8faee1
9 changed files with 307 additions and 20 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func NewAsserter(ctx context.Context, modelConfig *ModelConfig) (*Asserter, erro
systemPrompt: defaultAssertionPrompt,
}
if modelConfig.ModelType == option.DOUBAO_1_5_UI_TARS_250428 {
if option.IS_UI_TARS(modelConfig.ModelType) {
asserter.systemPrompt += "\n" + uiTarsAssertionResponseFormat
} else {
// define output format