Skip to content
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

Set the initial value of the chat modal to the recently created token #2865

Open
yomybaby opened this issue Nov 20, 2024 · 0 comments · Fixed by #2864
Open

Set the initial value of the chat modal to the recently created token #2865

yomybaby opened this issue Nov 20, 2024 · 0 comments · Fixed by #2864
Assignees
Milestone

Comments

@yomybaby
Copy link
Member

yomybaby commented Nov 20, 2024

Description

To enhance user convenience, it's proposed that the chat modal's initial value be prepopulated with the most recent valid token if one exists. This feature would save users the hassle of having to manually enter or look up their valid token each time they wish to initiate a chat.

Expected Behavior

  • When opening the chat modal, the input field for the token should automatically be filled with the most recent valid token associated with the user's account.

  • If no valid tokens are available, the input field can remain empty as it currently does.

    Benefits

  • Reduces the number of steps required for users to start a chat.

  • Improves overall user experience by leveraging existing information to streamline interactions.

    Potential Challenges

  • Ensuring that the token prepopulation logic securely checks for token validity without exposing sensitive information.

  • Handling scenarios where the most recent token might have just expired or is about to expire soon.

@yomybaby yomybaby added this to the 24.09 milestone Nov 20, 2024
@yomybaby yomybaby changed the title Set the recently created token to the initial values of chat Modal Set the initial value of the chat modal to the recently created token Nov 20, 2024
yomybaby pushed a commit that referenced this issue Dec 23, 2024
… token (#2864)

resolves #2865

**Changes:**
Adds automatic token population in the chat UI modal by passing the most recently created endpoint token to the chat interface.

**Details:**
- Extends `ChatUIModal` to accept endpoint token fragment data
- Adds logic to find the newest token from the endpoint token list
- Automatically populates the token field in the chat interface with the most recent token
- Enhances user experience by removing manual token entry requirement

**How to test:**
1. Click the LLM Chat Test from the serving page.
2. If it is not a public vllm model, you can get the custom modal.
3. If there are tokens, the most recently created and valid token will be set as the placeholder.
4. If there is no valid token, the placeholder is empty.

**Checklist:**
- [x] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [x] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

**Review Requirements:**
1. Verify that the newest token is correctly identified from the endpoint token list
2. Confirm the token field is pre-populated in the chat interface
3. Test that the chat functionality works with the auto-populated token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants