Expand description
Core type system for the LLM abstraction layer.
Mirrors @earendil-works/pi-ai types: messages, content blocks, usage,
models, and tool schemas. These types are the boundary between the agent
loop and the provider implementations.
Structs§
- Assistant
Message - A message produced by the model.
- Cost
- Model
- A resolved model definition used to drive provider requests.
- Tool
Result Message - A tool-result message fed back to the model.
- Tool
Schema - The schema fragment sent to the model describing an available tool.
- Usage
- User
Message - A user-authored message.
Enums§
- Api
- Which wire protocol a model speaks. Beta targets only the Anthropic Messages API.
- Content
Block - A single block within an assistant message. Mirrors pi’s
TextContent | ThinkingContent | ToolCall. - Message
- The union of messages that make up a transcript.
- Stop
Reason - Why the assistant stopped generating.
- Thinking
Level - Reasoning/thinking level for models that support it.
- Tool
Result Content - Content returned from a tool execution. Mirrors the tool-result content.
- User
Block - A block within a user message. Mirrors
TextContent | ImageContent.