P.S: Please remember to start your supabase container from the project dir locally.!!
Description:
The functionality of RAG based chat bot using gpt3.5 through OPENAI API. The program is ready to be run in the /rag directory. It has the authentication with mock email verification, uploading file feature through a simple UI, and chat feature to ask questions to the files uploaded. Currently the models's temperature is set to 0 and the agent is configured to answer solely questions based on the documents uploaded. It uses no creativity considering this being personalized and answering solely from user's knowledge-base.
Changes:
Chat bot
Auth through supabase- mock email verification
File upload feature
Dependencies and pre-req:
In order to run this on your local device please follow the below instructions and let me know if you encounter an issue. Probably I already went through that:)
Make sure the following is installed:
Docker
Node.js 18+
Dependencies:
Installations through npm and brew. If not using these please find related package manager commands.
Run them in order specifically the ones related to supabase.
Pull the changes from the repo and cd into '/rag' directory
npm install next react react-dom
npm install
npx supabase start
npx supabase status -o env \
--override-name api.url=NEXT_PUBLIC_SUPABASE_URL \
--override-name auth.anon_key=NEXT_PUBLIC_SUPABASE_ANON_KEY |
grep NEXT_PUBLIC > .env.local
brew install deno
npm i @xenova/transformers ai
cat > supabase/functions/.env <<- EOF
OPENAI_API_KEY=
EOF
How to run:
It is configured to be run on localhost:3000
npm run dev
Useful commands:
In case you make local changes on supabase db some useful commands:
!! For cloud deployment the commands are different.
To push the migrations: npx supabase migration up
To serve functions: npx supabase functions serve
To reset the supabase db: supabase db reset
To get the supabase status(including studio link): supabase status
Future work and notes:
1- Version does not have the functionality for LLM model plugin. This should be provided by taking the model form a config. Caution to see if for generate_message for the chat can be done in the same manner for all models.
2- This contains UI component and Auth on supabase. The team members responsible for these functionality needs to revise and adopt the features based on their design. Can remove as well if this does not serve your purpose. @GuoFan1996 @Huimin22
3- Chat UI needs to be redesigned/integrated/removed based on the DragonAI design. @TanyaaCJain @cemtu
4- This runs on local so if it is going to be moved to the cloud changes will be made.
5- All these dependency installations and run commands can be scripted at the end.
Please revise the code, run for yourself and provide feedback. You can use sample files in sample_files directory or can experiment with your own files. Cheers!
P.S: Please remember to start your supabase container from the project dir locally.!!
Description: The functionality of RAG based chat bot using gpt3.5 through OPENAI API. The program is ready to be run in the /rag directory. It has the authentication with mock email verification, uploading file feature through a simple UI, and chat feature to ask questions to the files uploaded. Currently the models's temperature is set to 0 and the agent is configured to answer solely questions based on the documents uploaded. It uses no creativity considering this being personalized and answering solely from user's knowledge-base.
Changes:
Chat bot Auth through supabase- mock email verification File upload feature Dependencies and pre-req: In order to run this on your local device please follow the below instructions and let me know if you encounter an issue. Probably I already went through that:)
Make sure the following is installed: Docker Node.js 18+ Dependencies: Installations through npm and brew. If not using these please find related package manager commands. Run them in order specifically the ones related to supabase. Pull the changes from the repo and cd into '/rag' directory npm install next react react-dom npm install npx supabase start npx supabase status -o env \ --override-name api.url=NEXT_PUBLIC_SUPABASE_URL \ --override-name auth.anon_key=NEXT_PUBLIC_SUPABASE_ANON_KEY | grep NEXT_PUBLIC > .env.local
brew install deno npm i @xenova/transformers ai
cat > supabase/functions/.env <<- EOF OPENAI_API_KEY=
EOF
How to run:
It is configured to be run on localhost:3000
npm run dev
Useful commands: In case you make local changes on supabase db some useful commands: !! For cloud deployment the commands are different.
To push the migrations: npx supabase migration up To serve functions: npx supabase functions serve To reset the supabase db: supabase db reset To get the supabase status(including studio link): supabase status Future work and notes: 1- Version does not have the functionality for LLM model plugin. This should be provided by taking the model form a config. Caution to see if for generate_message for the chat can be done in the same manner for all models. 2- This contains UI component and Auth on supabase. The team members responsible for these functionality needs to revise and adopt the features based on their design. Can remove as well if this does not serve your purpose. @GuoFan1996 @Huimin22 3- Chat UI needs to be redesigned/integrated/removed based on the DragonAI design. @TanyaaCJain @cemtu 4- This runs on local so if it is going to be moved to the cloud changes will be made. 5- All these dependency installations and run commands can be scripted at the end.
Please revise the code, run for yourself and provide feedback. You can use sample files in sample_files directory or can experiment with your own files. Cheers!