[GH-ISSUE #2159] Do we have a Go client #1233

Closed
opened 2026-04-12 11:00:19 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @liliang-cn on GitHub (Jan 23, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2159

I'm know there is an HTTP API, but can I utilize this API in a similar manner like ollama-python?

Originally created by @liliang-cn on GitHub (Jan 23, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2159 I'm know there is an HTTP API, but can I utilize this API in a similar manner like [ollama-python?](https://github.com/jmorganca/ollama-python)
Author
Owner

@pdevine commented on GitHub (Jan 23, 2024):

You can find it in api/client.go. It's used extensively in the REPL.

<!-- gh-comment-id:1906650293 --> @pdevine commented on GitHub (Jan 23, 2024): You can find it in `api/client.go`. It's used extensively in the REPL.
Author
Owner

@pdevine commented on GitHub (Jan 23, 2024):

I should mention that it's not as extensively documented as the python client or the javascript client.

<!-- gh-comment-id:1906693539 --> @pdevine commented on GitHub (Jan 23, 2024): I should mention that it's not as extensively documented as the [python client](https://github.com/ollama/ollama-python) or the [javascript client](https://github.com/ollama/ollama-js).
Author
Owner

@TimothyStiles commented on GitHub (Jan 24, 2024):

@pdevine @liliang-cn I've written some example tests to document the Go client and plan on submitting a PR for it tomorrow. Will tag this issue when I do.

<!-- gh-comment-id:1907770552 --> @TimothyStiles commented on GitHub (Jan 24, 2024): @pdevine @liliang-cn I've written some example tests to document the Go client and plan on submitting a PR for it tomorrow. Will tag this issue when I do.
Author
Owner

@mxyng commented on GitHub (Mar 11, 2024):

While api/client.go is public, it's not intended for public consumption and does not have any compatibility guarantees. The main use case is for the CLI. I would use it with caution

<!-- gh-comment-id:1989245292 --> @mxyng commented on GitHub (Mar 11, 2024): While api/client.go is public, it's not intended for public consumption and does not have any compatibility guarantees. The main use case is for the CLI. I would use it with caution
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1233