[BUG]: API endpoint for workspace chats and thread chats are inconsistent and reversed #2990
Labels
investigating
Core team or maintainer will or is currently looking into this issue
possible bug
Bug was reported but is not confirmed or is unable to be replicated.
How are you running AnythingLLM?
Docker (local)
What happened?
When fetching chat history from
api/v1/workspace/slug/chats
(so the "default" thread) the array is reversed. Additionally, the order of "assistant" and "user" is reversed on top of the whole array being reversed.Example
api/v1/workspace/slug/chats
:The history displayed in the web UI start with me asking "quick test" and assistant replying "How can I assist you?" which is correct.
Example
api/v1/workspace/slug/threads/tslug/chats
:I believe this is endpoint is the correct one.
Are there known steps to reproduce?
No response
The text was updated successfully, but these errors were encountered: