{"id":17464424,"url":"https://github.com/brainlid/langchain_demo","last_synced_at":"2025-04-05T06:07:56.007Z","repository":{"id":198573126,"uuid":"701079403","full_name":"brainlid/langchain_demo","owner":"brainlid","description":"Demo web project using the Elixir LangChain library","archived":false,"fork":false,"pushed_at":"2025-02-16T13:52:13.000Z","size":878,"stargazers_count":144,"open_issues_count":2,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T05:08:01.199Z","etag":null,"topics":["demo","elixir","langchain","langchain-app","phoenix-framework"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainlid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T21:49:46.000Z","updated_at":"2025-03-09T06:01:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"a82194e8-2889-460d-96f8-7dce6a379f5e","html_url":"https://github.com/brainlid/langchain_demo","commit_stats":null,"previous_names":["brainlid/langchain_demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainlid%2Flangchain_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainlid%2Flangchain_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainlid%2Flangchain_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainlid%2Flangchain_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainlid","download_url":"https://codeload.github.com/brainlid/langchain_demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294539,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","elixir","langchain","langchain-app","phoenix-framework"],"created_at":"2024-10-18T10:45:42.519Z","updated_at":"2025-04-05T06:07:55.990Z","avatar_url":"https://github.com/brainlid.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Logo with chat chain links](./elixir-langchain-link-logo_32px.png) Elixir LangChain Demo App\n\nThis project is a demonstration example using the [Elixir LangChain](https://github.com/brainlid/langchain) library and [Phoenix LiveView](https://www.phoenixframework.org/).\n\nTo start your LangChain Demo project:\n\n  * Run `mix setup` to install and setup dependencies\n  * Setup your `export OPENAI_API_KEY=`, you can find more [here](https://platform.openai.com/docs/quickstart/step-2-setup-your-api-key)\n  * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`\n\nNow you can visit [`localhost:4400`](http://localhost:4400) from your browser.\n\n## Conversations\n\nVisit the [Conversations](http://localhost:4004/conversations) page for having a conversation with ChatGPT.\n\nYou can cancel a request in flight, delete a message, edit a message, and resubmit the conversation.\n\nFeatures:\n- Conversations are written to a SQLite database in the project directory.\n- Conversations are performed using the [Elixir LangChain](https://github.com/brainlid/langchain) library.\n- Uses Phoenix LiveView [Async Operations](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-async-operations).\n- Use \u003ckbd\u003ectrl+enter\u003c/kbd\u003e to submit a message.\n\n![Example GIF showing usage with editing and resubmitting](./ConversationDemo.gif)\n\n## Personal Fitness AI Agent\n\nAn [Agent](https://python.langchain.com/docs/modules/agents/) can be described as:\n\n\u003e **Agent**: a language model is used as a reasoning engine to determine which actions to take and in which order.\n\nVisit the [Personal Fitness Trainer](http://localhost:4004/agent_chat) page to meet with your own Personal AI Fitness Trainer.\n\nSuggestion: Ask \"how do we start?\" to get started and go from there!\n\nFor an overview and to see it in action, check out the video:\n\n[![Youtube demo video](./YoutubeLinkImage.png)](https://www.youtube.com/watch?v=AsfQNtoaB1M)\n\nThere is a companion [blog post about it](https://fly.io/phoenix-files/created-my-personal-ai-fitness-trainer-in-2-days/) as well that gives an overview of how it works.\n\nYou can create a weekly workout plan to help you reach your goals. Information about you is stored in a local SQLite database. Report on your workouts to your assistant and they will log them for you. The assistant can access your stored information and historical workout logs to answer questions and help you on your personal fitness journey! 💪\n\nFeatures:\n- Context around how the AI is configured is hidden from the user.\n- Data about the user is written in a structured format by the AI into a local SQLite database.\n- Historical fitness log entries are stored and fetched from the local database.\n- Provides a simple but powerful working example of how to create an AI assistant in Elixir that integrates with your app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainlid%2Flangchain_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainlid%2Flangchain_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainlid%2Flangchain_demo/lists"}