fix(langchain): allow to set strict tag manually in providerStrategy - #9578
Christian Bromann (christian-bromann) merged 5 commits into
Conversation
|
There was a problem hiding this comment.
I'm generally not a fan when libraries bring positional args to APIs. Instead of having the second arg be strict, can we have a union for the first type that allows for either: a generic schema object, or an object that has schema + strict args? E.g.
providerStrategy(z.object(...))
// or
providerStrategy({ schema: z.object(...), strict: true })(this is how we do it in withStructuredOutput)
cc42c7b to
9f628c8
Compare
|
Hunter Lovell (@hntrl) thanks for the feedback! Updated PR accordingly. |
9f628c8 to
c7e2b20
Compare
ref langchain-ai/langchain#34149