Mentor.Ecto.JSONSchema (mentor v0.2.2)
View SourceHelper module to generate JSON Schema based on Ecto schema.
JSON Schema comes in many flavors and different LLMs have different limitations. Currently, this module aims to implement a schema suitable for OpenAI structured outputs. This type of JSON schema may not be optimal or compatible with other models. Therefore, it's recommended to use this module as a starting point to generate a schema during development.
Warning
For the reasons described above, neither backward compatibility nor compatibility with all built-in adapters are goals of this module.
Summary
Functions
Generates a JSON Schema from an Ecto schema.