Skip to content

Playground project for creating a AI Elixir Assistent with the LangChain library

License

Notifications You must be signed in to change notification settings

Elmseld/langchain_dog_trainer

 
 

Repository files navigation

Logo with chat chain links My Elixir AI personal assistent

Start Page

This project is my playaround project on the langchain_demo project using the Elixir LangChain library and Phoenix LiveView.

To start your own Elixir AI personal assistent project:

  • Run mix setup to install and setup dependencies

  • Setup your export OPENAI_API_KEY=, you can find more here (Also make sure you have some $$ for tokens, lagnchain creates really hard errors if you miss that.)

  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4400 from your browser.

Conversations

Visit the Conversations page for having a conversation with ChatGPT.

You can cancel a request in flight, delete a message, edit a message, and resubmit the conversation.

Features:

  • Conversations are written to a SQLite database in the project directory.
  • Conversations are performed using the Elixir LangChain library.
  • Uses Phoenix LiveView Async Operations.
  • Use ctrl+enter to submit a message.

Example GIF showing usage with editing and resubmitting

Dog Coach (only i swedish atm)

Dog coachen is using An Agent can be sortly described as:

Agent: a language model is used as a reasoning engine to determine which actions to take and in which order.

Visit the Dog Coach page to meet with your own Dog coach that really loves dog.

Suggestion: Tell a bit about you dog and ask "hur kan jag förbättra vovves hälsa?" to get started and go from there!

Example:

Example of dog coach interaction

Features:

  • Context around how the AI is configured is hidden from the user.
  • Data about the user is written in a structured format by the AI into a local SQLite database.
  • Historical fitness log entries are stored and fetched from the local database.
  • Provides a simple but powerful working example of how to create an AI agent in Elixir that integrates with your app.

Future Features:

  • renovation-helper keep track of all projects, and help where needed
  • yoga trainer, as the normal trainer but yoga, can you integrate video support?
  • add lang-support(sv + en)

About

Playground project for creating a AI Elixir Assistent with the LangChain library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 86.9%
  • HTML 10.0%
  • JavaScript 3.0%
  • CSS 0.1%