Expand description
Language model completion and conversation management
Contains:
- Client for managing LLM interactions
- Message history tracking
- Response extraction
Structs§
- Client
- A client for managing interactions with a completion model, including conversation history, tooling, state management, and token tracking.
- Prompt
Builder - Builder for constructing and executing completion prompts
- State
- Extractor for state
- Token
Usage - Tracks token usage statistics for model interactions
Enums§
- Completion
Error - Errors that can happen during completion
- Extraction
Error - Errors related to response extraction from completions
- Message
- Messages exchanged with the completion model
- State
Error - Errors related to state management in the
Client
Traits§
- Completion
Model - Core trait defining the interface for completion models
- Extractor
- Types that can be deserialized from model completion responses.
Functions§
- default_
extractor_ serializer - Generates a JSON schema serializer for extractor types
- serialize_
assistant - Serializes assistant messages with integrated tool call information
- serialize_
user - Serializes user messages, ignoring tool call responses