pub struct EmbeddingsParamBuilder { /* private fields */ }
Expand description
Builder for EmbeddingsParam
.
Implementations§
Source§impl EmbeddingsParamBuilder
impl EmbeddingsParamBuilder
Sourcepub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
调用模型名称,可以选择text-embedding-v1,text-embedding-v2或者text-embedding-v3
pub fn input(&mut self, value: EmbeddingsInput) -> &mut Self
pub fn parameters<VALUE: Into<EmbeddingsParameters>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn text_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn text_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
文本转换为向量后可以应用于检索、聚类、分类等下游任务, 对检索这类非对称任务为了达到更好的检索效果建议区分查询文本(query)和底库文本(document)类型, 聚类、分类等对称任务可以不用特殊指定,采用系统默认值document即可。
Sourcepub fn build(&self) -> Result<EmbeddingsParam, EmbeddingsParamBuilderError>
pub fn build(&self) -> Result<EmbeddingsParam, EmbeddingsParamBuilderError>
Trait Implementations§
Source§impl Clone for EmbeddingsParamBuilder
impl Clone for EmbeddingsParamBuilder
Source§fn clone(&self) -> EmbeddingsParamBuilder
fn clone(&self) -> EmbeddingsParamBuilder
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 moreAuto Trait Implementations§
impl Freeze for EmbeddingsParamBuilder
impl RefUnwindSafe for EmbeddingsParamBuilder
impl Send for EmbeddingsParamBuilder
impl Sync for EmbeddingsParamBuilder
impl Unpin for EmbeddingsParamBuilder
impl UnwindSafe for EmbeddingsParamBuilder
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