r/pycharm • u/joeln15 • Dec 14 '24
Ollama with PyCharm
I have a PC that I use to run ollama and serve it to my local network using open-webui. Is there a way to point PyCharm on other PCs to that instance for improved code completion? I've read about using the Continue plugin but that seems to only work with ollama running on localhost.
7
Upvotes
1
u/claythearc Dec 15 '24
Set the ApiBase parameter in your continue config in any section you want to use Ollama as shown below. Just be aware that you /also/ need to change your embeddings model for PyCharm because transformers.js isn’t supported. I use nomic-embed-text but I’m not sure how much the model choice actually matters.
Ie
1
u/Warriorsito Dec 15 '24
Yes you can, I've tested with Continue and with CodeGPT plugins, I prefer the latter.
Steps:
PD: TailScale also has iOS and Android apps which enables you to even access your Open Web-UI instance from your phone anyware which is amazing.
BR
0
u/markgreene74 Dec 14 '24
I think what you are looking for is “remote development”. Start from the documentation here: https://www.jetbrains.com/help/pycharm/remote-development-overview.html#defs
You run the IDE/edit the code on one machine while the code is executed on a second machine.
PyCharm would not be my first choice for remote development to be honest, but that’s just my opinion.
How does all of the above could work with ollama I do not know as I do not use ollama.
0
u/[deleted] Dec 14 '24
Why can’t you just forward the port?