pub struct SkillScript {
pub name: String,
pub description: Option<String>,
pub parameters_schema: Option<Value>,
pub source: SkillScriptSource,
}Expand description
An executable script attached to a Skill, run through the
run_skill_script tool.
Fields§
§name: StringThe name the model runs it by (for file scripts, the path relative to
the skill, e.g. scripts/process.py). Matched case-insensitively.
description: Option<String>A short summary, if any.
parameters_schema: Option<Value>JSON Schema for args, advertised to the model, if any. File scripts
take an array of strings.
source: SkillScriptSourceThe script’s code.
Implementations§
Source§impl SkillScript
impl SkillScript
Sourcepub fn inline<F, Fut>(name: impl Into<String>, f: F) -> SkillScript
pub fn inline<F, Fut>(name: impl Into<String>, f: F) -> SkillScript
An inline script running f with the model’s args.
Sourcepub fn file(
name: impl Into<String>,
full_path: impl Into<PathBuf>,
) -> SkillScript
pub fn file( name: impl Into<String>, full_path: impl Into<PathBuf>, ) -> SkillScript
A file script at full_path, run by the provider’s runner.
Sourcepub fn with_description(self, description: impl Into<String>) -> SkillScript
pub fn with_description(self, description: impl Into<String>) -> SkillScript
Builder: a short summary.
Sourcepub fn with_parameters_schema(self, schema: Value) -> SkillScript
pub fn with_parameters_schema(self, schema: Value) -> SkillScript
Builder: the JSON Schema of args.
Trait Implementations§
Source§impl Clone for SkillScript
impl Clone for SkillScript
Source§fn clone(&self) -> SkillScript
fn clone(&self) -> SkillScript
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SkillScript
impl !UnwindSafe for SkillScript
impl Freeze for SkillScript
impl Send for SkillScript
impl Sync for SkillScript
impl Unpin for SkillScript
impl UnsafeUnpin for SkillScript
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more