chatbot-ui: Unable to use local models with ollama

I am running a local llama server with ./ollama serve, which runs on port 11434. Then, in another shell, I have a model running with ./ollama run llama2-uncensored. Here is what my .env.local looks like

# Supabase Public
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxj>
# Supabase Private
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZ>
# Ollama
NEXT_PUBLIC_OLLAMA_URL=http://localhost:11434
# API Keys (Optional: Entering an API key here overrides the API keys globally for all users)
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_GEMINI_API_KEY=
MISTRAL_API_KEY=
PERPLEXITY_API_KEY=
OPENROUTER_API_KEY=

# OpenAI API Information
NEXT_PUBLIC_OPENAI_ORGANIZATION_ID=

# Azure API Information
AZURE_OPENAI_API_KEY=
NEXT_PUBLIC_AZURE_OPENAI_ENDPOINT=
NEXT_PUBLIC_AZURE_GPT_35_TURBO_ID=
NEXT_PUBLIC_AZURE_GPT_45_VISION_ID=
NEXT_PUBLIC_AZURE_GPT_45_TURBO_ID=
#Extras
REACT_EDITOR=code

When I run npm run chat I get the following error

(node:78610) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Now the ui loads correctly but I am unable to send messages/receive responses The following error appears in the ui

Unhandled Runtime Error
Error: TypeError: Failed to fetch
  10 |
  11 | if (!profile) {
> 12 |   throw new Error(error.message)
     |        ^
  13 | }
  14 |
  15 | return profile
Call Stack
async fetchStartingData
components/utility/global-state.tsx (170:22)

Please help

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 36 (16 by maintainers)

Most upvoted comments

@mysterium-coniunctionis

Ah exactly the errors I am getting. Thanks for the screenshot. I tried clearing cookies and even a new deleting the repo and repluuing with a clean install of everything no luck

On supabase supabase db push returns Cannot find project ref. Have you run supabase link? supabse link returns 2024/01/23 17:50:13 Access token not provided. Supply an access token by running supabase login or setting the SUPABASE_ACCESS_TOKEN environment variable.

Should I need a supabase login for a local run?

Info everything is running locally on a Ubuntu machine if relevant I can provide more info about the machine set-up