LlmAgentFromConfig

Trait LlmAgentFromConfig 

Source
pub trait LlmAgentFromConfig {
    // Required method
    fn from_config(config: AgentConfig) -> Result<LlmAgent>;
}
Expand description

Extension trait for creating LlmAgent from TOML configuration.

Import this trait to use LlmAgent::from_config:

use ceylon_runtime::{LlmAgent, LlmAgentFromConfig};
use ceylon_runtime::config::AgentConfig;

let config = AgentConfig::from_file("agent.toml").unwrap();
let agent = LlmAgent::from_config(config).unwrap();

Required Methods§

Source

fn from_config(config: AgentConfig) -> Result<LlmAgent>

Create an LlmAgent from an AgentConfig.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§