brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.95k stars 2.35k forks source link

AIChat: UI Improvements for Local Models - Disable Like/Dislike and Hide Premium Prompt #39508

Closed nullhook closed 4 months ago

nullhook commented 4 months ago
  1. don't show “Your Brave account session...” prompt when using a local model
  2. hide like/dislike from UI for local models
stephendonner commented 4 months ago

Verified PASSED using

Brave | 1.69.96 Chromium: 127.0.6533.26 (Official Build) nightly (64-bit)
-- | --
Revision | 25973a147e9d4ea0cd7b27c49f55792640a3b827
OS | Windows 10 Version 22H2 (Build 19045.4651)

and

Brave | 1.69.101 Chromium: 127.0.6533.43 (Official Build) nightly (x86_64)
-- | --
Revision | 9073515479afc03ab66a21bb8175263fc56ba1f1
OS | macOS Version 11.7.10 (Build 20G1427)

Case One: Like answer and Dislike answer hidden for local-hosted LLMs - PASSED

### Steps: 1. installed `1.69.96` 2. launched Brave using `--enable-logging=stderr --v=2 --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev` 3. purchased `Leo Premium` from `account.brave.com` 4. loaded `https://www.vox.com/iran/359723/pezeshkian-iran-khamenei-elections-raisi-president-ayatollah-mahsa-amini-protests-vote-hijab` 5. installed and set up `Ollama`'s `llama3` locally 6. clicked on `Leo` in the sidebar 7. switched to using `llama3` from the `Custom models` section 8. clicked on `Summarize this page` 9. confirmed page summarization 10. hovered over the AI-generated response ### Confirmed no vertical 3-dots ellipsis for `Like answer` and `Dislike answer` options (only `Copy`, which works) example | example ----------|---------- ![image](https://github.com/brave/brave-browser/assets/387249/986f1708-8f2e-478b-a778-98ce6ba45ea5) | ![image](https://github.com/brave/brave-browser/assets/387249/93560cca-859e-4cd2-a372-0f1c213d33a1)

Case Two: Hide "Your Brave login has expired..." for local LLMs - PASSED

### Steps: 1. installed `1.69.101` 2. launched Brave using `--enable-logging=stderr --v=2 --env-leo=staging --env-ai-chat.bsg=dev --env-ai-chat-premium.bsg=dev` 3. loaded `account.bravesoftware.com` 4. logged in via `june14@mailinator.com` account 5. confirmed `Your Brave account session has expired.` notification, using any/all of the `Leo` models 6. downloaded `Ollama` from `https://ollama.com/download` 7. installed and configured `llama3` per the testplan in https://github.com/brave/brave-core/pull/23916#issue-2326057433 8. switched to `llama3` local LLM 9. confirmed no `Your Brave account session has expired.` dialog 10. loaded `https://www.foxnews.com/media/silicon-valley-trump-supporter-accuses-democratic-elites-launching-coup-against-biden` 11. clicked `Summarize this page` 12. confirmed page summarization 13. clicked `Suggest questions... 14. confirmed suggested-questions output 15. clicked on one 16. confirmed it answered ### Confirmed I saw the `Your Brave account session has expired.` message for non-local LLMs, and it was hidden when using `Ollama`'s `llama3` locally example | example | example | example | example ----------|---------|---------|----------|--------- Screen Shot 2024-07-12 at 1 47 30 PM | Screen Shot 2024-07-12 at 2 12 51 PM | Screen Shot 2024-07-12 at 2 56 33 PM | Screen Shot 2024-07-12 at 2 33 07 PM | Screen Shot 2024-07-12 at 2 42 21 PM