[PR #2879] [MERGED] examples: start adding Go examples using api/ #42240

Closed
opened 2026-04-24 22:01:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2879
Author: @eliben
Created: 3/2/2024
Status: Merged
Merged: 4/10/2024
Merged by: @jmorganca

Base: mainHead: add-examples


📝 Commits (1)

  • 815d6aa examples: start adding Go examples using api/

📊 Changes

4 files changed (+77 additions, -0 deletions)

View changed files

examples/go-generate-streaming/main.go (+40 -0)
examples/go-generate/main.go (+37 -0)
📝 examples/go-http-generate/README.md (+0 -0)
📝 examples/go-http-generate/main.go (+0 -0)

📄 Description

We can have the same examples as e.g. https://github.com/ollama/ollama-python/tree/main/examples here. Using consistent naming and renaming the existing example to have -http- since it uses direct HTTP requests rather than api/

Updates #2840


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/2879 **Author:** [@eliben](https://github.com/eliben) **Created:** 3/2/2024 **Status:** ✅ Merged **Merged:** 4/10/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `add-examples` --- ### 📝 Commits (1) - [`815d6aa`](https://github.com/ollama/ollama/commit/815d6aaebe698f55e62cedb9a51e1989fdc15316) examples: start adding Go examples using api/ ### 📊 Changes **4 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `examples/go-generate-streaming/main.go` (+40 -0) ➕ `examples/go-generate/main.go` (+37 -0) 📝 `examples/go-http-generate/README.md` (+0 -0) 📝 `examples/go-http-generate/main.go` (+0 -0) </details> ### 📄 Description We can have the same examples as e.g. https://github.com/ollama/ollama-python/tree/main/examples here. Using consistent naming and renaming the existing example to have -http- since it uses direct HTTP requests rather than api/ Updates #2840 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-24 22:01:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#42240