Skip to content

Update ollama_url assignment to use settings#1

Open
y0umu wants to merge 1 commit intor-uben:mainfrom
y0umu:fix-ollama-url-config
Open

Update ollama_url assignment to use settings#1
y0umu wants to merge 1 commit intor-uben:mainfrom
y0umu:fix-ollama-url-config

Conversation

@y0umu
Copy link
Copy Markdown

@y0umu y0umu commented Dec 15, 2025

Hi developer.

The problem:
Setting the OLLAMA_URL other than the http://localhost:11434 value in .env file, or setting up DEEPSEEK_OCR_OLLAMA_URL in environment variables does not come into effect.

Example to reproduce:

export DEEPSEEK_OCR_OLLAMA_URL=http://192.168.5.8:11434
deepseek-ocr info

will get

deepseek-ocr v0.2.3
               System Information
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Component          ┃ Status                   ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Python             │ 3.12                     │
│ Ollama URL         │ http://192.168.5.8:11434 │
│ Ollama Running     │ No                       │
│ deepseek-ocr Model │ Not found                │
└────────────────────┴──────────────────────────┘
         Current Settings
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Setting          ┃ Value        ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ Model            │ deepseek-ocr │
│ Output Directory │ output       │
│ Extract Images   │ False        │
└──────────────────┴──────────────┘

Supported Formats:
Images: JPG, PNG, WEBP, GIF, BMP, TIFF
Documents: PDF

⚠ Ollama is not running. Start with: ollama serve

I examined the source with the help of copilot, and notes that ollama_url argument of ModelManager.__init__ does not seem to be filled properly when ModelManager is instantialized. So the solution could be:

  1. fix every instance of ModelManager
  2. fix the init funtion

This pull request choose the second way. This PR fixes issues like "OLLAMA_URL" setting not working.

Fix issues like "OLLAMA_URL" setting not working
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

Successfully merging this pull request may close these issues.

1 participant