dify icon indicating copy to clipboard operation
dify copied to clipboard

can not list conversations via the service api

Open badbye opened this issue 1 year 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.11.2

Cloud or Self Hosted

Cloud

Steps to reproduce

doc: https://cloud.dify.ai/app/6a1e97c1-4864-414a-9cbe-aab3b46d86ba/develop#conversations

curl -X GET 'https://api.dify.ai/v1/conversations?user=abc-123&last_id=&limit=20'\ --header 'Authorization: Bearer {api_key}'
  1. The doc said the user parameter is "用户标识,由开发者定义规则,需保证用户标识在应用内唯一。", it not clear enough. I have no idea what should I use.

  2. Not matter I ignore the user parameter, or use my username/email, it returns nothing.

✔️ Expected Behavior

I expect it return the conversation list shows in the app log page.

image

❌ Actual Behavior

returns nothing

badbye avatar Nov 25 '24 03:11 badbye

I found a similar open issue titled "API's Arg user can be empty" which might be related to the problem you're experiencing. This issue is still open and was last updated on November 24, 2024, but it doesn't have any comments or solutions yet [1].

Regarding the 'user' parameter, the correct format and expected value is a string, such as "abc-123" [2]. It seems like the documentation might not be clear enough on what specific value to use for the 'user' parameter. It should be a unique identifier for the user within your application, as defined by your own rules.

If using your username or email doesn't work, ensure that the 'user' parameter is set to a unique identifier that your application recognizes. If the issue persists, it might be worth checking if there are any specific authentication or permission requirements needed to access the conversation list via the API, although I couldn't find specific details on this [2].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Nov 25 '24 03:11 dosubot[bot]