Procházet zdrojové kódy

fix: empty or contains only empty strings. (#2347)

### What problem does this PR solve?
the setting was kept empty for Empty_response. In expectation, this case
should get a response from the LLM if can't find the references from the
knowledgebase.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)


![image](https://github.com/user-attachments/assets/9c382b1d-40f6-43b0-848c-fa6863f9a253)

![image](https://github.com/user-attachments/assets/032d2001-97a2-4faa-91bf-c9c57caf2070)

Co-authored-by: Theta Wang (ncu) <chunshan.connect@gmail.com>
tags/v0.11.0
Wang před 1 rokem
rodič
revize
7fad48f42c
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      agent/component/retrieval.py

+ 2
- 1
agent/component/retrieval.py Zobrazit soubor

@@ -76,7 +76,8 @@ class Retrieval(ComponentBase, ABC):

if not kbinfos["chunks"]:
df = Retrieval.be_output("")
df["empty_response"] = self._param.empty_response
if self._param.empty_response and self._param.empty_response.strip():
df["empty_response"] = self._param.empty_response
return df

df = pd.DataFrame(kbinfos["chunks"])

Načítá se…
Zrušit
Uložit