carlrobertoh / CodeGPT

JetBrains extension providing access to state-of-the-art LLMs, such as GPT-4, Claude 3, Code Llama, and others, all for free
https://codegpt.ee
Apache License 2.0
912 stars 186 forks source link

fix: refresh Ollama models only when service is changed to Ollama #536

Closed PhilKes closed 2 months ago

PhilKes commented 2 months ago

The refreshModels() was initially called in the constructor of OllamaSettingsForm. Because of this whenever the user opens the settings the GET /api/tags request is triggered to refresh the Ollama models, even if Ollama is not even the currently selected service