All posts
Build a chatbot in Go
Tutorials 9 min read· 12 Aug 2026· By Tutorials

Build a chatbot in Go

Go standard library + go-openai client, wired to TokenBaazar.

go-openai supports a custom base URL via ClientConfig. Streaming works through channels.

go
cfg := openai.DefaultConfig("sk-tb-...")
cfg.BaseURL = "https://tokenbaazar.in/api/public/v1"
client := openai.NewClientWithConfig(cfg)

Ready to build?

Grab a key, keep your OpenAI SDK, and pay in INR.

Start free