Skip to content

Feature/Add elixir example#61

Open
0xCAB0 wants to merge 5 commits intoBoundaryML:mainfrom
0xCAB0:main
Open

Feature/Add elixir example#61
0xCAB0 wants to merge 5 commits intoBoundaryML:mainfrom
0xCAB0:main

Conversation

@0xCAB0
Copy link

@0xCAB0 0xCAB0 commented Feb 1, 2026

Summary

Introduces a complete Elixir starter project demonstrating BAML integration using the https://github.com/emilsoman/baml_elixir library.

Copies the baml_src api defined at python-fastapi-example using req and baml_elixir

Note

This examples uses Google AI since most examples provide OpenAI and this could provide some variety.

Changes

  • BAML Client Setup: Compile-time macro-based client generation
    via use BamlElixir.Client
  • Example Functions: Resume extraction, message classification,
    image description, RAG, and book analysis
  • Sync & Streaming Support: Both synchronous calls and streaming
    responses with callbacks
  • HTTP Server: Bandit-based web server with Plug router for API
    endpoints
  • Type Generation: Automatic Elixir structs and typespecs from
    BAML class/enum definitions
  • Google AI Integration: Pre-configured Gemini 2.5 Flash client
  • Environment Management: dotenv support for API key
    configuration

Project Structure

  elixir-starter/
  ├── lib/elixir_starter/
  │   ├── baml_client.ex       # BAML client module
  │   ├── resume_extractor.ex  # Example usage with streaming
  │   └── router.ex            # HTTP endpoints
  ├── priv/baml_src/           # BAML function definitions
  └── config/runtime.exs       # Runtime configuration

Documentation

  • Setup instructions (prerequisites, env config, install, run)
  • Usage examples (sync calls, streaming)
  • baml_elixir limitations table (what works vs. not supported)
  • Supported platforms for precompiled NIFs
  • LLM provider configuration guide

@vercel
Copy link

vercel bot commented Feb 1, 2026

@0xCAB0 is attempting to deploy a commit to the Boundary Team on Vercel.

A member of the Team first needs to authorize it.

@0xCAB0 0xCAB0 marked this pull request as ready for review February 1, 2026 20:55
@power-pitcher
Copy link

power-pitcher commented Feb 3, 2026

who can invite me to this project?

@0xCAB0
Copy link
Author

0xCAB0 commented Feb 4, 2026

who can invite me to this project?

Hi, do you mean BoundaryLM's or my fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants