Skip to content

Commit

Permalink
Fixed readme and streaming examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Dec 7, 2024
1 parent 13d64da commit 5fd4de1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions packages/evalite-core/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
getJsonDbEvals,
getLastTwoFullRuns,
type Evalite,
} from "@evalite/core";
import { getLastTwoFullRuns, type Evalite } from "@evalite/core";
import { fastifyStatic } from "@fastify/static";
import { fastifyWebsocket } from "@fastify/websocket";
import fastify from "fastify";
Expand Down
6 changes: 3 additions & 3 deletions packages/evalite/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Install `evalite`, `vitest`, and a scoring library like `autoevals`:
pnpm add -D evalite vitest autoevals
```

### 2. Add an `eval` script:
### 2. Add an `eval:dev` script:

Add an `eval` script to your package.json:

```json
{
"scripts": {
"eval": "evalite"
"eval:dev": "evalite watch"
}
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ evalite("My Eval", {
### 4. Run Your Eval

Run `pnpm run eval`.
Run `pnpm run eval:dev`.

This runs `evalite`, which runs the evals:

Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/example.eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ evalite("Test Capitals", {
prompt: input,
});

return result.text;
return result.textStream;
},
scorers: [Factuality, Levenshtein],
});

0 comments on commit 5fd4de1

Please sign in to comment.