Skip to main content

CodeConfig

Defined in the agents module.
Rust AI Agent SDK Configuration for code execution settings.

Fields

NameTypeDescription
sandboxboolEnable sandboxed execution
timeoutu32Execution timeout in seconds
allowed_languagesVec<String>Allowed programming languages
max_output_lengthusizeMaximum output length
working_directoryOption<String>Working directory
environmentHashMap<StringEnvironment variables

Methods

new

fn new() -> Self
Create a new CodeConfig

sandbox

fn sandbox(mut self, sandbox: bool) -> Self
Set sandbox mode Parameters:
NameType
sandboxbool

timeout

fn timeout(mut self, timeout: u32) -> Self
Set timeout Parameters:
NameType
timeoutu32

allowed_languages

fn allowed_languages(mut self, languages: Vec<String>) -> Self
Set allowed languages Parameters:
NameType
languagesVec&lt;String&gt;

Source

View on GitHub

praisonai/src/agents/mod.rs at line 721