Class: Braintrust::Resources::Evals
- Inherits:
-
Object
- Object
- Braintrust::Resources::Evals
- Defined in:
- lib/braintrust/resources/evals.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Braintrust::Models::SummarizeExperimentResponse
Launch an evaluation.
-
#initialize(client:) ⇒ Evals
constructor
A new instance of Evals.
Constructor Details
#initialize(client:) ⇒ Evals
Returns a new instance of Evals.
6 7 8 |
# File 'lib/braintrust/resources/evals.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Braintrust::Models::SummarizeExperimentResponse
Launch an evaluation. This is the API-equivalent of the Eval
function that is
built into the Braintrust SDK. In the Eval API, you provide pointers to a
dataset, task function, and scoring functions. The API will then run the
evaluation, create an experiment, and return the results along with a link to
the experiment. To learn more about evals, see the
Evals guide.
33 34 35 36 37 38 39 40 |
# File 'lib/braintrust/resources/evals.rb', line 33 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/eval" req[:body] = params req[:model] = Braintrust::Models::SummarizeExperimentResponse @client.request(req, opts) end |