anything-llm
anything-llm copied to clipboard
[FEAT]: call to custom endpoint and db integration
What would you like to see?
-
possibility of creating endpoints (figure out if this can be done from UI) where if I ask the chatbot to send an email, it calls an endpoint or ad hoc function to send said email. Once sent it should respond with a success or alternatively an error message.
-
The idea would also be to be able to integrate an external database with the chatbot. So let's take the example of a hotel reservation: to the chatbot I say I would like to stay at your hotel and there are 4 people. The chatbot responds by suggesting a couple of different rooms that suit me. I tell it that I want to make a reservation for days 1 and 2. The chatbot checks on an external db (to figure out if it calls an ad hoc endpoint) and tells the user whether or not the room is available. Etc etc. I don't know if I explained myself. In my opinion it is a very interesting feature. Let me know, I can give you support in development and work on it together
This seems like it can be split into two tickets:
-
Agent action support (or skills). This is actually something we have on our internal mind-map for the future :) There is a lot of work around this to get even trivial actions to work though. We did try to get it working on a local branch and it was really finicky.
-
This is just a data connector for "SQL connector" where it can basically craft + fetch live data from a real DB
For point 1, clear, I guess there is a lot of work behind it. I tried to run it from a blank project and it was pretty tricky, let alone in a project like this.
Point 2, yes it is about a "SQL connector" although it should be a bit smarter: if I type "I would like to reserve room "x" for the day February 22, 2024 for 1 person" the system should figure out what I am asking for and make the correct query to the database. In your opinion, how would this "conversion" into a precise API request happen? Using a "text to SQL" functionality? Do you have any idea of implementing this functionality anytime soon anyway? They would be very convenient!