refactor: improve JSON parsing reliability with json-repair library

Replace regex-based JSON extraction with json-repair for better handling of malformed LLM responses. Remove deprecated JSON parsing utilities and clean up keyword_extraction parameter across LLM providers.

- Remove locate_json_string_body_from_string() and convert_response_to_json()
- Use json-repair.loads() in extract_keywords_only() for robust parsing
- Clean up LLM interfaces and remove unused parameters
- Add json-repair dependency
This commit is contained in:
yangdx
2025-08-01 19:36:20 +08:00
parent 3ae9c63b26
commit 32af45ff46
11 changed files with 15 additions and 83 deletions

View File

@@ -66,6 +66,7 @@ api = [
"httpcore",
"httpx",
"jiter",
"json-repair",
"passlib[bcrypt]",
"psutil",
"PyJWT",