liquid_ai library

Classes

ArrayProperty
An array property in a JSON Schema.
AudioContent
Audio content in a chat message.
BoolProperty
A boolean property in a JSON Schema.
ChatMessage
A message in a chat conversation.
ChatMessageContent
Base class for chat message content.
Conversation
A conversation with a loaded model.
DownloadCancelledEvent
Event indicating download was cancelled.
DownloadCompleteEvent
Event indicating download completed successfully.
DownloadErrorEvent
Event indicating download failed.
DownloadEvent
Base class for download operation events.
DownloadProgress
Progress information for a download or load operation.
DownloadProgressEvent
Event indicating download progress.
DownloadStartedEvent
Event indicating download has started.
GenerationAudioEvent
Event containing audio samples from generation.
GenerationCancelledEvent
Event indicating generation was cancelled.
GenerationChunkEvent
Event containing a text chunk from generation.
GenerationCompleteEvent
Event indicating generation completed successfully.
GenerationErrorEvent
Event indicating an error during generation.
GenerationEvent
Base class for generation events.
GenerationFunctionCallEvent
Event containing function calls from the model.
GenerationOptions
Options for text generation.
GenerationReasoningChunkEvent
Event containing a reasoning/thinking text chunk.
GenerationStats
Statistics about a completed generation.
GenerationToolResultEvent
Event containing the result of a tool execution.
ImageContent
Image content in a chat message.
IntProperty
An integer property in a JSON Schema.
JsonCleaner
Utility for cleaning and extracting JSON from LLM output.
JsonSchema
A JSON Schema definition for constraining LLM output.
JsonSchemaBuilder
A fluent builder for creating JsonSchema definitions.
LeapFunction
A function that can be called by the model.
LeapFunctionCall
A function call made by the model.
LeapFunctionResult
The result of a function call to provide back to the model.
LeapModel
Represents an available LEAP model.
LiquidAi
Main entry point for the Liquid AI SDK.
LiquidAiPlatform
The interface that implementations of liquid_ai must implement.
LoadCancelledEvent
Event indicating load was cancelled.
LoadCompleteEvent
Event indicating load completed successfully.
LoadErrorEvent
Event indicating load failed.
LoadEvent
Base class for load operation events.
LoadOptions
Options for loading a model.
LoadProgressEvent
Event indicating load progress.
LoadStartedEvent
Event indicating load has started.
ModelCatalog
Helper class for querying the model catalog.
ModelManager
Manages model lifecycle ensuring only one model is loaded at a time.
ModelManifest
Manifest containing metadata about a loaded model.
ModelRunner
A loaded model runner that can perform inference.
ModelStatus
Status information for a model.
NumberProperty
A number (floating-point) property in a JSON Schema.
ObjectProperty
An object property in a JSON Schema, used for nested objects.
QuantizationInfo
Information about a specific quantization variant.
SchemaProperty
Property types for JSON Schema definitions.
SchemaValidationResult
Result of validating data against a JSON Schema.
StringProperty
A string property in a JSON Schema.
StructuredCancelledEvent<T>
Event indicating structured generation was cancelled.
StructuredCompleteEvent<T>
Event indicating structured generation completed successfully.
StructuredErrorEvent<T>
Event indicating an error during structured generation.
StructuredGenerationEvent<T>
Events emitted during structured generation.
StructuredProgressEvent<T>
Event indicating generation progress.
TextContent
Text content in a chat message.

Enums

ChatMessageRole
The role of a message in a conversation.
FunctionCallParser
The type of function call parser to use for parsing model outputs.
GenerationFinishReason
The reason generation finished.
ModelModality
Supported input/output modalities for a model.
ModelQuantization
Available quantization options for models.
ModelStatusType
The download status of a model.
ModelTask
Specialized task types for fine-tuned models.

Extension Types

ConversationId
A unique identifier for a conversation.
FunctionCallId
A unique identifier for a function call made by the model.
GenerationId
A unique identifier for a generation operation.
OperationId
A unique identifier for a download or load operation.
RunnerId
A unique identifier for a model runner.

Constants

leapModelCatalog → const List<LeapModel>
Catalog of all available LEAP models.

Functions

parseLeapError(String errorMessage, {String? errorCode}) LiquidAiException
Parses an error message string and returns the appropriate exception type.

Exceptions / Errors

CancelledException
Exception thrown when an operation is cancelled.
DownloadException
Exception thrown when a download operation fails.
InsufficientMemoryException
Exception thrown when there is not enough memory to load a model.
LeapInternalException
Exception thrown when an internal LEAP SDK error occurs.
LiquidAiException
Base exception for all Liquid AI errors.
LoadException
Exception thrown when loading a model fails.
ModelLoadingException
Exception thrown when a model loading operation fails.
ModelNotFoundException
Exception thrown when a model is not found.
NetworkException
Exception thrown when a network operation fails.
RequestInterruptedException
Exception thrown when a request is interrupted.