GithubHelp home page GithubHelp logo

home-assist's Introduction

Brandenburger Tor | Photo: Daniel Le Brandenburger Tor | Photo: Daniel Le

Home Assist is a personal project designed to assist refugees, migrants, and expats who are moving to Germany. The main goal of this project is to simplify the settlement process in Germany, with a particular focus on housing-related topics.

This is an on-going project, and the current version is a prototype that provides general information and assistance on various topics, such as finding accommodation, understanding the rental market, and dealing with landlords. The project uses the OpenAI GPT-3.5 model with the employment of RAG (Retrieval-Augmented Generation) to retrieve relevant information from a provided knowledge base and generate responses to user queries.

Project Structure

The application is divided into two main parts (architecture-wise): the backend and the frontend.

Backend

It is built with Python and uses the OpenAI GPT-3.5 model to generate responses to user queries. The backend is responsible for processing user inputs and generating appropriate responses. The main file is backend_app.py, and it uses the HomeAssist class from model.py to interact with the AI model. The LLM model is backed RAG to retrieve relevant information from a provided knowledge base, and by Pinecone, a vector database that allows for fast and efficient similarity search for our knowledge base.

TODO: To integrate Langchain agent for accessing a broader knowledge base, e.g. with Google search capability.

The backend app is deployed with FastAPI and runs on port 8112. The endpoint is /ask, and it accepts POST requests with a JSON payload containing the user's query, including chat history.

Frontend

The frontend app is built with Streamlit and provides a user-friendly interface for interacting with the AI model. The main file is frontend_app.py, which sets up the Streamlit interface and handles user inputs and outputs. The frontend app runs on port 8111, and it communicates with the backend app by making POST requests to the backend API.

Deployment

The project is containerized using Docker and can be run using Docker Compose. The docker-compose.yaml file contains the configuration for running the backend and frontend services.

To start the project, run the following command in the terminal after you already exported the require secrets to environment variables:

docker-compose up

This will start the backend service on port 8112 and the frontend service on port 8111.

Secrets to be exported to environment variables: .envrc:

export OPENAI_API_KEY=""
export PINECONE_API_KEY=""
export PINECONE_API_ENV=""

Contributing

Feedback and suggestions are always welcome.

License

This project is licensed under the terms of the LICENSE file.

Disclaimer

This project is intended to provide general information and assistance to individuals moving to Germany. It is not a substitute for professional advice or help and should not be relied on for making decisions. Always seek the advice of a qualified professional for any questions you may have.

Acknowledgements

This project uses the OpenAI GPT-3.5 model for generating responses. The use of this model is subject to the terms and conditions of OpenAI.

Contact

For any questions or feedback, please reach out to me at [email protected].

home-assist's People

Contributors

khoadaniel avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.