View Source API Reference Instructor v0.0.5

Modules

Structured prompting for LLMs. Instructor is a spiritual port of the great Instructor Python Library by @jxnlco, check out his talk on YouTube.

Runs against the llama.cpp server. To be clear this calls the llamacpp specific endpoints, not the open-ai compliant ones.

Instructor.EctoType is a behaviour that lets your implement your own custom Ecto.Type that works natively with Instructor.

By default you'll get whatever OpenAI returns. This behavior provides a hook for you to critique the response using standard ecto changesets validations. This can be used in conjuction with the :max_retries parameter to Instructor.chat_completion/1 to retry the completion until it passes your validation.