Struct Bot
pub struct Bot {
pub id: BotId,
pub name: String,
pub avatar: EntityAvatar,
pub capabilities: BotCapabilities,
}Expand description
Represents a bot, which is an automated assistant of any kind (model, agent, etc).
§WARNING
This is an “ideal” representation. However, OpenAI-compatible APIs will only
give us the model id (though the /models endpoint) and nothing else. Therefore,
for most client implementations hitting such APIs, the name and the avatar may be
set from the id, and capabilities will be a best-effort guess or a fixed set based
on the client itself.
For example, the crate::clients::openai::OpenAiClient will simply list all
models available at /models, with a [BotCapability::TextOutput] as this client
is intended for text-based conversations. However, realtime and image models will also
be there with that capability incorrectly set.
Depending on your use case, it recommended to either:
- Ignore the capabilities field for
Bots coming from such clients. - Override them if you are working with concrete models you know the capabilities of.
- Try to filter models that should not be listed by the client in the first place (e.g., image and realtime models in a text-only client).
Fields§
§id: BotId§name: String§avatar: EntityAvatar§capabilities: BotCapabilitiesTrait Implementations§
Auto Trait Implementations§
impl Freeze for Bot
impl RefUnwindSafe for Bot
impl Send for Bot
impl Sync for Bot
impl Unpin for Bot
impl UnwindSafe for Bot
Blanket Implementations§
§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.