pub struct EmbeddingsParam {
pub model: String,
pub input: EmbeddingsInput,
pub parameters: Option<EmbeddingsParameters>,
pub text_type: Option<String>,
}
Fields§
§model: String
调用模型名称,可以选择text-embedding-v1,text-embedding-v2或者text-embedding-v3
input: EmbeddingsInput
§parameters: Option<EmbeddingsParameters>
§text_type: Option<String>
文本转换为向量后可以应用于检索、聚类、分类等下游任务, 对检索这类非对称任务为了达到更好的检索效果建议区分查询文本(query)和底库文本(document)类型, 聚类、分类等对称任务可以不用特殊指定,采用系统默认值document即可。
Trait Implementations§
Source§impl Clone for EmbeddingsParam
impl Clone for EmbeddingsParam
Source§fn clone(&self) -> EmbeddingsParam
fn clone(&self) -> EmbeddingsParam
Returns a copy 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 EmbeddingsParam
impl Debug for EmbeddingsParam
Source§impl<'de> Deserialize<'de> for EmbeddingsParam
impl<'de> Deserialize<'de> for EmbeddingsParam
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
Source§impl PartialEq for EmbeddingsParam
impl PartialEq for EmbeddingsParam
Source§impl Serialize for EmbeddingsParam
impl Serialize for EmbeddingsParam
impl StructuralPartialEq for EmbeddingsParam
Auto Trait Implementations§
impl Freeze for EmbeddingsParam
impl RefUnwindSafe for EmbeddingsParam
impl Send for EmbeddingsParam
impl Sync for EmbeddingsParam
impl Unpin for EmbeddingsParam
impl UnwindSafe for EmbeddingsParam
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