Skip to content

opensource flask gpt boillerplate for talking with your documents

Notifications You must be signed in to change notification settings

johnsmithm/openchatdoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenChatDoc - opensource flask gpt boillerplate for talking with your documents

GitHub Repo stars Twitter Follow

Key Features 🎯

  • OpenChatDoc: OpenChatDoc is a versatile open-source project for file management and conversation using Flask framework.
  • Simple UI: The user interface of OpenChatDoc is designed to be straightforward and user-friendly.
  • OpenAI Integration: OpenChatDoc harnesses the power of OpenAI to facilitate intelligent conversations and information retrieval.
  • Local Embeddings Storage: OpenChatDoc utilizes the FAISS library to store embeddings locally, enabling efficient search and retrieval of data.
  • File Upload Support: OpenChatDoc allows users to upload various file formats, including docx, doc, pdf, and txt files.
  • Multi-File Interactions: OpenChatDoc supports conversations and interactions with multiple files simultaneously.

Demo Highlights 🎥

opendoc.mp4

Connect with me

twitter linkedin telegram

How to Use OpenChatDoc 🚀

  1. Clone the OpenChatDoc repository:
git clone https://github.com/johnsmithm/openchatdoc.git
  1. Install the required dependencies using pip:
pip install -r requirements.txt
  1. set env variable :
copy .env_example .env
OPENAI_API_KEY="sk-.."
  1. Start the Flask server:
python app.py 5000
  1. Access OpenChatDoc in your web browser at http://localhost:5000.

Note: Please ensure that you have Python and Flask installed on your system before running OpenChatDoc.

Contributing 🤝

Contributions to OpenChatDoc are welcome! Here are a few ways you can contribute:

  • Bug fixes and issue resolution
  • Feature enhancements
  • Documentation improvements
  • Writing and optimizing tests

This project is built by amazing volunteers and you can be one of them! Here's a list of ways in which you can contribute to this project.

If you want to make any change to this repository, please make a fork first.

If you see something that doesn't quite work the way you expect it to, open an Issue. Make sure to describe what you expect to happen and what is actually happening in detail.

If you would like to suggest new functionality, open an Issue and mark it as a [Feature request]. Please be specific about why you think this functionality will be of use. If you can, please include some visual description of what you would like the UI to look like, if you are suggesting new UI elements.

Make sure the code format is ok

pylint $(git ls-files '*.py')

Built With

Flask

Programming languages

Python 3.8.1

Run & Development

Docker

Docker is used to run the development version, so you'll need to install Docker and docker-compose.

In case you are using WSL with Docker for Desktop (version 2.2.0.4) on Windows: you need to have your repository on the Windows file system rather than on the WSL one because otherwise the volume won't be mounted (solution inspired from this work around: docker/for-win#2151 (comment))

sudo docker build -t chatfile:1 -f Dockerfile .
sudo docker run -it -d  -p 6017:6017 -v "$(pwd)":/app --name chatfile_ chatfile:1
sudo docker exec -ti chatfile_ bash
python app.py 6017

go to localhost 6017

Pycharm

To run the application using Pycharm you need to install MongoDB Community Edition following steps from documentation. Steps below work for all OS where Pycharm is available.

  1. Install pycharm community edition
  2. Open the project in pycharm
  3. Open terminal from pycharm Alt+F12 or View -> Tool Windows -> Terminal
  4. Install pipenv from terminal if it's not installed yet:
    $ pip install pipenv
    
  5. Install dependencies from Pipfile
    $ pipenv install
    
  6. Add new configuration for python: Run -> Edit Configurations... -> + -> Python
  7. Change option "Script Path" to "Module Name"
  8. Enter "flask" in input for "Module Name"
  9. Enter run in input "Parameters"
  10. Open and add new Environment variables:
    • OPENAI_API_KEY="sk-.."
  11. Press Ok
  12. To init databases execute command in terminal from Pycharm

Feedback

  • Request a new feature on GitHub.
  • Vote for popular feature requests.
  • File a bug in GitHub Issues.
  • Email us with other feedback moshnoi2000[at]gmail.com

License

This project is licensed under the MPL 2.0 License - see the LICENSE file for details

About

opensource flask gpt boillerplate for talking with your documents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published