sample
inline suspend fun SagemakerJobRuntimeClient.sample(crossinline block: SampleRequest.Builder.() -> Unit): SampleResponse
Sends an inference request to the model during a job execution. The request and response bodies are forwarded to and from the model without modification. Each turn (prompt and response) is captured for later use.
Samples
// Sends an inference request to the model and receives the response.
sagemakerJobRuntimeClient.sample {
jobArn = "arn:aws:sagemaker:us-east-1:123456789012:job/AgentRFT/my-training-job"
trajectoryId = "trajectory-001"
body = "eyJtb2RlbCI6Im15LW1vZGVsIiwibWVzc2FnZXMiOlt7InJvbGUiOiJ1c2VyIiwiY29udGVudCI6IkhlbGxvIn1dfQ==".encodeAsByteArray()
}Content copied to clipboard