OpenAI Plus Ollama In Go
Prompt:
Use nxusKit to make this Go service support OpenAI and Ollama.Starter fixture: examples/fixtures/starters/go-service/
Expected behavior:
- Inspect
go.modandmain.go. - Consult the
multi-providerexample. - Preserve existing command-line behavior.
- Add provider selection for OpenAI and Ollama.
- Read
OPENAI_API_KEYonly from the environment. - Use local-provider settings such as
OLLAMA_BASE_URLandOLLAMA_MODEL.
Verification:
go test ./...go run . -provider ollama -prompt "Reply in one short sentence."Good result:
- The Go package tests pass.
- Ollama works without cloud credentials when it is running locally.