[GH-ISSUE #5290] ollama-go bindings #3315

Closed
opened 2026-04-12 13:53:05 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @k0marov on GitHub (Jun 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5290

Hi, I'm interested in having a native Go client library for Ollama REST API, like the Python and JS ones.
I can start myself, but want to ask: is someone already working on it?
If it's not taken, I'll be glad to make this contribution.

Thanks for this awesome system!

Originally created by @k0marov on GitHub (Jun 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5290 Hi, I'm interested in having a native Go client library for Ollama REST API, like the Python and JS ones. I can start myself, but want to ask: is someone already working on it? If it's not taken, I'll be glad to make this contribution. Thanks for this awesome system!
GiteaMirror added the feature request label 2026-04-12 13:53:05 -05:00
Author
Owner
<!-- gh-comment-id:2190742405 --> @Gaurav-Gosain commented on GitHub (Jun 26, 2024): The official go bindings to the API already exist. I recently went looking for it myself and found these https://github.com/ollama/ollama/blob/main/api/client.go Docs: https://pkg.go.dev/github.com/ollama/ollama/api There are a few usage examples too: - https://github.com/ollama/ollama/blob/main/examples/go-chat/main.go - https://github.com/ollama/ollama/blob/main/examples/go-generate-streaming/main.go - https://github.com/ollama/ollama/blob/main/examples/go-generate/main.go - https://github.com/ollama/ollama/blob/main/examples/go-http-generate/main.go - https://github.com/ollama/ollama/blob/main/examples/go-multimodal/main.go - https://github.com/ollama/ollama/blob/main/examples/go-pull-progress/main.go
Author
Owner

@k0marov commented on GitHub (Jun 26, 2024):

My bad, thank you! Maybe it would be a good option to include a mention of these Go bindings in the "Libraries" section of the README.md?

<!-- gh-comment-id:2190841984 --> @k0marov commented on GitHub (Jun 26, 2024): My bad, thank you! Maybe it would be a good option to include a mention of these Go bindings in the "Libraries" section of the README.md?
Author
Owner

@Gaurav-Gosain commented on GitHub (Jun 26, 2024):

Agreed haha, for a library written in go, the go bindings don't seem to get the love they deserve 😅

<!-- gh-comment-id:2192213992 --> @Gaurav-Gosain commented on GitHub (Jun 26, 2024): Agreed haha, for a library written in go, the go bindings don't seem to get the love they deserve 😅
Author
Owner

@pdevine commented on GitHub (Jul 8, 2024):

We're just a small team, so it's hard to keep all of the libraries up to date. 😅 The CLI client does use the Go bindings exclusively though, so to some extent they may actually work even better than the Python/JS ones. I'm going to go ahead and close the issue.

<!-- gh-comment-id:2215508693 --> @pdevine commented on GitHub (Jul 8, 2024): We're just a small team, so it's hard to keep all of the libraries up to date. 😅 The CLI client _does_ use the Go bindings exclusively though, so to some extent they may actually work even better than the Python/JS ones. I'm going to go ahead and close the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3315