Giter Club home page Giter Club logo

Comments (6)

pseudotensor avatar pseudotensor commented on June 15, 2024

If they are existing users, you can add them to their auth.json entries and/or they can push the sync button in the UI.

For new users, one would pass additional things, e.g.

--langchain_modes="['UserData','UserData2','LLM','MyData']"  --langchain_mode_paths="{'UserData': 'user_path', 'UserData2': 'user_path2'}" --langchain_mode_types="{'UserData': 'shared', 'UserData2': 'shared'}"

i.e.

(h2ogpt) jon@pseudotensor:~/h2ogpt$ python generate.py --langchain_modes="['UserData','UserData2','LLM','MyData']"  --langchain_mode_paths="{'UserData': 'user_path', 'UserData2': 'user_path2'}" --langchain_mode_types="{'UserData': 'shared', 'UserData2': 'shared'}" 

gives in UI for random new user:

image

FYI, if you do it this way, you don't need to pass --user_path separately.

from h2ogpt.

pseudotensor avatar pseudotensor commented on June 15, 2024

Closing, if issues, let me know and I'll still respond.

from h2ogpt.

llmwesee avatar llmwesee commented on June 15, 2024

@pseudotensor Still Not working. Suppose h2ogpt with multiple collections is hosted on the server, now i want all the users/clients must have access those Collections.

HF_DATASETS_OFFLINE=1 TRANSFORMERS_OFFLINE=1 python generate.py --inference_server="vllm:127.0.0.1:5000" --base_model='/home/xyz/.cache/huggingface/hub/models--meta-llama--Llama-2-13b-chat-hf/snapshots/c2f3ec81aac798ae26dcc57799a994dfbf521496' --score_model=None --langchain_modes="['UserData','UserData2','LLM','MyData']" --langchain_mode_paths="{'UserData': 'user_path', 'UserData2': 'user_path2'}" --langchain_mode_types="{'UserData': 'shared', 'UserData2': 'shared'}" --use_auth_token=True --max_seq_len=4096 --max_max_new_tokens=2048 --max_new_tokens=2048 --min_new_tokens=128 --concurrency_count=64 --batch_size=16 --prompt_type=llama2 --enable_stt=False --enable_tts=False --auth_filename=$auth_filename --auth_access=open --guest_name=abc --auth="[(admin, admin)]"

One thing I noticed when i just remove the --auth="[(admin, admin)]" then it works perfectly and all the users have access to those Collections.

from h2ogpt.

pseudotensor avatar pseudotensor commented on June 15, 2024

Hi, I'm still not seeing any issues.

I ran like this:

(h2ogpt) jon@pseudotensor:~/h2ogpt$ python generate.py --langchain_modes="['UserData','UserData2','LLM','MyData']"  --langchain_mode_paths="{'UserData': 'user_path', 'UserData2': 'user_path2'}" --langchain_mode_types="{'UserData': 'shared', 'UserData2': 'shared'}" --auth="[(admin, admin)]" --auth_filename=auth_test.json --auth_access=open --guest_name=guest

Note that if you use an auth file, the --auth="[(admin, admin)]" is ignored and only used to indicate a non-empty --auth parameter that (as opposed to --auth='' will enable auth.

Since access is open, I can use any new user. I used 'jon' and see this:
image

Note that any existing user won't see newly added collections. E.g. if I add another collection:

(h2ogpt) jon@pseudotensor:~/h2ogpt$ python generate.py --langchain_modes="['UserData','UserData2','UserData3','LLM','MyData']"  --langchain_mode_paths="{'UserData': 'user_path', 'UserData2': 'user_path2', 'UserData3': 'user_path3'}" --langchain_mode_types="{'UserData': 'shared', 'UserData2': 'shared', 'UserData3': 'shared'}" --auth="[(admin, admin)]" --auth_filename=auth_test.json --auth_access=open --guest_name=guest

And go into jon I only see the original 2 because that was what is in the auth json file.

image

But a new user jon2 will see all:

image

I think maybe that is what you meant to describe, that existing users don't see new shared collections when you add new collections to the CLI?

from h2ogpt.

llmwesee avatar llmwesee commented on June 15, 2024

Yes, the existing users and also the new user don't see newly created shared collections

from h2ogpt.

pseudotensor avatar pseudotensor commented on June 15, 2024

Should be fixed now. Wasn’t bug just feature request.

from h2ogpt.

Related Issues (20)

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.