mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-08-26 17:46:33 -04:00
1fc129969f
Add a single WithStructuredOutput(StructuredOutputConfig) call option carrying a raw JSON Schema (Draft 2020-12), so one contract yields the same guarantee — a normal-final response is a single JSON value matching the schema — on OpenAI, Anthropic, Bedrock (Converse and legacy), Google AI, Vertex, and Ollama. Each provider maps it to its native mechanism; the result is validated locally against the original schema in the new llms/structuredoutput package. Also fixes a latent Converse gap where the response stop reason was never surfaced on ContentChoice.StopReason.