nallwhy

nallwhy

LangSchema - Unified Abstract Schema for AI Model Structured Outputs

LangSchema is an Elixir library that helps developers create provider-agnostic schemas for AI model integration. It abstracts away the differences between various AI providers, making it easier to switch between them without modifying your core schema definitions.

Key Features

  • Abstract Schema: Provides a flexible, unified schema format that can be converted to provider-specific JSON schemas.
  • Extensible Converters: Easily add support for new AI providers by implementing the LangSchema.Converter behaviour.
  • Direct Integration: Compatible with Elixir LangChain, allowing seamless integration without extensive modification.

Why Use LangSchema?

As the AI landscape rapidly evolves, developers often need to switch between different providers like OpenAI, Gemini, or emerging alternatives. However, each provider has its own JSON schema requirements, making it cumbersome to adjust schemas every time you switch models. LangSchema addresses this by introducing an intermediate, provider-agnostic schema format, allowing you to define your data structures once and reuse them across different providers with minimal modification. This not only simplifies your code but also significantly reduces the friction when experimenting with or integrating new AI models.

Moreover, LangSchema is designed with extensibility in mind. You can easily create custom converters to handle provider-specific quirks or special requirements, ensuring that your schema can evolve alongside the rapidly changing AI ecosystem. This flexibility makes it an ideal choice for developers who need full control over their schema definitions.

Built-in Supported Converters

  • OpenAI
  • Gemini

For more information, check out the repository:

Where Next?

Popular in Libraries Top

kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
Crowdhailer
Raxx is an alternative to Plug and is inspired by projects such as Rack(Ruby) and Ring(Clojure). 1.0-rc.1 is now available. To use it re...
New
zoltanszogyenyi
Hey everyone :wave: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-source U...
New
sabiwara
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code. You can try it out using this basic Elixir playground made ...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. [demo] The distributed characteristics of Elixir and the low memory foo...
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New

Other popular topics Top

William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New

Sub Categories:

We're in Beta

About us Mission Statement