use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::types::rl_training::{RlTrainRequest, RlTrainResponse};
#[derive(Debug, Clone)]
pub struct RlTrainingClient {
http: HttpClient,
}
impl RlTrainingClient {
pub(crate) fn new(http: HttpClient) -> Self {
Self { http }
}
pub async fn train(
&self,
request: RlTrainRequest,
options: Option<&RequestOptions>,
) -> Result<RlTrainResponse, Error> {
self.http.post("/rl/train", &request, options).await
}
}