Python SDK for the DataCreator AI dataset generation API
Project description
DataCreator AI – Software Development Kit (SDK)
A lightweight, proprietary Python client for accessing the DataCreator AI synthetic data generation API. This SDK is designed for desktop and server environments, enabling programmatic dataset generation with simple Python calls.
Installation
Usage Overview
The DataCreatorClient provides a single primary method, generate(), that generates conversations suitable for fine-tuning AI models. The SDK handles communication, progress messages, response validation, and writing the final dataset to a .jsonl file.
generate() Method
The generate() function triggers the synthetic data generation workflow and saves the final dataset locally.
Purpose
Initiates a dataset generation request and produces a .jsonl file containing structured conversational examples aligned with your specified theme.
Authentication
Please contact us at team@datacreatorai.com for a API Key. Once you've received your unique key, send it during instantiation as shown in the example code.
Parameters
The method accepts the following arguments:
-
main_theme(str, required)
The central topic around which the synthetic dataset should be generated.
Example:"Daily tasks and personal planning for young working professionals"Any harmless and non-NSFW topic is allowed. -
num_of_turns(int, optional, default: 3)
Number of conversational turns per datapoint. The maximum number of turns allowed is 5. A "turn" is typically oneuser → assistantexchange. The generation supports multiple message roles including user, assistant, system, and tool. Example:2turns produces:- user
- assistant
- user
- assistant
-
num_of_datapoints(int, optional, default: 100)
Number of independent dialogues/conversations to generate. The maximum number of data points allowed per generation is 1000. Example:10produces 10 conversations. -
language(str, optional, default: "English")
The language in which the dataset should be generated. -
system_prompt(str, optional)
A custom instruction or persona that the assistant should follow throughout the conversations. -
max_tokens(int, optional, default: 2048)
The maximum token limit for each conversation. -
use_rolling_temperatures(bool, optional, default: False)
When set toTrue, the generator uses varying temperatures across data points to ensure higher lexical diversity. -
use_model_rotation(bool, optional, default: False)
When set toTrue, the system rotates between different high-quality models to provide better structural diversity. -
output_file(str, optional, default: "dataset.jsonl")
The path and filename where the final dataset will be written.
Example:"data.jsonl"
The final dataset is a JSON Lines (.jsonl) file, where each line represents a conversation formatted as a list of messages. This format is fully compatible for fine-tuning with providers like OpenAI, Mistral, and Anthropic.
The SDK supports the following message roles:
system: Sets the context or behavior of the assistant.user: The human/user prompt.assistant: The model's response.tool: Represents tool outputs or function calls (experimental).
Example Code
import os
from dotenv import load_dotenv
from datacreatoraisdk import DataCreatorClient
load_dotenv()
# Example usage
if __name__ == "__main__":
client = DataCreatorClient(api_key=os.getenv("DATACREATOR_API_KEY"))
client.generate(
main_theme="Natural dialogues between a user and assistant asking about daily tasks, errands, and emotions.",
num_of_turns=2,
num_of_datapoints=100,
use_rolling_temperatures=True,
use_model_rotation=False
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datacreator_sdk-0.1.5.tar.gz.
File metadata
- Download URL: datacreator_sdk-0.1.5.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e28fe6854b56ce49ec8f18433ce2b7d9b8d8aaf70c6f5b94fe20d594d83a46
|
|
| MD5 |
37b566ae57d844fbd47f4fa52c048bac
|
|
| BLAKE2b-256 |
7966f38a6ea143b33bb4e96c6106e0fe8d5dbcf7adad05f0f51e547ec47b74a6
|
File details
Details for the file datacreator_sdk-0.1.5-py3-none-any.whl.
File metadata
- Download URL: datacreator_sdk-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc3878cd18df6e43ebabc11465b2ffe7fcc5fdcfc5d2ebae11d9ef7994c4be4
|
|
| MD5 |
0ea39ae69d2eab42b5405f8e332daa07
|
|
| BLAKE2b-256 |
c5896a1b881a1c26b20ef10900104c657c4be68e3380dc9932f854aa684fbf9f
|