GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ollama-compatible AI-assisted code generation by haesleinhuepf · Pull Request #71 · scijava/script-editor

Conversation

@haesleinhuepf

@haesleinhuepf haesleinhuepf commented Aug 25, 2024

Copy link
Copy Markdown
Member

This enables ollama support technically. Unfortunately, I'm not aware of LLMs which work well. @pr4deepr suggested there are some. If he or anyone else can show us useful ollama-compatible open-weight LLMs , we might merge this too.

If anyone wants to try this is the compiled jar:
https://cloud.scadsai.uni-leipzig.de/index.php/s/a2bSXY7n2JfGjKn

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pr4deepr reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@haesleinhuepf
support for ollama-based AI-assisted coding
098d56d
@haesleinhuepf
haesleinhuepf marked this pull request as draft August 25, 2024 09:07
@pr4deepr

pr4deepr commented Aug 27, 2024

Copy link
Copy Markdown

Hi @haesleinhuepf

I don't think the models are going to perform as well as the commercial models 'yet'. However, the models are improving and having this option enables accessibility as paying for subscriptions is not possible for everyone.

I've been trying to run ollama within Fiji, but I keep getting an error.
I know I can access ollama via the url: http://127.0.0.1:11434/v1 because I can access it from python using your notebook from your preprint.

The error I'm getting:

sun.net.www.protocol.http.HttpURLConnection:http://127.0.0.1:11434/v1
{"messages":[{"role":"user","content":"You are an extremely talented Bio-image Analyst and programmer.\nYou write code in ImageJ Macro.\nWrite concise and high quality code for ImageJ/Fiji.\nPut minimal comments explaining what the code does.\nYour task is the following:\nWrite code to open images in Fiji"}],"model":"mistral-nemo"}
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.io.FileNotFoundException: http://127.0.0.1:11434/v1
at org.scijava.ui.swing.script.TextEditor.lambda$askLLMServiceProviderToGenerateCode$51(TextEditor.java:3284)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:11434/v1
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1913)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1505)
at org.scijava.ui.swing.script.OpenAIClient.prompt(OpenAIClient.java:57)
at org.scijava.ui.swing.script.TextEditor.lambda$askLLMServiceProviderToGenerateCode$51(TextEditor.java:3277)
... 14 more

I tried using localhost as well in the url.

Cheers
Pradeep

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haesleinhuepf

haesleinhuepf commented Aug 28, 2024

Copy link
Copy Markdown
Member Author

Hey @pr4deepr ,

awesome, thanks for the feedback!

Which model are you using and which operating system?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pr4deepr

pr4deepr commented Aug 28, 2024

Copy link
Copy Markdown

ahh, sorry..
I'm using Windows 10. I tried mistral-nemo and deepseek-coder-v2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haesleinhuepf

haesleinhuepf commented Aug 28, 2024

Copy link
Copy Markdown
Member Author

I may know the issue. Would you mind trying this Ollama URL?

http://localhost:11434/v1/chat/completions

image

I will update the default value for this if it works for you.

pr4deepr reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pr4deepr

pr4deepr commented Aug 28, 2024

Copy link
Copy Markdown

Can confirm its working.

haesleinhuepf and imagejan reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haesleinhuepf
Correctex default ollama url
0bb97a2
@imagesc-bot

imagesc-bot commented Jun 2, 2025

Copy link
Copy Markdown

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/globias-bioimage-analysis-seminar-series-fiji-with-python-power/113118/1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@haesleinhuepf @pr4deepr @imagesc-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.