Expand description
Core types for the LLMKit unified LLM API.
This module defines the unified message format that works across all LLM providers.
§Advanced Features
This module supports advanced LLM features:
- Prompt Caching: Reduce costs by caching static content (
CacheControl) - Extended Thinking: Enable deep reasoning with budget control (
ThinkingConfig) - Structured Outputs: Guarantee JSON schema compliance (
StructuredOutput) - Predicted Outputs: Speed up generation for known content (
PredictionConfig) - Document Support: Process PDFs and other documents (
DocumentSource)
Structs§
- Batch
Error - Error from a batch request.
- Batch
Job - Information about a batch job.
- Batch
Request - A single request within a batch.
- Batch
Request Counts - Request counts for a batch job.
- Batch
Result - Result of a single request in a batch.
- Cache
Breakpoint - Cache breakpoint marking content to be cached.
- Completion
Request - Request to complete a conversation.
- Completion
Response - Response from a completion request.
- Json
Schema Definition - JSON schema definition for structured outputs.
- Message
- A message in a conversation.
- Prediction
Config - Configuration for predicted outputs (speculative decoding).
- Stream
Chunk - A chunk from a streaming response.
- Structured
Output - Configuration for structured output / JSON schema enforcement.
- Thinking
Config - Configuration for extended thinking / reasoning mode.
- Token
Count Request - Request to count tokens in content.
- Token
Count Result - Result of a token counting request.
- Tool
Definition - Definition of a tool that can be called by the LLM.
- Usage
- Token usage information.
Enums§
- Batch
Status - Status of a batch job.
- Beta
Feature - Beta features to enable via headers.
- Cache
Control - Cache control for prompt caching (Anthropic, Google).
- Content
Block - A block of content within a message.
- Content
Delta - Delta content for streaming responses.
- Document
Source - Source for document content (PDF, etc.).
- Prediction
Type - Type of prediction.
- Role
- Message role in a conversation.
- Stop
Reason - Reason the model stopped generating.
- Stream
Event Type - Type of streaming event.
- Structured
Output Type - Type of structured output format.
- Thinking
Effort - Effort level for thinking/reasoning.
- Thinking
Type - Type of thinking mode.