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

OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 13487 106
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 13801 100
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: https://github.com/devonestes/assertions ...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
ericlathrop
I built a silly site for Halloween that uses Phoenix Channels on the backend, and React on the frontend. I had many problems integrating ...
New
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

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
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
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement