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
..
2024-07-24 18:02:22 +08:00
2024-07-18 14:33:30 +08:00
2024-06-06 11:13:39 +08:00
2024-07-22 19:17:30 +08:00
2024-06-06 11:13:39 +08:00
2024-07-22 19:17:30 +08:00
2024-05-20 09:23:57 +08:00
2024-07-24 12:46:43 +08:00
2024-07-23 14:00:31 +08:00
2024-05-29 16:50:02 +08:00