GAI Go Artificial Intelligence

Go Artificial Intelligence

A light abstraction on top of LLMs + tools and evals in Go.

🚀
✨

What it does

GAI provides abstractions to work with:

💬 Chat completion

A Go-idiomatic interface for chat completion with popular models from OpenAI (and compatible), Anthropic, Google.

🧠 Embedding models

Turn text (or images, or other supported media) into vectors for semantic search and similarity.

🔧 Tools

Extend AI models with Go functions, both built-in and your own.

📊 Evaluations

Test prompts and integrations, which hook into the native Go test tooling.

Why use it

You want a unified way to work with AI models. You need a library that:

  • Gives you consistency across providers
  • Keeps implementations simple
  • Makes testing and evals straightforward
  • Is Go-idiomatic
  • Doesn't hide the native client for each provider when you need it

Getting started

Install the package:

go get maragu.dev/gai

Use it with your favorite models. These client implementations are available:

About

Made by maragu: independent software consulting for cloud-native Go apps & AI engineering.

See services