[GH-ISSUE #2840] Plans for Ollama Go library? #1726

Closed
opened 2026-04-12 11:42:18 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @eliben on GitHub (Feb 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2840

The Ollama team has recently released native client libraries for JS (https://github.com/ollama/ollama-js) and Python (https://github.com/ollama/ollama-python).

Are there plans to develop a similar native Go library?

Originally created by @eliben on GitHub (Feb 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2840 The Ollama team has recently released native client libraries for JS (https://github.com/ollama/ollama-js) and Python (https://github.com/ollama/ollama-python). Are there plans to develop a similar native Go library?
GiteaMirror added the feature request label 2026-04-12 11:42:18 -05:00
Author
Owner

@trymeouteh commented on GitHub (Feb 29, 2024):

Would also like to see a Dart and Rust library.

<!-- gh-comment-id:1971993243 --> @trymeouteh commented on GitHub (Feb 29, 2024): Would also like to see a Dart and Rust library.
Author
Owner

@pdevine commented on GitHub (Mar 1, 2024):

There is the one in /api, which is what we use for the REPL, but it's not as well commented as the python/js client libraries.

<!-- gh-comment-id:1972256922 --> @pdevine commented on GitHub (Mar 1, 2024): There is the one in `/api`, which is what we use for the REPL, but it's not as well commented as the python/js client libraries.
Author
Owner

@eliben commented on GitHub (Mar 1, 2024):

There is the one in /api, which is what we use for the REPL, but it's not as well commented as the python/js client libraries.

Thanks for your reply @pdevine
Do you intend to document it as an externally usable API? It's exported and hence appears at https://pkg.go.dev/github.com/jmorganca/ollama/api -- what other documentation would you envision it having? Happy to contribute PRs if that would help.

Ideally it would be positioned on an equal footing with the Python / JS libraries; since for those separate projects exist it may appear like a Go library wasn't developed - folks may not consider looking into the repository itself (and the client-server architecture of the ollama tool isn't immediately apparent). This is something documentation can definitely help solve.

<!-- gh-comment-id:1972458890 --> @eliben commented on GitHub (Mar 1, 2024): > There is the one in `/api`, which is what we use for the REPL, but it's not as well commented as the python/js client libraries. Thanks for your reply @pdevine Do you intend to document it as an externally usable API? It's exported and hence appears at https://pkg.go.dev/github.com/jmorganca/ollama/api -- what other documentation would you envision it having? Happy to contribute PRs if that would help. Ideally it would be positioned on an equal footing with the Python / JS libraries; since for those separate projects exist it may appear like a Go library wasn't developed - folks may not consider looking into the repository itself (and the client-server architecture of the `ollama` tool isn't immediately apparent). This is something documentation can definitely help solve.
Author
Owner

@pdevine commented on GitHub (Mar 1, 2024):

I'd love to get it up to the same standard as the other two libraries. I think in terms of functionality it should be really close (we use it heavily internally), it's just that we haven't had time (or the people!). It'd be awesome if you wanted to take a look; you can just try to copy the documentation from the other libraries. If you want to ping me on the discord I can give more details.

<!-- gh-comment-id:1973625954 --> @pdevine commented on GitHub (Mar 1, 2024): I'd love to get it up to the same standard as the other two libraries. I think in terms of functionality it should be really close (we use it heavily internally), it's just that we haven't had time (or the people!). It'd be awesome if you wanted to take a look; you can just try to copy the documentation from the other libraries. If you want to ping me on the discord I can give more details.
Author
Owner

@eliben commented on GitHub (Mar 1, 2024):

SGTM, I'll look into it

<!-- gh-comment-id:1973974682 --> @eliben commented on GitHub (Mar 1, 2024): SGTM, I'll look into it
Author
Owner

@eliben commented on GitHub (Mar 2, 2024):

@pdevine @jmorganca PTAL at #2878 and let me know if it's heading in the right direction

<!-- gh-comment-id:1974805971 --> @eliben commented on GitHub (Mar 2, 2024): @pdevine @jmorganca PTAL at #2878 and let me know if it's heading in the right direction
Author
Owner

@eliben commented on GitHub (Mar 2, 2024):

Similarly, https://github.com/ollama/ollama/pull/2879 starts adding examples in examples/

<!-- gh-comment-id:1974816020 --> @eliben commented on GitHub (Mar 2, 2024): Similarly, https://github.com/ollama/ollama/pull/2879 starts adding examples in `examples/`
Author
Owner

@eliben commented on GitHub (Mar 7, 2024):

@pdevine @jmorganca friendly ping - please review #2878 and #2879 and LMK if this is the right direction to pursue.

<!-- gh-comment-id:1982182347 --> @eliben commented on GitHub (Mar 7, 2024): @pdevine @jmorganca friendly ping - please review #2878 and #2879 and LMK if this is the right direction to pursue.
Author
Owner

@pdevine commented on GitHub (May 17, 2024):

Thanks so much @eliben for those two PRs! I'll go ahead and close this guy. I'd still like to do an "official" go client at some point similar to js/python.

<!-- gh-comment-id:2118466137 --> @pdevine commented on GitHub (May 17, 2024): Thanks so much @eliben for those two PRs! I'll go ahead and close this guy. I'd still like to do an "official" go client at some point similar to js/python.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1726