pub enum KnowledgeSource {
File(PathBuf),
Dir(PathBuf),
Url(String),
RawText(String),
}Expand description
A source from which an agent can acquire knowledge.
Variants§
File(PathBuf)
A local file. Supported extensions: .txt, .md, and .pdf (requires knowledge).
Dir(PathBuf)
All parseable files found directly inside this directory (non-recursive).
Url(String)
Fetch plain text from a URL. Requires the net feature.
RawText(String)
Inline text supplied directly by the caller.
Trait Implementations§
Source§impl Clone for KnowledgeSource
impl Clone for KnowledgeSource
Source§fn clone(&self) -> KnowledgeSource
fn clone(&self) -> KnowledgeSource
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for KnowledgeSource
impl RefUnwindSafe for KnowledgeSource
impl Send for KnowledgeSource
impl Sync for KnowledgeSource
impl Unpin for KnowledgeSource
impl UnsafeUnpin for KnowledgeSource
impl UnwindSafe for KnowledgeSource
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