Skip to main content

sampling

Attribute Macro sampling 

Source
#[sampling]
Expand description

Maps the sampling handler function

§Example

use neva::prelude::*;

#[sampling]
async fn sampling_handler(params: CreateMessageRequestParams) -> CreateMessageResult {
    CreateMessageResult::assistant()
        .with_model("o3-mini")
        .with_content("Some response")
}