Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commenting out flakey test that we dont need + adding changeset #157

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wet-mice-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@instructor-ai/instructor": patch
---

updates zod-stream dep to get control charachter filtering on teh raw stream
26 changes: 0 additions & 26 deletions tests/validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,4 @@ describe("Validator", async () => {

expect(type(output).is<z.infer<typeof QA>>(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<z.infer<typeof QA>>(true)).toBe(true)
// }, 100000)
})
Loading