Feat: let image citation being shown. (#7624)

### What problem does this PR solve?

#7623

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2025-05-13 19:30:05 +08:00
committed by GitHub
parent b4cc37f3c1
commit 01330fa428
3 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@
#
import json
import logging
import re
from abc import ABC
import pandas as pd
@ -59,6 +60,7 @@ class Retrieval(ComponentBase, ABC):
def _run(self, history, **kwargs):
query = self.get_input()
query = str(query["content"][0]) if "content" in query else ""
query = re.split(r"(USER:|ASSISTANT:)", query)[-1]
kb_ids: list[str] = self._param.kb_ids or []