Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
27.63k stars 2.79k forks source link

Add Get Threads API #2538 #2539

Closed lewismacnow closed 3 weeks ago

lewismacnow commented 1 month ago

Pull Request Type

Relevant Issues

Resolves #2538

What is in this change?

Enhance the API for AnythingLLM by adding functionality to get all Threads

Adds "threads" Get API

Additional Information

Developer Validations

Please Peer Review!

timothycarambat commented 3 weeks ago

Temporarily closing this PR + issue for justification prior (everything works as it should).

Why can someone not just call GET /v1/workspace/:slug since this returns all thread slugs for a workspace? This also returns the user_id and slug so you can easily then form a chat from that information per-user.

https://github.com/Mintplex-Labs/anything-llm/blob/ccde891aa22c2adf585d10f8926efebd89308891/server/endpoints/api/workspace/index.js#L180-L193

It can also be returned when even listing all workspaces https://github.com/Mintplex-Labs/anything-llm/blob/master/server/endpoints/api/workspace/index.js#L119-L129