dify icon indicating copy to clipboard operation
dify copied to clipboard

api /messages/{message_id}/suggested throw "Message Not Exists." error

Open Lyeluo opened this issue 2 years ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.16

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

after a chat work flow ,use suggested api. i get error "Message Not Exists." i sure my message_id is exits and user is right . image

✔️ Expected Behavior

get some suggested by api

❌ Actual Behavior

{ "code": "bad_request", "message": "Message Not Exists.", "status": 400 }

Lyeluo avatar Aug 12 '24 08:08 Lyeluo

        except services.errors.message.MessageNotExistsError:
            raise NotFound("Message Not Exists.")
        except SuggestedQuestionsAfterAnswerDisabledError:
            raise BadRequest("Message Not Exists.")

According to this implementation, I think you need to turn on the function in your application and publish it.

crazywoola avatar Aug 12 '24 08:08 crazywoola