Fix: gen metadata error. (#12212)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-12-25 19:01:22 +08:00
committed by GitHub
parent 1812491679
commit c8eeba5880
2 changed files with 8 additions and 1 deletions

View File

@ -827,7 +827,7 @@ async def relevant_chunks_with_toc(query: str, toc:list[dict], chat_mdl, topn: i
META_DATA = load_prompt("meta_data")
async def gen_metadata(chat_mdl, schema:dict, content:str):
template = PROMPT_JINJA_ENV.from_string(META_DATA)
for k, desc in schema.items():
for k, desc in schema["properties"].items():
if "enum" in desc and not desc.get("enum"):
del desc["enum"]
if desc.get("enum"):