Skip to content

Commit

Permalink
Changed banner temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Dec 2, 2024
1 parent 9f37dd1 commit f50773e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 61 deletions.
8 changes: 6 additions & 2 deletions packages/evalite-vitest/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ export default class EvaliteReporter extends BasicReporter {
this.ctx = ctx;
this.start = performance.now();

// this.ctx.logger.log(
// ` ${c.magenta(c.bold("EVALITE"))} ${c.dim("running on")} ` +
// c.cyan(`http://localhost:${c.bold(DEFAULT_SERVER_PORT)}/`)
// );
this.ctx.logger.log("");
this.ctx.logger.log(
` ${c.magenta(c.bold("EVALITE"))} ${c.dim("running on")} ` +
c.cyan(`http://localhost:${c.bold(DEFAULT_SERVER_PORT)}/`)
` ${c.magenta(c.bold("EVALITE"))} ${c.dim("running...")}`
);
this.ctx.logger.log("");

Expand Down
36 changes: 36 additions & 0 deletions packages/example/src/basics.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
import { evalite, Levenshtein } from "evalite-vitest";

evalite("Test basics", {
data: async () => [
{
input: `What's the capital of France?`,
expected: `Lille.`,
},
{
input: `What's the capital of Germany?`,
expected: `Berlin.`,
},
{
input: `What's the capital of Italy?`,
expected: `Rome.`,
},
{
input: `What's the capital of the United States?`,
expected: `Washington, D.C.`,
},
],
task: async (input) => {
const result = await generateText({
model: openai("gpt-3.5-turbo"),
system: `
Answer the question concisely, in as few words as possible.
`,
prompt: input,
});

return result.text;
},
scorers: [Levenshtein],
});
59 changes: 0 additions & 59 deletions packages/example/src/index.eval.ts

This file was deleted.

0 comments on commit f50773e

Please sign in to comment.