An open API service indexing awesome lists of open source software.

https://github.com/dreamingechoes/phoenix_live_view_ai_filters_poc

POC for AI-powered project filtering using OpenAI to generate JSON filters based on user queries in a Phoenix LiveView app.
https://github.com/dreamingechoes/phoenix_live_view_ai_filters_poc

elixir elixir-lang opeanai-api openai phoenix-liveview

Last synced: 4 months ago
JSON representation

POC for AI-powered project filtering using OpenAI to generate JSON filters based on user queries in a Phoenix LiveView app.

Awesome Lists containing this project

README

        

# **Phoenix LiveView AI Filters POC**

An AI-powered, natural language search input built with **Phoenix LiveView**, **OpenAI**, and **Ecto**. This proof-of-concept demonstrates how to dynamically generate filters from user queries and apply them in real-time without requiring users to manually configure search filters.

## ๐ŸŽฅ **Demo**

Watch the demo video: **[Demo Link](https://www.awesomescreenshot.com/video/36903860?key=5dca7faccf4cdef5db3d1c5fdca39908)**.

## โš™๏ธ **Configuration**

Before starting the app, set up the **OpenAI API key** in `config/dev.exs`:

```elixir
# OpenAI
config :openai,
api_key: YOUR_OPENAI_API_KEY
```

### **OpenAI Setup**

To enable AI-powered search filtering, set up an OpenAI account and obtain an API key:

1. Sign up at [OpenAI](https://openai.com)
2. Retrieve your **API Key** from the OpenAI dashboard
3. Replace `YOUR_OPENAI_API_KEY` in `config/dev.exs` with your actual key

---

## ๐Ÿš€ **Getting Started**

Follow these steps to set up and run the application:

### **1๏ธโƒฃ Clone the Repository**

```sh
git clone
cd phoenix_liveview_ai_filters_poc
```

### **2๏ธโƒฃ Set Up Configuration**

Modify `config/dev.exs` with your OpenAI API credentials.

### **3๏ธโƒฃ Install Dependencies**

```sh
mix deps.get
```

### **4๏ธโƒฃ Set Up the Database**

```sh
mix ecto.create
mix ecto.migrate
```

### **5๏ธโƒฃ Start the Application**

```sh
iex -S mix phx.server
```

Open your browser and visit: **http://localhost:4000/projects**

## ๐Ÿงช **Running Tests**

To run the test suite, execute the following command:

```sh
mix test
```

## โœจ **Features**

๐Ÿ‘‰ **Natural Language Search** โ€“ Users type queries naturally, and AI converts them into structured filters.
๐Ÿ‘‰ **Real-Time Updates** โ€“ **Phoenix LiveView** ensures search results update instantly without reloading the page.
๐Ÿ‘‰ **AI-Powered Filtering** โ€“ **OpenAI GPT-4** translates user queries into **Ecto-compatible filters**.
๐Ÿ‘‰ **Multi-Language Support** โ€“ AI understands and processes queries in multiple languages.
๐Ÿ‘‰ **Scalable & Flexible** โ€“ The search system can be expanded to support additional data sources.

## ๐Ÿ“ **License**

This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) file for more details.