@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
56 lines (53 loc) • 2 kB
JavaScript
import { APIResource } from '../../resource.js';
import { isRequestOptions } from '../../core.js';
import { Runs, RunListResponsesPage } from './runs/runs.js';
import { CursorPage } from '../../pagination.js';
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
class Evals extends APIResource {
constructor() {
super(...arguments);
this.runs = new Runs(this._client);
}
/**
* 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](https://platform.openai.com/docs/guides/evals).
*/
create(body, options) {
return this._client.post('/evals', { body, ...options });
}
/**
* Get an evaluation by ID.
*/
retrieve(evalId, options) {
return this._client.get(`/evals/${evalId}`, options);
}
/**
* Update certain properties of an evaluation.
*/
update(evalId, body, options) {
return this._client.post(`/evals/${evalId}`, { body, ...options });
}
list(query = {}, options) {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/evals', EvalListResponsesPage, { query, ...options });
}
/**
* Delete an evaluation.
*/
del(evalId, options) {
return this._client.delete(`/evals/${evalId}`, options);
}
}
class EvalListResponsesPage extends CursorPage {
}
Evals.EvalListResponsesPage = EvalListResponsesPage;
Evals.Runs = Runs;
Evals.RunListResponsesPage = RunListResponsesPage;
export { EvalListResponsesPage, Evals };
//# sourceMappingURL=evals.js.map