From 214b3e1d2d2819858000ac344a202e64da418a38 Mon Sep 17 00:00:00 2001 From: Dimitri Kennedy Date: Tue, 2 Jan 2024 22:53:46 -0500 Subject: [PATCH] bumping schema stream to pick up update with support for zod effects (refine etc..) --- bun.lockb | Bin 220459 -> 220459 bytes examples/extract_user_stream/index.ts | 4 +++- package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bun.lockb b/bun.lockb index 50750dbd2697f1f43bb5538902fde888abb2fe51..49d452682a54df0074372d585b55dc7d6b01cf69 100755 GIT binary patch delta 152 zcmV;J0B8TJx(%zk4UjG%*c(AMpdrHgVkDlt8$ulK{zVLjYS@aV2VwvQC&$jEu}%gg zlhiFVvxp=WuRyktpA*7CXa$jKl+~l~w)@X*z#e;0o87ae+lLP5dTTK48Fd?Un`1D1 zBcBtDdYNQxCY#b->(SNu1MYOc5RHS~)3@Ez0daT+F)lJLFaWnyOakC#mjv?yBDYqu G0@bPtyhhCc delta 152 zcmV;J0B8TJx(%zk4UjG%$)|~*b=&a3|7t~HPk&iG1D+h0H!3gTXo9>K@2o(yu}%gg zlawelvxp=WuRuXY$BXlyUAA_HUB^v~TS@OR&B63l=k(q!vqwVYTUAB5=8#=)Ks~Bi zOySnO^Poc=t(F5 diff --git a/examples/extract_user_stream/index.ts b/examples/extract_user_stream/index.ts index a8f8d163..cb7784f4 100644 --- a/examples/extract_user_stream/index.ts +++ b/examples/extract_user_stream/index.ts @@ -4,7 +4,9 @@ import { z } from "zod" const UserSchema = z.object({ age: z.number(), - name: z.string() + name: z.string().refine(name => name.includes(" "), { + message: "Name must contain a space" + }) }) type User = Partial> diff --git a/package.json b/package.json index ac93a84c..806700a1 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "homepage": "https://github.com/jxnl/instructor-js#readme", "dependencies": { - "schema-stream": "^1.1.0", + "schema-stream": "1.2.0", "zod-to-json-schema": "^3.22.3" }, "peerDependencies": {