Show HN: Use any LLM in Go with stable, minimal API
github.com·1d·
Discuss: Hacker News
Flag this post

go-llms

A powerful and flexible Go library for interacting with Large Language Models (LLMs) with built-in support for function calling and streaming responses. Currently supports Anthropic, Google, and OpenAI compatible providers.

Features

  • Supports Anthropic, Google (Gemini + Vertex), and OpenAI (Chat Completions + Responses)
  • Also supports using custom endpoints compatible with any of the APIs above
  • Streaming responses (including thinking) for real-time interaction
  • Built-in tool calling with Go generics to generate JSON schemas automatically
  • Structured output (JSON schema based) for model response
  • OpenAI only: Custom grammars like Lark / Regex for structured output
  • Prompt cache hints
  • Image inputs and image generation / editing
  • Usage tracking

O…

Similar Posts

Loading similar posts...