From a6a86f1b246717793e0e0a1da3c30c48733b6847 Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Tue, 3 Dec 2024 14:45:29 +0000 Subject: [PATCH] Made table columns max width 80 chars. --- .changeset/khaki-gifts-shake.md | 5 +++++ packages/evalite/readme.md | 4 ++-- packages/evalite/src/reporter.ts | 2 +- readme.md | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/khaki-gifts-shake.md diff --git a/.changeset/khaki-gifts-shake.md b/.changeset/khaki-gifts-shake.md new file mode 100644 index 0000000..f4767bc --- /dev/null +++ b/.changeset/khaki-gifts-shake.md @@ -0,0 +1,5 @@ +--- +"evalite": patch +--- + +Made table columns max width 80 chars. diff --git a/packages/evalite/readme.md b/packages/evalite/readme.md index 57f43d1..082c243 100644 --- a/packages/evalite/readme.md +++ b/packages/evalite/readme.md @@ -12,10 +12,10 @@ The TypeScript-native, local-first tool for testing LLM-powered apps. ### 1. Install `evalite` and `autoevals`: -Install `evalite`, and a scoring library like `autoevals`: +Install `evalite`, `vitest`, and a scoring library like `autoevals`: ```bash -pnpm add -D evalite autoevals +pnpm add -D evalite vitest autoevals ``` ### 2. Add an `eval` script: diff --git a/packages/evalite/src/reporter.ts b/packages/evalite/src/reporter.ts index 539c738..2a92072 100644 --- a/packages/evalite/src/reporter.ts +++ b/packages/evalite/src/reporter.ts @@ -202,7 +202,7 @@ export default class EvaliteReporter extends BasicReporter { const availableInnerSpace = availableColumns - columnsWritableWidth - scoreWidth; - const colWidth = Math.floor(availableInnerSpace / 2); + const colWidth = Math.min(Math.floor(availableInnerSpace / 2), 80); this.ctx.logger.log( table( diff --git a/readme.md b/readme.md index 57f43d1..082c243 100644 --- a/readme.md +++ b/readme.md @@ -12,10 +12,10 @@ The TypeScript-native, local-first tool for testing LLM-powered apps. ### 1. Install `evalite` and `autoevals`: -Install `evalite`, and a scoring library like `autoevals`: +Install `evalite`, `vitest`, and a scoring library like `autoevals`: ```bash -pnpm add -D evalite autoevals +pnpm add -D evalite vitest autoevals ``` ### 2. Add an `eval` script: