swiecki
04/23/2024, 8:46 PMtypescript
const client = Instructor({
client: oai,
mode: "TOOLS",
})
const ExampleSchema = z.object({
size: z.string().describe("size"),
weight: z.string().describe("weight"),
})
return await client.chat.completions.create({
messages: [
{
role: "user",
content: `${inputString}`,
},
],
model: "gpt-4-turbo-2024-04-09",
response_model: {
schema: ExampleSchema,
name: "Physical_Info",
},
})
}
I'm hoping to use this as a provider basically and pass different input strings to it that are known cases and assert that certain things are true. Yes you can parse out specific JSON keys in asserts, thats NOT the issue- the issue is should I be doing one provider per yaml file since I'm not looking to run all tests against all providers. Is there a way I can use this function to run the tests but also keep the nice html output? Thanks!swiecki
04/23/2024, 9:32 PM