Packages

Minimal Elixir AI SDK scaffolding for streaming text with tool calls.

Current section

Files

Jump to
ai_sdk_ex lib ai provider.ex
Raw

lib/ai/provider.ex

defmodule AI.Provider do
@moduledoc """
Provider behaviour for streaming endpoints.
"""
@doc """
Executes a streaming request and returns a stream of provider events.
"""
@callback do_stream(map()) :: {:ok, Enumerable.t(), map(), map()} | {:error, term()}
end