infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
22.85k stars 2.24k forks source link

[Bug]: This get_answer API does not support streaming output. #2548

Open Weishaoya opened 1 month ago

Weishaoya commented 1 month ago

Is there an existing issue for the same bug?

Branch name

main

Commit ID

the latest code

Other environment information

os: ubuntu 22.04

Actual behavior

This get_answer API does not support streaming output.

Expected behavior

No response

Steps to reproduce

When the "stream" param is set to false, the output:
{
    "data": {
        "answer": "您好!有什么我可以帮助您的吗?",
        "reference": []
    },
    "retcode": 0,
    "retmsg": "success"
}

When the "stream" param is set to true, the output:
{
    "retcode": 500,
    "retmsg": "chat() got multiple values for argument 'stream'",
    "data": {
        "answer": "**ERROR**: chat() got multiple values for argument 'stream'",
        "reference": []
    }
}

Additional information

No response

KevinHuSh commented 1 month ago

Drop this parameter while using stream .

Weishaoya commented 1 month ago

Thank you, KevinHuSh.