Expand description
Prelude module for convenient imports.
§Example
use simple_agent_type::prelude::*;
let msg = Message::user("Hello!");
let request = CompletionRequest::builder()
.model("gpt-4")
.message(msg)
.build()
.unwrap();Structs§
- ApiKey
- API key (validated, never logged or displayed).
- Capabilities
- Provider capabilities.
- Choice
Delta - A delta in a streaming choice.
- Coercion
Result - Result of a coercion operation with transparency.
- Completion
Choice - A single completion choice.
- Completion
Chunk - A chunk of a streaming completion response.
- Completion
Request - A completion request to an LLM provider.
- Completion
Request Builder - Builder for CompletionRequest.
- Completion
Response - A completion response from an LLM provider.
- Healing
Config - Healing configuration for response coercion.
- Message
- A message in a conversation.
- Message
Delta - Incremental message content in a stream.
- Provider
Config - Provider configuration.
- Provider
Metrics - Provider metrics for routing decisions.
- Provider
Request - Opaque provider-specific request.
- Provider
Response - Opaque provider-specific response.
- Retry
Config - Retry configuration for failed requests.
- Tool
Call - Tool call emitted by the model.
- Tool
Call Function - Tool call function payload in responses.
- Tool
Choice Function - Function selector for tool choice.
- Tool
Choice Tool - Tool choice specifying a concrete function to call.
- Tool
Definition - Tool definition for requests.
- Tool
Function - Function tool definition.
- Usage
- Token usage statistics.
Enums§
- Coercion
Flag - Flag indicating a specific coercion/healing operation.
- Finish
Reason - Reason why a completion finished.
- Healing
Error - Healing and coercion errors.
- Provider
Error - Provider-specific errors.
- Provider
Health - Provider health status.
- Role
- Role of a message in a conversation.
- Routing
Mode - Routing mode enum for common strategies.
- Simple
Agents Error - Main error type for SimpleAgents operations.
- Tool
Choice - Tool choice for requests.
- Tool
Choice Mode - Tool choice mode for requests.
- Tool
Type - Tool type supported by the API.
- Validation
Error - Validation errors.
Traits§
- Cache
- Trait for caching LLM responses.
- Provider
- Trait for LLM providers.
- Routing
Strategy - Trait for routing strategies.
Type Aliases§
- Result
- Result type alias using SimpleAgentsError.