carlrobertoh/CodeGPT

Can't use local ollama when offline

Closed this issue · 0 comments

Uploading settings.JPG…

What happened?

In PyCharm (2024.1.5 Community Edition): If my internet connection is offline I can't use my locally hosted ollama. It seems CodeGPT is trying to connect to somewhere despite this. I'm trying via the CodeGPT right click menu > Edit code. I've disabled usage of other models in the settings to the best of my knowledge. If I try I get a notification:

CodeGPT
No route to host: getsockopt
Upgrade plan

As soon as my connection is restored I can use ollama again. Is it a bug or I am missing a crucial step in the setup? I can chat with my local hosted ollama via a terminal (outside of PyCharm) when offline.

Relevant log output or stack trace

No response

Steps to reproduce

  1. Set CodeGPT to use ollama local
  2. Disable internet
  3. Right click code and choose CodeGPT > Edit
  4. Notification appears

CodeGPT version

2.11.1-241.1

Operating System

Windows