Update base.py

fix function __extract_json  slef --> self
This commit is contained in:
Data Hamal 2023-06-28 00:52:45 +08:00 committed by GitHub
parent a9bc57024b
commit a4493b7472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ class BaseOutputParser(ABC):
else:
raise ValueError("Model server error!code=" + respObj_ex["error_code"])
def __extract_json(slef, s):
def __extract_json(self, s):
i = s.index("{")
count = 1 # 当前所在嵌套深度,即还没闭合的'{'个数
for j, c in enumerate(s[i + 1 :], start=i + 1):