API Reference AI SDK v0.0.1-rc.0

View Source

Modules

AI

AI is an Elixir SDK for building AI-powered applications.

Core implementation for generating text using language models.

A mock language model implementation for testing.

Core implementation for streaming text from language models.

Standard error structure for AI module operations.

Behaviour for language model providers.

Error raised when a functionality is not supported by the model.

Utility functions for handling Server-Sent Events (SSE).

Utility functions for handling HTTP headers.

Utility functions for making JSON API requests.

A registry for AI providers and their language models.

Implementation of the OpenAI chat language model.

Converts messages to OpenAI chat format, handling various message types, roles, and content formats.

Implementation of the OpenAI completion language model.

OpenAI-compatible chat language model implementation.

Utilities for converting between AI.Core message formats and OpenAI API formats.

Provider implementation for OpenAI-compatible APIs.

Defines standard event types for streaming interactions with AI models.

Represents an error that occurred during streaming.

Represents the completion of a stream with a reason.

Represents metadata information from the model.

Represents a chunk of text from the model.

Represents a tool call from the model.

Stream transformer for OpenAI-compatible API streams.

Stream transformer for OpenAI-compatible streams.

Behaviour for stream transformers that convert provider-specific streams to standardized events.