Fix: meta data error. (#9670)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-08-25 09:41:52 +08:00
committed by GitHub
parent adbb038a87
commit 2f74727bb9
2 changed files with 3 additions and 1 deletions

View File

@ -114,6 +114,8 @@ def kb_prompt(kbinfos, max_tokens, hash_id=False):
docs = {d.id: d.meta_fields for d in docs}
def draw_node(k, line):
if line is not None and not isinstance(line, str):
line = str(line)
if not line:
return ""
return f"\n├── {k}: " + re.sub(r"\n+", " ", line, flags=re.DOTALL)