diff --git a/.changeset/wet-mice-warn.md b/.changeset/wet-mice-warn.md new file mode 100644 index 00000000..f67bfba3 --- /dev/null +++ b/.changeset/wet-mice-warn.md @@ -0,0 +1,5 @@ +--- +"@instructor-ai/instructor": patch +--- + +updates zod-stream dep to get control charachter filtering on teh raw stream diff --git a/tests/validator.test.ts b/tests/validator.test.ts index 05d7692e..10b25977 100644 --- a/tests/validator.test.ts +++ b/tests/validator.test.ts @@ -81,30 +81,4 @@ describe("Validator", async () => { expect(type(output).is>(true)).toBe(true) }, 100000) - - // test("Self Correction", async () => { - // const question = "What is the meaning of life?" - - // const invalidContext = - // "According to the devil the meaning of live is to live a life of sin and debauchery." - - // const output = await instructor.chat.completions.create({ - // model: "gpt-4", - // max_retries: 2, - // response_model: { schema: QA, name: "Question and Answer" }, - // messages: [ - // { - // role: "system", - // content: - // "You are a system that answers questions based on the context. answer exactly what the question asks using the context." - // }, - // { - // role: "user", - // content: `using the context: ${invalidContext}\n\nAnswer the following question: ${question}` - // } - // ] - // }) - - // expect(type(output).is>(true)).toBe(true) - // }, 100000) })