[PR #4451] [CLOSED] add ability to create a client without env file #22037

Closed
opened 2026-04-19 16:03:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4451
Author: @Tyrell04
Created: 5/15/2024
Status: Closed

Base: mainHead: create_client


📝 Commits (1)

  • 5480567 add ability to create a client without env file

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 api/client.go (+14 -1)

📄 Description

If you use Ollama as a Go package, you are forced to use an environment variable as a configuration to change the host. With the CreateClient function, you are free to use your own configuration passed into the Ollama client.


🔄 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/4451 **Author:** [@Tyrell04](https://github.com/Tyrell04) **Created:** 5/15/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `create_client` --- ### 📝 Commits (1) - [`5480567`](https://github.com/ollama/ollama/commit/54805677789a1cf903dc5c817a32d6f041314f90) add ability to create a client without env file ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+14 -1) </details> ### 📄 Description If you use Ollama as a Go package, you are forced to use an environment variable as a configuration to change the host. With the CreateClient function, you are free to use your own configuration passed into the Ollama client. --- <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-19 16:03:06 -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#22037