Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent is a provider-neutral orchestration layer built on the llm package.
|
Package agent is a provider-neutral orchestration layer built on the llm package. |
|
example
|
|
|
agent/basic
command
Command basic demonstrates the smallest stateful agent: one tool, one prompt.
|
Command basic demonstrates the smallest stateful agent: one tool, one prompt. |
|
agent/hooks
command
Command hooks demonstrates the agent's interception points: a policy gate that blocks a tool (BeforeToolCall), an annotation applied to results (AfterToolCall), a model switch between turns across wire protocols (PrepareNextTurn), and a turn guard (ShouldStopAfterTurn).
|
Command hooks demonstrates the agent's interception points: a policy gate that blocks a tool (BeforeToolCall), an annotation applied to results (AfterToolCall), a model switch between turns across wire protocols (PrepareNextTurn), and a turn guard (ShouldStopAfterTurn). |
|
agent/tool
command
Command tool demonstrates an interactive stateful agent with tool use.
|
Command tool demonstrates an interactive stateful agent with tool use. |
|
llm/complete
command
Command complete demonstrates the smallest non-streaming model request.
|
Command complete demonstrates the smallest non-streaming model request. |
|
llm/image
command
Command image sends a local image to a multimodal model.
|
Command image sends a local image to a multimodal model. |
|
llm/model-switching
command
Command model-switching reuses one provider-neutral conversation across two models that speak different wire protocols.
|
Command model-switching reuses one provider-neutral conversation across two models that speak different wire protocols. |
|
llm/stream
command
Command stream demonstrates incremental reasoning and text events.
|
Command stream demonstrates incremental reasoning and text events. |
|
llm/tool
command
Command tool demonstrates a complete typed-tool execution loop.
|
Command tool demonstrates a complete typed-tool execution loop. |
|
Package llm is a unified, provider-neutral API for large language models.
|
Package llm is a unified, provider-neutral API for large language models. |
|
all
Package all registers every built-in protocol adapter into the llm package default registry.
|
Package all registers every built-in protocol adapter into the llm package default registry. |
|
anthropic
Package anthropic implements the Anthropic Messages protocol on top of the official anthropic-sdk-go.
|
Package anthropic implements the Anthropic Messages protocol on top of the official anthropic-sdk-go. |
|
internal/genmodels
command
Command genmodels builds llm's checked-in model catalog from public model catalogs.
|
Command genmodels builds llm's checked-in model catalog from public model catalogs. |
|
internal/jsonx
Package jsonx provides best-effort JSON recovery for model output.
|
Package jsonx provides best-effort JSON recovery for model output. |
Click to show internal directories.
Click to hide internal directories.