brave / brave-browser

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

Using local LLMs with Leo in the shows network error #40385

Open riskyrun opened 3 months ago

riskyrun commented 3 months ago

Description

I followed the steps as given in the official page .I am trying to use llama 3b model with ollama but when I try to use the model , it says "There was a network issue connecting to Leo. Check your connection and try again"

Steps to reproduce

Follow steps from the official blog post

Actual result

This is wha it shows Screenshot from 2024-08-09 20-08-56

Expected result

Should have worked?

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave 1.68.137 Chromium: 127.0.6533.100 (Official Build) unknown (64-bit) Revision 2c62ca4f207eb8f02406936d1e5a4b226ddcfd3a OS Linux JavaScript V8 12.7.224.18 User agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Command Line /app/brave/brave --disable-features=WebAssemblyTrapHandler,DesktopPWAsRunOnOsLogin --no-default-browser-check --disable-domain-reliability --enable-dom-distiller --enable-distillability-service --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --lso-url=https://no-thanks.invalid --sync-url=https://sync-v2.brave.com/v2 --variations-server-url=https://variations.brave.com/seed --variations-insecure-server-url=https://variations.brave.com/seed --flag-switches-begin --flag-switches-end --component-updater=url-source=https://go-updater.brave.com/extensions Executable Path /app/brave/brave Profile Path /home/risky/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser/Default Active variations main@6ca2621c8e461173056e7b67a62d79aa3c84a37d

Channel information

Reproducibility

Miscellaneous information

No response

nerdontour commented 2 months ago

For me, it worked on the first day I configured it. Now, I'm getting the same error.

nerdontour commented 2 months ago

Hey @riskyrun I found the solution. It's written in the article that the name of the model has to be exactly "llama-3"

Screen Shot 2024-09-06 at 10 47 11 AM

However, the correct name of the model, as it is stated in Ollama, is "llama3".

Screen Shot 2024-09-06 at 10 48 31 AM

Once you remove the dash, the BYOM works!

Screen Shot 2024-09-06 at 10 49 14 AM

Keep in mind, that Ollama app has to work in the background for the model to run in the Brave browser.