Git Product home page Git Product logo

redis-project's Introduction

Redis Chat Project by rbs333

The goal showcase fun recipe helper chat app using redis for memory layer.

project overview diagram

alt text

example usage

  1. Hank asks for recs alt text

  2. Stored long term relevant preferences and last n chat messages. alt text

  3. Search in vector_store for like recipes alt text

  4. Return response and update memory layer

TODOs: so many... no particular order

  • add better serialization/deserialization for io.
  • improve typing
  • add testing
  • get load user UI stuff working
  • optimize prompts
  • dockerize
  • split user data model into different contexts
  • better manage vector embeddings and test chunk sizes
  • ...

project structure

/api
  /static
    styles.css | static assets for FE
  /templates
    index.html | main FE file
  app.py | contains routes etc.
  requirements.txt
/chat_app
  chat.py | primary application code
/data
  /docs | docs for vectoring into store
/db
  vector_store.py | code for init of vector store
  user_index.py | code for init of user index
  llm_memory.py | accessor class for chat memory
  doc_vector.py | helper class for vector store
/utilities
  ... | reusable code chunks
/settings

.env
main.py
requirements.txt

getting started

pip install -r requirements.txt //same for api if running

Using Redis Cloud must have instance running. Also, using Openai as LLM.

=> create .env of form:

OPENAI_API_KEY=
REDIS_URL=
REDIS_HOST=
REDIS_PASSWORD=
REDIS_PORT=

init db

python db/vector_store.py
python db/user_index.py

running app

cd api
flask run --debug

references

https://github.com/RedisVentures/redisvl https://github.dev/miguelgrinberg/Flask-SocketIO-Chat

redis-project's People

Contributors

rbs333 avatar

Stargazers

Tyler Hutcherson 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.