File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
go/plugins/compat_oai/ollamacloud Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package ollamacloud
1818
1919import (
2020 "context"
21+ "fmt"
2122 "os"
2223
2324 "github.com/firebase/genkit/go/ai"
@@ -28,9 +29,9 @@ import (
2829)
2930
3031const (
31- provider = "ollamacloud"
32- baseURL = "https://ollama.com"
33- version = "/ v1"
32+ provider = "ollamacloud"
33+ apiBaseURL = "https://ollama.com"
34+ apiVersion = "v1"
3435)
3536
3637// supportedModels defines a curated set of Ollama Cloud models.
@@ -122,7 +123,7 @@ func (o *OllamaCloud) Init(ctx context.Context) []api.Action {
122123 // Configure OpenAI-compatible client with Ollama Cloud settings
123124 o .openAICompatible .Opts = []option.RequestOption {
124125 option .WithAPIKey (apiKey ),
125- option .WithBaseURL (baseURL + version ),
126+ option .WithBaseURL (fmt . Sprintf ( "%s/%s" , apiBaseURL , apiVersion ) ),
126127 }
127128 if len (o .Opts ) > 0 {
128129 o .openAICompatible .Opts = append (o .openAICompatible .Opts , o .Opts ... )
You can’t perform that action at this time.
0 commit comments