Open sun-timer opened 2 days ago
curl -X POST "http://localhost:5670/api/v2/chat/completions"
-H "Authorization: Bearer dbgpt"
-H "accept: application/json"
-H "Content-Type: application/json"
-d "{"messages":"Hello","model":"chatgpt_proxyllm", "stream": true}"
it is a normal chat, you can set your mode like
DBGPT_API_KEY=dbgpt
DB_NAME="{your_db_name}"
curl -X POST "http://localhost:5670/api/v2/chat/completions" \
-H "Authorization: Bearer $DBGPT_API_KEY" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{\"messages\":\"show space datas limit 5\",\"model\":\"chatgpt_proxyllm\", \"chat_mode\": \"chat_data\", \"chat_param\": \"$DB_NAME\"}"
reference: http://docs.dbgpt.cn/docs/api/datasource
thank u for answer. What I mean is that it returned an incorrect response, which is that the streaming output did not output the complete table at the end. I use Source Code Deployment, where shall I modify to fix it
it looks like web chat data app not correct , can you show the whole complete chat data screen shot? did you specify your db name?
Search before asking
Operating system information
Linux
Python version information
3.10
DB-GPT version
latest release
Related scenes
Installation Information
[X] Installation From Source
[ ] Docker Installation
[ ] Docker Compose Installation
[ ] Cluster Installation
[ ] AutoDL Image
[ ] Other
Device information
x86_64 NVIDIA GeForce GTX 1080
Models information
LLM: iFlytekSpark-13B Embedding model:text2vec-large-chinese
What happened
When I call the streaming answer mode with the API, the answer result is only JSON characters, without data.
What you expected to happen
Return streaming output results, just like non streaming output.
How to reproduce
curl -X POST "http://localhost:5670/api/v2/chat/completions" \ -H "Authorization: Bearer dbgpt" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -d "{\"messages\":\"Hello\",\"model\":\"chatgpt_proxyllm\", \"stream\": true}"
Additional context
nothing
Are you willing to submit PR?