Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(init-go): Fix Ollama generated config #851

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions genkit-tools/cli/src/commands/init/init-go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ const modelOptions: Record<ModelProvider, ModelOption> = {
ollama: {
label: 'Ollama (e.g. Gemma)',
package: 'github.com/firebase/genkit/go/plugins/ollama',
init: `// Initialize the Ollama plugin.
\terr := ollama.Init(ctx,
init: `// Ollama plugin configuration.
\tconfig := ollama.Config{
\t\t// The address of your Ollama API server. This is often a different host
\t\t// from your app backend (which runs Genkit), in order to run Ollama on
\t\t// a GPU-accelerated machine.
\t\t"http://127.0.0.1:11434")
\t\tServerAddress: "http://127.0.0.1:11434",
\t}
\t// Initialize the Ollama plugin.
\terr := ollama.Init(ctx, &config)
\tif err != nil {
\t\tlog.Fatal(err)
\t}
Expand Down
Loading