Libraries for AI driven chat-bot?

Hello,

I am looking for Elixir libraries to build a chat / recommendations bot. It should be AI driven (Open AI or Gemini) accelerated by data (about locations and businesses) stored in RDBMS.

Thank you.

I just Googled Elixir chatgpt and got this:

Seems like it suits your requirements.

2 Likes

I’m aware of 3 libraries at the moment:

  • langchain | Hex - I didn’t try this one myself, but looking at the docs it has a lot of stuff that’ll help with tools calls. That’d be my first choice.
  • instructor | Hex - This one is mostly for structured outputs, but can be useful nonetheless. Make sure to check out the main branch, as all the juicy recent changes haven’t been published yet
  • instructor_lite | Hex my fork of instructor. I’d say if you find yourself struggling to write custom stuff with instructor, take a look at this one. It’s simpler and easier to embed into your own code.
4 Likes

Check out instructor_ex - even if it doesn’t do quite what you want it should provide some inspiration / examples:

1 Like

Thank you all, I appreciate that.

@martosaur @al2o3cr @arcyfelix

Thanks for sharing, all helpful. I will tell you more about our needs so you can hopefully help me to choose better between the different libraries.

We are building a chat-bot which should help people choose a restaurant to dine at or to order food delivery. Users will be authenticated and data from previous chats will be stored in RDBMS in order to fine-tune future suggestions by the chat-bot.

The chat session will have stages:

A. Understand if users want to dine at a restaurant or want to order delivery.
B. Understand cuisine type / preference of user.
C. Provider suggestions based on AI or/and data about restaurants we have at RDBMS.
D. Help user make an order online using 3rd party API’s

What do you think, which library can suit these needs better? Thank you.

1 Like

In the meantime, I have started experimenting with langchain. So far so good.

In case you are using self-hosted LLMs with ollama, I’ve written this API wrapper: ollamex | Hex

1 Like