pub struct Bots<'a>(/* private fields */);Expand description
Bot management.
Implementations§
Source§impl Bots<'_>
impl Bots<'_>
pub fn list(&self) -> Result<Vec<Bot>>
pub fn get(&self, id_or_name: &str) -> Result<Bot>
pub fn create(&self, spec: BotSpec) -> Result<Bot>
pub fn update(&self, id: &str, spec: BotSpec) -> Result<Bot>
pub fn delete(&self, id: &str) -> Result<()>
Sourcepub fn hire(&self, template_id: &str, name: Option<&str>) -> Result<Bot>
pub fn hire(&self, template_id: &str, name: Option<&str>) -> Result<Bot>
Creates a bot from a gallery template.
pub fn get_model(&self, id: &str) -> Result<BotModelInfo>
Sourcepub fn set_model(&self, id: &str, model: &str) -> Result<BotModelInfo>
pub fn set_model(&self, id: &str, model: &str) -> Result<BotModelInfo>
Sets the bot’s model: ModelRef::DEFAULT, ModelRef::of or a profile name.
pub fn pause(&self, id: &str) -> Result<()>
pub fn resume(&self, id: &str) -> Result<()>
Sourcepub fn export(&self, id: &str, include_memory: bool) -> Result<Vec<u8>>
pub fn export(&self, id: &str, include_memory: bool) -> Result<Vec<u8>>
Downloads a .marbot package (secrets are never included).
pub fn import_package(&self, package: &[u8]) -> Result<Bot>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Bots<'a>
impl<'a> !UnwindSafe for Bots<'a>
impl<'a> Freeze for Bots<'a>
impl<'a> Send for Bots<'a>
impl<'a> Sync for Bots<'a>
impl<'a> Unpin for Bots<'a>
impl<'a> UnsafeUnpin for Bots<'a>
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