pub struct VectorFormat {
pub instruction: String,
pub tool: Tool,
pub dimension: usize,
pub bounds: Option<Vec<Option<Bounds>>>,
/* private fields */
}Fields§
§instruction: String§tool: Tool§dimension: usize§bounds: Option<Vec<Option<Bounds>>>Implementations§
Source§impl VectorFormat
impl VectorFormat
pub fn new( instruction: &str, dimension: usize, bounds: Option<Vec<Option<Bounds>>>, ) -> Self
pub fn clone(&self) -> Self
pub fn answer(&mut self, response: Vec<f64>)
pub async fn llm( &mut self, authorization: &CredentialsOrApiKey, model: Text, options: LlmOptions, ) -> Result<TextResponse>
pub fn get_response(&self) -> Option<Vec<f64>>
pub fn to_json(&self) -> Value
pub fn to_vector(&self) -> Vec<f64>
pub fn distance(a: &VectorFormat, b: &VectorFormat) -> f64
pub fn tool(dimension: usize, bounds: Option<Vec<Option<Bounds>>>) -> Tool
Auto Trait Implementations§
impl !RefUnwindSafe for VectorFormat
impl !UnwindSafe for VectorFormat
impl Forget for VectorFormat
impl Freeze for VectorFormat
impl Move for VectorFormat
impl Send for VectorFormat
impl Sync for VectorFormat
impl Unpin for VectorFormat
impl UnsafeUnpin for VectorFormat
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