pub struct Evals<'c, C: Config> { /* private fields */ }Expand description
Create, manage, and run evals in the OpenAI platform. Related guide: Evals
Implementations§
Source§impl<'c, C: Config> Evals<'c, C>
impl<'c, C: Config> Evals<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list<Q>(&self, query: &Q) -> Result<EvalList, OpenAIError>
pub async fn list<Q>(&self, query: &Q) -> Result<EvalList, OpenAIError>
List evaluations for a project. List evaluations for a project.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
List evaluations for a project.
Sourcepub async fn create(
&self,
request: CreateEvalRequest,
) -> Result<Eval, OpenAIError>
pub async fn create( &self, request: CreateEvalRequest, ) -> Result<Eval, OpenAIError>
Create the structure of an evaluation that can be used to test a model’s performance. An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see the Evals guide. Create the structure of an evaluation that can be used to test a model’s performance. An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see the Evals guide.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Create the structure of an evaluation that can be used to test a model’s performance. An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see the Evals guide.
Sourcepub async fn retrieve(&self, eval_id: &str) -> Result<Eval, OpenAIError>
pub async fn retrieve(&self, eval_id: &str) -> Result<Eval, OpenAIError>
Get an evaluation by ID. Get an evaluation by ID.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
eval_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, eval_id: T0, ) -> Result<R, OpenAIError>
Get an evaluation by ID.
Sourcepub async fn update(
&self,
eval_id: &str,
request: UpdateEvalRequest,
) -> Result<Eval, OpenAIError>
pub async fn update( &self, eval_id: &str, request: UpdateEvalRequest, ) -> Result<Eval, OpenAIError>
Update certain properties of an evaluation. Update certain properties of an evaluation.
Sourcepub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>(
&self,
eval_id: T0,
request: T1,
) -> Result<R, OpenAIError>
pub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>( &self, eval_id: T0, request: T1, ) -> Result<R, OpenAIError>
Update certain properties of an evaluation.
Sourcepub async fn delete(
&self,
eval_id: &str,
) -> Result<DeleteEvalResponse, OpenAIError>
pub async fn delete( &self, eval_id: &str, ) -> Result<DeleteEvalResponse, OpenAIError>
Delete an evaluation. Delete an evaluation.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
eval_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, eval_id: T0, ) -> Result<R, OpenAIError>
Delete an evaluation.