pub struct EvaluationRequest {
pub model: String,
pub prompt: Prompt,
pub hosting: Option<Hosting>,
pub completion_expected: String,
pub contextual_control_threshold: Option<f64>,
pub control_log_additive: Option<bool>,
}
Fields§
§model: String
§prompt: Prompt
Base prompt to for the evaluation.
hosting: Option<Hosting>
Possible values: [aleph-alpha, None] Optional parameter that specifies which datacenters may process the request. You can either set the parameter to “aleph-alpha” or omit it (defaulting to null). Not setting this value, or setting it to None, gives us maximal flexibility in processing your request in our own datacenters and on servers hosted with other providers. Choose this option for maximum availability. Setting it to “aleph-alpha” allows us to only process the request in our own datacenters. Choose this option for maximal data privacy.
completion_expected: String
The completion that you would expect to be completed. Unconditional completion can be used with an empty string (default). The prompt may contain a zero shot or few shot task.
contextual_control_threshold: Option<f64>
If set to None
, attention control parameters only apply to those tokens that have explicitly been set
in the request. If set to a non-null value, we apply the control parameters to similar tokens as
well. Controls that have been applied to one token will then be applied to all other tokens that have
at least the similarity score defined by this parameter. The similarity score is the cosine
similarity of token embeddings.
control_log_additive: Option<bool>
Default value: true
true: apply controls on prompt items by adding the log(control_factor)`` to attention scores. false: apply controls on prompt items by
(attention_scores - -attention_scores.min(-1)) * control_factor`
Implementations§
Source§impl EvaluationRequest
impl EvaluationRequest
pub fn hosting(self, hosting: Hosting) -> Self
pub fn contextual_control_threshold( self, contextual_control_threshold: f64, ) -> Self
pub fn control_log_additive(self, control_log_additive: bool) -> Self
Trait Implementations§
Source§impl Debug for EvaluationRequest
impl Debug for EvaluationRequest
Source§impl Default for EvaluationRequest
impl Default for EvaluationRequest
Source§fn default() -> EvaluationRequest
fn default() -> EvaluationRequest
Auto Trait Implementations§
impl Freeze for EvaluationRequest
impl RefUnwindSafe for EvaluationRequest
impl Send for EvaluationRequest
impl Sync for EvaluationRequest
impl Unpin for EvaluationRequest
impl UnwindSafe for EvaluationRequest
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.