mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-22 10:08:34 +00:00
fix plugin mode bug;Optimize the parsing logic for model response
This commit is contained in:
parent
8876bd2a7a
commit
9b8adc5d6c
@ -155,7 +155,7 @@ class BaseOutputParser(ABC):
|
||||
cleaned_output = cleaned_output[: -len("```")]
|
||||
cleaned_output = cleaned_output.strip()
|
||||
if not cleaned_output.startswith("{") or not cleaned_output.endswith("}"):
|
||||
logger.info("illegal json processing")
|
||||
logger.info("illegal json processing:\n" + cleaned_output)
|
||||
cleaned_output = self.__extract_json(cleaned_output)
|
||||
cleaned_output = (
|
||||
cleaned_output.strip()
|
||||
|
Loading…
Reference in New Issue
Block a user