Catalog PyPI
Back to packageRELEASE DETAILS

1.1.14

PyPI

aicaller

Package for using API models. It is designed mainly for experimenting with various models. It allows to easily process Hugging Face datasets, or JSONL/CSV datasets, and send requests to Ollama and OpenAI compatibles APIs with just using simple configuration files.

apidatasetsollamaopenai
Published6 Oct 2026
Direct dependencies16
Transitive dependenciesNot calculated

README

Version 1.1.14 documentation

AICaller

Package for using API models. It is designed mainly for experimenting with various models. It allows to easily process Hugging Face datasets, or JSONL/CSV datasets, and send requests to OpenAI compatibles APIs with just using simple configuration files.

Installation

pip install aicaller

Usage

The package is designed a batch oriented way. It means that you must first create a batch file with API requests, and then you can send the requests to the API.

Using this two stage approach allows you to check and save the raw requests that are sent to the API.

If you prefer learning by doing, you can check the examples folder.

Batch file creation

Firstly, you need to create a batch file, fo that you can use the create_batch_file argument that expects a configuration --config (see config creation) and voluntary a --path to file with data to be processed.

aicaller create_batch_file --config config.yaml --path data.jsonl > batch.jsonl

Batch Split

It might be necessary to split the batch into smaller batches. It expects following arguments:

  • file - path to batch file
  • output - path to folder where the split files will be saved
  • max_tokens - maximum number of tokens in one batch
aicaller split_batch batch.jsonl splits 1000000

Sending requests

After your batch file is created, you can send the requests to the API (see API config creation). You can use the batch_request command. Here is an example of how to use it:

aicaller batch_request batch.jsonl -c api_config.yaml -r results.jsonl

To see all available options, you can use the --help argument:

aicaller batch_request --help

Configuration

There are two types of configuration files that you can use: one for creating batch files and one for sending requests to the API.

If you want to create a new configuration file, please use the create_config command, which will lead you through the process of creating a new configuration file:

aicaller create_config --path config.yaml

Batch file configuration

The batch file configuration is a YAML file that defines how to create the batch file from a dataset. Here we will describe multiple options that you can use in an order that they appear during the configuration creation process. Detailed description of each attribute is always available directly in the configuration file.

Convertor

There are following convertors available:

  • ToOpenAIBatchFile
    • Allows to create a batch file for OpenAI compatible APIs
  • ToOllamaBatchFile
    • Even though Ollama API is compatible for basic usage with OpenAI API, it is not compatible with all features. Thus, we suggest to use this convertor for Ollama API.

Loaders

This package allows to load Hugging Face datasets, or JSONL/CSV datasets, using following loaders:

  • JSONLLoader
    • Loads JSONL files using Hugging Face dataset loader
  • CSVLoader
    • Loads CSV files using Hugging Face dataset loader
  • HFLoader
    • Loads text oriented Hugging Face datasets
  • HFImageLoader
    • Loads image oriented Hugging Face datasets

Sample Assemblers

A sample assembler is a component responsible for creating a sample from loaded data. There are two assemblers one for text and one for images:

  • TextDatasetAssembler
  • ImageDatasetAssembler

Templates

Template specifies the format and content of a sample. It can be simple as string with Jinja2 template, or it can be whole chat history.

Now this package supports following types of templates:

  • StringTemplate
    • Simple string template, that allows to use Jinja2 template
  • MessagesTemplate
    • Allows to define whole chat history with roles and text/image content.
    • As the specification of messages varies for different APIs. There are different types of message builders.

API configuration

File for configuring API connection. It is used for defining API key, URL, and other parameters.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 16

Native requirements
16 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
classconfig
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
classconfig~=1.0.5runtime
Jinja2
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
Jinja2~=3.1.4runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
openai~=1.57.0runtime
inquirer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
inquirer~=3.4.0runtime
tiktoken
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
tiktoken~=0.12.0runtime
tqdm
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
tqdm~=4.66.5runtime
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
numpy~=1.26.4runtime
datasets
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
datasets~=3.6.0runtime
json-repair
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
json-repairruntime
ollama
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
ollama~=0.6.1runtime
segmentedstring
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
segmentedstring~=1.0.1runtime
pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pillow~=10.4.0runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
requests~=2.32.3runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic~=2.11.7runtime
google-genai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
google-genai~=2.14.0runtime
transformers
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
transformers~=5.7.0runtime

Distribution files

2 collected
aicaller-1.1.14-py3-none-any.whl

bdist_wheel · 31.85 KB · Python py3

Source file
aicaller-1.1.14.tar.gz

sdist · 35.48 KB · Python source

Source file

Repository

PENDING
mdocekal/ai_caller

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:9f13e6f1dd87f5709cc3e9e84177e2a8c019ca6e4e1a45536252dbfb27e5a530

Other collected versions

View all collected versions →