ragflow/rag
Kung Quang 32d5885b68
Fix api reference empty bug (#1655)
### What problem does this PR solve?

fix api reference empty bug
```
for chunk_i in answer['reference'].get('chunks',[]):
                   ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'get'
```
```
return np.array([d["relevance_score"] for d in res["results"]]), res["meta"]["tokens"]["input_tokens"]+res["meta"]["tokens"]["output_tokens"]
                                                   ~~~^^^^^^^^^^^
KeyError: 'results'
```
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2024-07-24 18:02:22 +08:00
..
app fix: Misspelled Variable Name (#1662) 2024-07-24 11:14:46 +08:00
llm Fix api reference empty bug (#1655) 2024-07-24 18:02:22 +08:00
nlp examples empty in categorize (#1422) 2024-07-08 17:40:50 +08:00
res build python version rag-flow (#21) 2024-01-15 08:46:22 +08:00
svr Add ParsertType Audio (#1637) 2024-07-22 19:17:30 +08:00
utils fix redis no such key (#1647) 2024-07-23 14:00:31 +08:00
__init__.py build python version rag-flow (#21) 2024-01-15 08:46:22 +08:00
raptor.py fix raptor bugs (#928) 2024-05-27 11:01:20 +08:00
settings.py optimize srv broker and executor logic (#630) 2024-05-07 11:43:33 +08:00