fix delete chat bug and update fastapi http file

This commit is contained in:
Xin Wang
2026-01-08 17:32:06 +08:00
parent d5f81ef79f
commit 32c491cd3f
2 changed files with 22 additions and 147 deletions

View File

@@ -77,6 +77,7 @@ async def delete_last_two_chat_records(
return return
last_two_data_ids = [record['dataId'] for record in records[-2:]] last_two_data_ids = [record['dataId'] for record in records[-2:]]
logger.info(f"last_two_data_ids: {last_two_data_ids}")
# Delete records using SDK # Delete records using SDK
for content_id in last_two_data_ids: for content_id in last_two_data_ids:

View File

@@ -1,157 +1,47 @@
GET http://127.0.0.1:8000 @baseUrl = http://127.0.0.1:8080
###
GET http://127.0.0.1:8080
HTTP/1.1 200 - OK HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:07:21 GMT connection: close
server: uvicorn
content-length: 32 content-length: 32
content-type: application/json content-type: application/json
connection: close date: Thu, 08 Jan 2026 08:58:09 GMT
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "可以,继续"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:18:14 GMT
server: uvicorn server: uvicorn
content-length: 169
content-type: application/json
connection: close
### ###
POST http://127.0.0.1:8000/chat POST http://127.0.0.1:8080/chat
content-type: application/json content-type: application/json
{ {
"sessionId": "a0009", "sessionId": "a1002",
"timeStamp": "202503310303",
"text": "没有"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:18:24 GMT
server: uvicorn
content-length: 187
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "没有"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:18:29 GMT
server: uvicorn
content-length: 178
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "是的"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:18:38 GMT
server: uvicorn
content-length: 196
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "十点半"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:19:07 GMT
server: uvicorn
content-length: 247
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "我在现场"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:19:27 GMT
server: uvicorn
content-length: 208
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"text": "我闯红灯了"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:19:40 GMT
server: uvicorn
content-length: 231
content-type: application/json
connection: close
###
POST http://127.0.0.1:8000/chat
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303", "timeStamp": "202503310303",
"text": "【拍摄完成】" "text": "【拍摄完成】"
} }
HTTP/1.1 200 - OK HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 03:20:10 GMT
server: uvicorn
content-length: 210
content-type: application/json
connection: close connection: close
content-length: 205
content-type: application/json
date: Thu, 08 Jan 2026 08:59:37 GMT
server: uvicorn
### ###
POST http://127.0.0.1:8000/get_info POST http://127.0.0.1:8080/get_info
content-type: application/json content-type: application/json
{ {
"sessionId": "a0009", "sessionId": "a1002",
"timeStamp": "202503310303", "timeStamp": "202503310303",
"key": "acdinfo" "key": "hphm1"
} }
HTTP/1.1 200 - OK HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 05:19:05 GMT
server: uvicorn
content-length: 271
content-type: application/json
connection: close connection: close
content-length: 97
content-type: application/json
date: Thu, 08 Jan 2026 09:26:31 GMT
server: uvicorn
### ###
POST http://127.0.0.1:8000/set_info POST http://127.0.0.1:8080/set_info
content-type: application/json content-type: application/json
{ {
@@ -162,27 +52,11 @@ content-type: application/json
} }
HTTP/1.1 200 - OK HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 05:30:03 GMT connection: close
server: uvicorn
content-length: 70 content-length: 70
content-type: application/json content-type: application/json
connection: close date: Thu, 08 Jan 2026 09:25:49 GMT
###
POST http://127.0.0.1:8000/get_info
content-type: application/json
{
"sessionId": "a0009",
"timeStamp": "202503310303",
"key": "hphm1"
}
HTTP/1.1 200 - OK
date: Fri, 20 Jun 2025 05:30:27 GMT
server: uvicorn server: uvicorn
content-length: 97
content-type: application/json
connection: close
### ###
DELETE http://127.0.0.1:8000/delete_session DELETE http://127.0.0.1:8000/delete_session
content-type: application/json content-type: application/json