mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
26 lines
580 B
TypeScript
26 lines
580 B
TypeScript
import { Eval } from 'braintrust'
|
|
import { Levenshtein } from 'autoevals'
|
|
import assert from 'node:assert'
|
|
|
|
assert(process.env.BRAINTRUST_PROJECT_ID, 'BRAINTRUST_PROJECT_ID is not set')
|
|
|
|
Eval('Tutorial', {
|
|
projectId: process.env.BRAINTRUST_PROJECT_ID,
|
|
data: () => {
|
|
return [
|
|
{
|
|
input: 'Foo',
|
|
expected: 'Hi Foo',
|
|
},
|
|
{
|
|
input: 'Bar',
|
|
expected: 'Hello Bar',
|
|
},
|
|
] // Replace with your eval dataset
|
|
},
|
|
task: async (input) => {
|
|
return 'Hi ' + input // Replace with your LLM call
|
|
},
|
|
scores: [Levenshtein],
|
|
})
|