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

Environment variables are ignored in ChatEdit screen #76

Closed
habaneraa opened this issue Apr 21, 2024 · 1 comment
Closed

Environment variables are ignored in ChatEdit screen #76

habaneraa opened this issue Apr 21, 2024 · 1 comment

Comments

@habaneraa
Copy link
Contributor

The symptom is: User set a custom ollama URL using an environment variable and then accessed the ChatEdit screen. It does not use the customized url to fetch model list, which results in an exception (app crash).

In oterm/app/chat_edit.py, ollama is directly imported:

import ollama

self.models = ollama.list()["models"]

Here, it uses an ollama client created in ollama python library. This client always has the default host and port 127.0.0.1:11434

@ggozad
Copy link
Owner

ggozad commented Apr 21, 2024

Thank you so much for catching this, I completely missed it after I switch to using the "official" client instead of my own.

@ggozad ggozad closed this as completed in 7dd60a0 Apr 22, 2024
ggozad added a commit that referenced this issue Apr 22, 2024
Use env variables when calling show/list methods on Ollama API. Fix #76
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

2 participants