-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
✨ feat: Implement basic Group Functionality #5934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @rubentalstra here's the group-based modelspecs filtering feature I developed on my fork: https://github.com/maxesse/LibreChat/tree/feat/group-based-modelspecs-access |
…ser Filtering Logic
Updated to use the new |
Hello, thank you for working on this! Would this feature allow prompts to be shared within groups? |
Any word on this feature @danny-avila ? I know you're busy! |
FYI: this feature needs to be rewritten. because it needs to be universal groups. this PR is just only for reference purposes. |
Summary
This pull request includes significant changes to the group management and OpenID strategy, as well as updates to the client-side model specifications handling. The most important changes include the introduction of group management methods, enhancements to OpenID strategy for group handling, and updates to the client-side model specifications to respect user group permissions.
Group Management Enhancements:
api/models/Group.js
: Added theGroup
model definition using Mongoose.api/models/groupMethods.js
: Implemented methods for creating, updating, finding, and deleting groups, including checks for user assignments and overriding deletions.config/assign-group.js
: Created a script to assign a group to a user via CLI with necessary validations and error handling.config/create-group.js
: Added a script to create a new group with options for local or OpenID group types.OpenID Strategy Enhancements:
api/strategies/openidStrategy.js
: Introduced functions to extract roles from tokens and update user groups based on these roles, integrated into the OpenID strategy setup. [1] [2] [3] [4] [5] [6]api/strategies/openidStrategy.spec.js
: MockedfindGroup
method for testing the OpenID strategy.Client-Side Model Specifications:
client/src/components/Chat/Menus/Models/ModelSpecsMenu.tsx
: Filtered model specifications based on user groups, ensuring only allowed specs are displayed. [1] [2] [3] [4]client/src/components/Chat/Menus/Models/ModelSpec.tsx
: Added support for displaying badges on model specifications.Additional Changes:
api/models/index.js
: Included theGroup
model in the exports. [1] [2]librechat.example.yaml
: Added example configuration for model specifications with group assignments.Change Type
Testing
Test Configuration:
Checklist