chat-ui icon indicating copy to clipboard operation
chat-ui copied to clipboard

USE_LOCAL_WEBSEARCH No results found for this search query

Open brechtm opened this issue 9 months ago • 6 comments

Bug description

With USE_LOCAL_WEBSEARCH=true, Web Search always reports No results found for this search query.

Steps to reproduce

  • enable search
  • enter and submit question

Screenshots

Image

Context

I'm running chat-ui-db using podman on an M1 Macbook. I'm using LM Studio as the model provider.

podman run --rm --mount type=bind,source="$(pwd)/.env.local",target=/app/.env.local -v chat-ui:/data -p 3000:3000 ghcr.io/huggingface/chat-ui-db

Logs

{"level":50,"time":1742937489975,"pid":18,"hostname":"bbd76a6649ad","msg":"No results found for this search query"}

Specs

  • OS: macOS 15.3.1 (24D70)
  • Browser: Firefox 136.0.2 (aarch64)
  • chat-ui commit: ghcr.io/huggingface/chat-ui-db f679ed220b9b

Config

.env.local

HF_TOKEN=hf_...
MODELS=`[
  {
    "name": "LM Studio",
    "endpoints": [{
      "type" : "openai",
      "baseURL": "http://host.docker.internal:1234/v1"
    }],
  },
]`
USE_LOCAL_WEBSEARCH=true
WEBSEARCH_JAVASCRIPT=true

brechtm avatar Mar 25 '25 21:03 brechtm

Hi, the local websearch is always a bit brittle since you need to parse google results directly. Keeping it up to date is always a challenge so we recommend using a search provider if you can instead.

I can't really commit time to do it myself now but I'd be super happy to review a PR that fixes the local search however!

nsarrazin avatar Mar 26 '25 10:03 nsarrazin

I tried SERPER_API_KEY instead, but this reports the same error, No results found for this search query. I can see the API calls in the Serper activity log, however. Any hints on how I can debug this?

PS. I first looked at BING_SUBSCRIPTION_KEY, but MS no longer supports new Bing Search deployments.

brechtm avatar Mar 26 '25 15:03 brechtm

Could this log entry be relevant?

{"level":40,"time":1743005435762,"pid":25,"hostname":"e653a132a251","msg":"No tokenizer found for model LM Studio, using default template. Consider setting tokenizer manually or making sure the model is available on the hub."}

brechtm avatar Mar 26 '25 16:03 brechtm

@nsarrazin : can i take a stab at this?

rimildeyjsr avatar May 29 '25 09:05 rimildeyjsr

@rimildeyjsr Feel free! let me know if you need help.

nsarrazin avatar May 29 '25 09:05 nsarrazin

Hello, I am going to be working on this issue!

anviik avatar Oct 22 '25 21:10 anviik