The Instructor Elixir library lets you retrieve structured output from LLMs like the OpenAI GPT models. But I found that having it return structs that are sum types is not that straightforward.

continue reading on samrat.me

⚠️ This post links to an external website. ⚠️