marella / chatdocs

Chat with your documents offline using AI.
MIT License
696 stars 101 forks source link

Feature: --listen #15

Closed pyrater closed 1 year ago

pyrater commented 1 year ago

Is there a way to add the --listen flag to access the ui from other computers on the net. Would it be as simple as me changing line 63 in util.py from app.run(host="localhost", port=config["port"], use_reloader=False) to app.run(host="0.0.0.0", port=config["port"], use_reloader=False) ?

MichaelMurithi commented 1 year ago

I tried changing the host and port in app.run() to make it accessible to the internet but unfortunately it did not work for me. As you suggested, I think it is a feature that can be considered.

pyrater commented 1 year ago

Got it to work by doing this:

  1. open chatdocs.yml and add ip: 0.0.0.0 above the port line.

image

  1. Open ui.py and replace localhost on line 63 with config["ip"] image

then open a cmd window like your going to run chatdocs ui but instead do: pip uninstall chatdocs
pip install ./

This will reinstall / install with the new changes and it will be able to be accessed via the network.

ADDED PR to push changes to main.