Commit 757496e7 by sunqi02

fix(query-knowledge): 修复答案提取逻辑以支持字符串类型

1 parent a5f1e6c0
...@@ -65,7 +65,10 @@ def main(): ...@@ -65,7 +65,10 @@ def main():
sys.exit(1) sys.exit(1)
for item in answers: for item in answers:
text = item.get("text", "") if isinstance(item, str):
text = item
else:
text = item.get("text", "")
if text: if text:
print(text) print(text)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!