pub struct SelectionFormat {
pub instruction: String,
pub tool: Tool,
/* private fields */
}Fields§
§instruction: String§tool: ToolImplementations§
Source§impl SelectionFormat
impl SelectionFormat
pub fn new(instruction: &str, options: Vec<String>) -> Self
pub fn clone(&self) -> Self
pub fn answer(&mut self, response: Vec<String>)
pub async fn llm( &mut self, authorization: &CredentialsOrApiKey, model: Text, options: LlmOptions, ) -> Result<TextResponse>
pub fn get_options(&self) -> &[String]
pub fn get_response(&self) -> Option<Vec<String>>
pub fn to_json(&self) -> Value
Sourcepub fn to_vector(&self) -> Vec<f64>
pub fn to_vector(&self) -> Vec<f64>
Multi-hot scaled by 1/sqrt(count) so the vector is unit-length.
pub fn distance(a: &SelectionFormat, b: &SelectionFormat) -> f64
pub fn tool(options: &[String]) -> Tool
Auto Trait Implementations§
impl !RefUnwindSafe for SelectionFormat
impl !UnwindSafe for SelectionFormat
impl Forget for SelectionFormat
impl Freeze for SelectionFormat
impl Move for SelectionFormat
impl Send for SelectionFormat
impl Sync for SelectionFormat
impl Unpin for SelectionFormat
impl UnsafeUnpin for SelectionFormat
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