pub type SamplingFn = Arc<dyn Fn(SamplingRequest) -> BoxFuture<'static, Result<SamplingResponse, SamplingError>> + Send + Sync>;Expand description
Type alias for the callback used to invoke a language model.
The function receives a SamplingRequest and returns a boxed future that
resolves to a SamplingResponse or a SamplingError.
Aliased Typeยง
pub struct SamplingFn { /* private fields */ }