API Reference#

Welcome to AdalFlow. The API reference is organized by subdirectories.

Core#

All base/abstract classes, core components like generator, embedder, and basic functions are here.

core.component

Base building block for building LLM task pipelines.

core.container

Container component for composing multiple components, such as Sequential and ComponentList.

core.base_data_class

A base class that provides an easy way for data to interact with LLMs.

core.default_prompt_template

This is the default system prompt template used in the AdalFlow.

core.db

LocalDB to perform in-memory storage and data persistence(pickle or any filesystem) for data models like documents and dialogturn.

Components#

Functional components like model client, retriever, agent, local data processing, and output parsers are here.

components.model_client.anthropic_client

Anthropic ModelClient integration.

components.model_client.cohere_client

Cohere ModelClient integration.

components.model_client.google_client

Google GenAI ModelClient integration.

components.model_client.groq_client

Groq ModelClient integration.

components.model_client.openai_client

OpenAI ModelClient integration.

components.model_client.transformers_client

Huggingface transformers ModelClient integration.

components.model_client.utils

Helpers for model client for integrating models and parsing the output.

components.data_process.data_components

Helper components for data transformation such as embeddings and document splitting.

components.data_process.text_splitter

Splitting texts is commonly used as a preprocessing step before embedding and retrieving texts.

Datasets#

Evaluation#

Optimization#

Tracing#

Utils#

utils.data

Default Dataset, DataLoader similar to utils.data in PyTorch.

utils.logger

This logger file provides easy configurability of the root and named loggers, along with a color print function for console output.

utils.setup_env([dotenv_path])

Load environment variables from .env file.

utils.lazy_import

Lazy import a module and class.

utils.serialization

utils.config

Config helper functions to manage configuration and rebuilt your task pipeline.

utils.registry