mirror of
https://github.com/infiniflow/ragflow
synced 2026-05-24 09:39:28 +00:00
### 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)
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| api_app.py | ||
| canvas_app.py | ||
| chunk_app.py | ||
| conversation_app.py | ||
| dataset_api.py | ||
| dialog_app.py | ||
| document_app.py | ||
| file2document_app.py | ||
| file_app.py | ||
| kb_app.py | ||
| llm_app.py | ||
| system_app.py | ||
| user_app.py | ||