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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help