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

support for "custom"/alternative endpoints #14

Open
thoraxe opened this issue Oct 17, 2023 · 5 comments
Open

support for "custom"/alternative endpoints #14

thoraxe opened this issue Oct 17, 2023 · 5 comments
Assignees

Comments

@thoraxe
Copy link

thoraxe commented Oct 17, 2023

The following only partially works:
podman run -it --rm -e OLLAMA_HOST=http://somewhere.com -p 3000:3000 -e DEFAULT_MODEL=mistral:7b-instruct ghcr.io/ivanfioravanti/chatbot-ollama:main

The UI seems to act like it's willing to follow the ENV, but then forces itself to default to mistral:latest and blows up with errors:

 [OllamaError: model 'mistral:latest' not found, try pulling it first] {
  name: 'OllamaError'
}

image

@ivanfioravanti ivanfioravanti self-assigned this Oct 21, 2023
@ivanfioravanti
Copy link
Owner

I can't reproduce it, it works for me with:
podman run -it --rm -e OLLAMA_HOST=http://somewhere.com:11434 -p 3000:3000 -e DEFAULT_MODEL=mistral:7b-instruct ghcr.io/ivanfioravanti/chatbot-ollama:main

@tavindotson
Copy link

tavindotson commented Nov 3, 2023

First, I really enjoy this project! Thank you.

I am having the same issue. The web-ui reflects the environment variable override for the default model, but the actual request to the server does not.

I am able to work around this issue by first toggling between another installed model and back to the default. It will then work as expected.


I'll see if I can get more info, but here is what I have right now:

My docker-compose.yml file:

version: '3'

services:
  chatbot-ollama:
    image: ghcr.io/ivanfioravanti/chatbot-ollama:main
    environment:
      - OLLAMA_HOST=http://192.168.2.2:11434
      - DEFAULT_MODEL=orca-mini:latest
    ports:
      - 7035:3000
    networks:
      core-network:

networks:
  core-network:
    external: true

When not applying the workaround, this error shows up in the browser window:
Application error: a client-side exception has occurred (see the browser console for more information).

screenshot

And the console output when the above error is shown:

framework-467b11a89995b152.js:9 TypeError: Cannot read properties of undefined (reading 'name')
    at index-0a94ad000d539e1c.js:1:31892
    at Xh (framework-467b11a89995b152.js:9:60992)
    at dj (framework-467b11a89995b152.js:9:72859)
    at cj (framework-467b11a89995b152.js:9:72069)
    at x (framework-467b11a89995b152.js:9:122828)
    at Vk (framework-467b11a89995b152.js:9:99132)
    at framework-467b11a89995b152.js:9:98999
    at Jk (framework-467b11a89995b152.js:9:99006)
    at Ok (framework-467b11a89995b152.js:9:95762)
    at Fk (framework-467b11a89995b152.js:9:96151)
Mi @ framework-467b11a89995b152.js:9
main-29b5a530a16ca0e3.js:1 TypeError: Cannot read properties of undefined (reading 'name')
    at index-0a94ad000d539e1c.js:1:31892
    at Xh (framework-467b11a89995b152.js:9:60992)
    at dj (framework-467b11a89995b152.js:9:72859)
    at cj (framework-467b11a89995b152.js:9:72069)
    at x (framework-467b11a89995b152.js:9:122828)
    at Vk (framework-467b11a89995b152.js:9:99132)
    at framework-467b11a89995b152.js:9:98999
    at Jk (framework-467b11a89995b152.js:9:99006)
    at Ok (framework-467b11a89995b152.js:9:95762)
    at Fk (framework-467b11a89995b152.js:9:96151)
renderError @ main-29b5a530a16ca0e3.js:1
main-29b5a530a16ca0e3.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
renderError @ main-29b5a530a16ca0e3.js:1
index-0a94ad000d539e1c.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name')
    at index-0a94ad000d539e1c.js:1:28479
    at onSend (index-0a94ad000d539e1c.js:1:32939)
    at handleSend (index-0a94ad000d539e1c.js:1:8170)
    at onKeyDown (index-0a94ad000d539e1c.js:1:12074)
    at Object.Nb (framework-467b11a89995b152.js:9:14967)
    at Tb (framework-467b11a89995b152.js:9:15121)
    at framework-467b11a89995b152.js:9:33457
    at nf (framework-467b11a89995b152.js:9:33556)
    at se (framework-467b11a89995b152.js:9:33970)
    at framework-467b11a89995b152.js:9:39425

@tavindotson
Copy link

First, I really enjoy this project! Thank you.

I am having the same issue. The web-ui reflects the environment variable override for the default model, but the actual request to the server does not.

I am able to work around this issue by first toggling between another installed model and back to the default. It will then work as expected.

I tried reproducing my same issue and was unable to on two other machines, and after doing a fresh install on my original machine the issue went away. ¯\_(ツ)_/¯

@ivanfioravanti
Copy link
Owner

Same here, I can't reproduce this one ¯_(ツ)_/¯

@ivanfioravanti
Copy link
Owner

@thoraxe have you been able to sovle the issue?

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

No branches or pull requests

3 participants