ragflow/api/apps
petertc 8525f55ad0
Fix: Option ineffective in Chat API (#5118)
### What problem does this PR solve?

API options like `stream` was ignored when no session_id was provided.

This PR fixes the issue.

Test command and expected result:
```
curl  --request POST \
     --url http://:9222/api/v1/chats/2f2e1d30ee6111efafe211749b004925/completions \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer ragflow-xxx' \
     --data '{
   "question":"Who are you",
   "stream":false
}'
{"code":0,"data":"data:{\"code\": 0, \"message\": \"\", \"data\": {\"answer\": \"Hi! I'm your assistant, what can I do for you?\", \"reference\": {}, \"audio_binary\": null, \"id\": null, \"session_id\": \"82ceb0fcee7111efafe211749b004925\"}}\n\n"}

```



### Type of change

- [*] Bug Fix (non-breaking change which fixes an issue)
2025-02-19 13:18:51 +08:00
..
sdk Fix: Option ineffective in Chat API (#5118) 2025-02-19 13:18:51 +08:00
__init__.py Fix: Starting the source code on Windows, the 'HTTP API' returns 404 (#5042) 2025-02-17 19:33:49 +08:00
api_app.py Tagging (#4426) 2025-01-09 17:07:21 +08:00
canvas_app.py Update error message for agent name conflict (#4299) 2024-12-31 14:36:23 +08:00
chunk_app.py Light GraphRAG (#4585) 2025-01-22 19:43:14 +08:00
conversation_app.py Light GraphRAG (#4585) 2025-01-22 19:43:14 +08:00
dialog_app.py Code refactor. (#4291) 2024-12-30 18:38:51 +08:00
document_app.py Check meta data format in json map (#4461) 2025-01-13 17:34:50 +08:00
file2document_app.py Added static check at PR CI (#3921) 2024-12-08 21:23:51 +08:00
file_app.py Added static check at PR CI (#3921) 2024-12-08 21:23:51 +08:00
kb_app.py Ignore exceptions when no index ahead. (#5047) 2025-02-18 09:09:22 +08:00
llm_app.py Reformat error message. (#4829) 2025-02-10 16:47:53 +08:00
system_app.py Compatible with former API keys. (#4055) 2024-12-17 13:58:26 +08:00
tenant_app.py Update team invite message (#4085) 2024-12-18 14:20:09 +08:00
user_app.py Added static check at PR CI (#3921) 2024-12-08 21:23:51 +08:00