pub enum EmbeddingsInput {
String(String),
Strings(Vec<String>),
Ints(Vec<i64>),
MultiInts(Vec<Vec<i64>>),
}
Expand description
Represents the diverse ways the input can be supplied for embeddings:
- A single string
- Multiple strings
- A single sequence of token IDs
- Multiple sequences of token IDs
This is analogous to how prompt inputs can be specified in the Completions API, so we mirror that flexibility here.
Variants§
String(String)
A single string
Strings(Vec<String>)
Multiple strings
Ints(Vec<i64>)
A single sequence of token IDs
MultiInts(Vec<Vec<i64>>)
Multiple sequences of token IDs
Trait Implementations§
Source§impl Clone for EmbeddingsInput
impl Clone for EmbeddingsInput
Source§fn clone(&self) -> EmbeddingsInput
fn clone(&self) -> EmbeddingsInput
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 moreSource§impl Debug for EmbeddingsInput
impl Debug for EmbeddingsInput
Source§impl<'de> Deserialize<'de> for EmbeddingsInput
impl<'de> Deserialize<'de> for EmbeddingsInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingsInput
impl RefUnwindSafe for EmbeddingsInput
impl Send for EmbeddingsInput
impl Sync for EmbeddingsInput
impl Unpin for EmbeddingsInput
impl UnwindSafe for EmbeddingsInput
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