pub struct CategoricalFormat {
pub instruction: String,
pub tool: Tool,
pub usage: String,
/* private fields */
}Fields§
§instruction: String§tool: Tool§usage: StringHow to answer with tool, read after the instruction.
Implementations§
Source§impl CategoricalFormat
impl CategoricalFormat
pub fn new(instruction: &str, categories: Vec<String>) -> Self
pub fn clone(&self) -> Self
pub fn answer(&mut self, response: String)
pub async fn llm( &mut self, authorization: &CredentialsOrApiKey, model: Text, options: LlmOptions, ) -> Result<TextResponse>
pub fn get_categories(&self) -> &[String]
pub fn get_response(&self) -> Option<String>
pub fn to_json(&self) -> Value
pub fn distance(a: &CategoricalFormat, b: &CategoricalFormat) -> f64
pub fn tool(categories: &[String]) -> Tool
pub fn usage(categories: &[String]) -> String
Auto Trait Implementations§
impl !RefUnwindSafe for CategoricalFormat
impl !UnwindSafe for CategoricalFormat
impl Forget for CategoricalFormat
impl Freeze for CategoricalFormat
impl Move for CategoricalFormat
impl Send for CategoricalFormat
impl Sync for CategoricalFormat
impl Unpin for CategoricalFormat
impl UnsafeUnpin for CategoricalFormat
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