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:

https://github.com/nallwhy/lang_schema

Where Next?

Popular in Announcing Top

gabrielpoca
Hello everyone! I want to share with you something that I’m really proud of: https://stillstatic.io/ Still is a static site builder for...
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
michalmuskala
Another small library today. PersistentEts Hex: persistent_ets | Hex GitHub: GitHub - michalmuskala/persistent_ets · GitHub Ets table ...
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
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
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
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement