Open glacierck opened 3 weeks ago
Flipping through the source code, I did not find any processing parameter 'pinned'
The issue with the 'pinned' parameter not working in the ConversationApi
class is likely due to the logic for handling pinned conversations being implemented in the WebConversationService
class, specifically in the pagination_by_last_id
method. This method checks the pinned
parameter and retrieves pinned conversations based on certain criteria. If the pinned
parameter is not affecting the output as expected, it could be due to:
pinned
parameter not being passed correctly to the pagination_by_last_id
method.PinnedConversation
entries not being correctly retrieved or filtered in the database query.pagination_by_last_id
method not handling include_ids
and exclude_ids
correctly [1].Ensure that the pinned
parameter is correctly passed and that the database queries and subsequent logic are functioning as intended. The pinned
parameter is passed from the ConversationListApi
class to the pagination_by_last_id
method by parsing the request arguments and converting the "pinned" parameter to a boolean value before passing it [2].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.10.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
1.test pinned=true:
curl -X GET 'http://192.168.1.210/v1/conversations?user=abc-123&pinned=true'\ --header 'Authorization: Bearer {api_key}'
2.test pinned=fasle:curl -X GET 'http://192.168.1.210/v1/conversations?user=abc-123&pinned=fasle'\ --header 'Authorization: Bearer {api_key}'
✔️ Expected Behavior
Obtain the top and non top conversations lists separately
❌ Actual Behavior
Obtain two identical lists of non top conversations. The 'pinned' parameter is not working.