Closed AliSMAmin closed 1 month ago
@AliSMAmin wouldnt the issue #21 cover this specific case?
@tomasvalererealms yes, this is an old issue that was carried over from the very early EC2 implementation. Fargate and ECS will cover auto-deployments. Will close this.
What features would you like to see added?
Discovery Problem Definition
Currently, the LibreChat open-source chatbot lives in an EC2 instance that must be manually launched. Users have no access to AWS backend or ability to launch instances. Furthermore, instances are not assigned to a particular user with access to a particular OpenAI API Assistant. Motivations:
User should have EC2 instances assigned for a particular userID_caseID combination with the .yaml and .env files updated to reflect the Assistant thread they are accessing. Proposed Solution
Write a Python Lambda that: 1. creates an EC2 for a particular userID_caseID combination, 2. updates the librechat.yaml and .env files to reflect the Assistant thread assigned to that userID_caseID combination, 3. Assigns that EC2 to the userID_caseID, 4. launches it each time the user accesses the case, 5. shuts the EC2 down after 10 minutes of inactivity.
It should also trigger the EC2 to run if it already exists. If it does not exist, then it creates it. Definition of Done
When users create a case or access a case, they have access to a chatbot that uses that particular Assistant thread and has access to case data.
More details
features/manage_chatbot_instances.feature
Feature: Manage LibreChat EC2 Instances As a user I want EC2 instances to be assigned for my userID_caseID combination So that I can access a chatbot with the specific Assistant thread and case data
Background: Given the Python Lambda function is deployed to manage EC2 instances for LibreChat
Scenario: Create and configure EC2 instance for a new userID_caseID combination Given a user creates a new case with caseID When the system detects the new case creation event Then a new EC2 instance is created for the userID_caseID combination And the librechat.yaml and .env files are updated to reflect the Assistant thread assigned to the userID_caseID combination And the EC2 instance is assigned to the userID_caseID
Scenario: Launch EC2 instance when a user accesses a case Given a user accesses an existing case with caseID When the system detects the case access event Then the existing EC2 instance for the userID_caseID combination is launched And if the EC2 instance does not exist, a new instance is created and configured
Scenario: Automatic shutdown of EC2 instance after inactivity Given an EC2 instance is running When there is no activity for 10 minutes Then the EC2 instance shuts down automatically
Which components are impacted by your request?
No response
Pictures
No response
Code of Conduct