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

Ollama support from Intellij #528

Closed moshere-cirm closed 2 months ago

moshere-cirm commented 2 months ago

What happened?

Trying to configure Ollama from intellij. Two problems:

  1. UI is looking for API key
  2. Once putting API key it failed in text connection
image

Relevant log output or stack trace

No response

Steps to reproduce

Install codegpt on Intellij. Try to configure it with CustomOpenAI and Ollama. Put API key and test connection

CodeGPT version

2.6.3-241

Operating System

macOS

PhilKes commented 2 months ago

First of all Ollama doesn't offer the possibility to define an Api-Key, I think its only possible if you use a proxy (see https://github.com/ollama/ollama/issues/849), so you can just leave the Api-Key blank.

The error messages seems to be coming from OpenAi instead of your Ollama Server, I noticed a bug that the Test Connectionuses the stored settings instead of what is currently selected/entered in the settings UI. I have opened a PR fixing that (#531) What happens if you click Apply and then hit Test Connection?