-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong response when delete conversation by api #5401
base: main
Are you sure you want to change the base?
Conversation
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE |
but if I use 204 status code I cannot get the success message as the dify document says from the server like the first picture I offered. the status code 204 means no further information is to be supplied. |
This is correct, so the direction for the fix could be to remove the response content from the API implementation and documentation, while keeping the 204 status code. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remain this file untouched in main branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related as well.
204 status code of means the execution was successful, so you can ignore the |
@@ -69,6 +70,13 @@ def pagination_by_first_id(cls, app_model: App, user: Optional[Union[Account, En | |||
|
|||
history_messages = list(reversed(history_messages)) | |||
|
|||
# 进行特殊处理,截取“问询”字段 | |||
for hismessage in history_messages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this particular piece of logic
@@ -58,7 +58,9 @@ class MessageListApi(Resource): | |||
'conversation_id': fields.String, | |||
'inputs': fields.Raw, | |||
'query': fields.String, | |||
'message_tokens': fields.Integer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes here are not in line with the topic of current PR, please create a new PR separately, thanks!
- "deploy/dev" | ||
release: | ||
types: [published] | ||
branches: [ main ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore this workflow to its original state.
Description
wrong response when delete conversation by api
Fixes #5400
Type of Change
How Has This Been Tested?
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes