Skip to main content

freesolo

freesolo is the published Python SDK for Freesolo's recording OpenAI drop-in client and the environment and dataset contracts used by generated repositories.

The public SDK surface includes:

  • freesolo.OpenAI and freesolo.AsyncOpenAI
  • freesolo.environments
  • freesolo.datasets

Install

pip install freesolo

From source:

cd freesolo-sdk
export PYTHONPATH="$PWD/pypi"

OpenAI Drop-in Client

Use OpenAI or AsyncOpenAI anywhere you would use the official Python client. A Freesolo API key is required through FREESOLO_API_KEY or the client options. Requests go through the Freesolo recording proxy and chat completions are recorded by default.

from freesolo import AsyncOpenAI, OpenAI

client = OpenAI()
async_client = AsyncOpenAI()

completion = client.chat.completions.create(
    model="openai/gpt-5.2",
    messages=[{"role": "user", "content": "hello"}],
    extra_body={"metadata": {"dataset": "support"}},
)

Set model to a deployed Freesolo model id to call that fine-tuned model with the same API. Recording controls use the official extra_body escape hatch, so the native OpenAI method signatures and return types remain unchanged.

completion = client.chat.completions.create(
    model="adapter-123",
    messages=[{"role": "user", "content": "hello"}],
    extra_body={"store": False},
)

Dataset Contract

Dataset records use input and optional output.

{ "id": "example-1", "input": "Say yes.", "output": "yes" }

The SDK does not accept aliases such as prompt, query, task, ground_truth, expected_output, or completion.

Environment Contract

Environments are Python modules that expose load_environment() and return an EnvironmentSingleTurn or EnvironmentMultiTurn instance. Environment code uses TaskExample.input and TaskExample.output when building prompts and scoring responses.

Single-turn environments build their initial episode through start_episode(). The SDK prepends the supplied contract text as a system message when the environment did not already provide one, so SFT rows and environment scoring see the same policy prompt. Multi-turn environments own their start_episode() implementation and should include any task-specific initial system message there.

The SDK does not handle remote artifact publishing or resolution.

Example

from freesolo.datasets import load_dataset
from freesolo.environments import load_environment

dataset = load_dataset("support.jsonl")
environment = load_environment("freesolo/environment.py:load_environment")

print(len(dataset.examples))
print(type(environment).__name__)

API Guidance

Use freesolo.datasets for task examples and freesolo.environments for environment loading/scoring interfaces.

  • No command-line help surface is published as part of the SDK contract.
  • Hidden modules remain available in source history for internal tooling only.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freesolo-0.4.0.tar.gz (327.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freesolo-0.4.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file freesolo-0.4.0.tar.gz.

File metadata

  • Download URL: freesolo-0.4.0.tar.gz
  • Upload date:
  • Size: 327.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for freesolo-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f7ad2c6d15769419698e027fcb64bc82300630dde5a33a59a883aa6b7d40ec36
MD5 e9776822b241272ea4854244cf463dcb
BLAKE2b-256 b9e9336cf2366a26ffc032f8483b2519ea77ffbc39334bb6cd4f5ee717e807a0

See more details on using hashes here.

File details

Details for the file freesolo-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: freesolo-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for freesolo-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83b5cffe35a123d6e99acb3bc238c4491644ff151b1c4674d980c7fbe1a50ce0
MD5 5053d29b8f9c69b37c24b34510977fb7
BLAKE2b-256 616f369511625dfe06bd9fba91581acffe75f3f8842badbdbe8e754fd7c26b78

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.2

2 files

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.60

2 files

0.2.56

2 files

0.2.54

2 files

0.2.53

2 files

0.2.52

2 files

0.2.51

2 files

0.2.50

2 files

0.2.49

2 files

0.2.48

2 files

0.2.47

2 files

0.2.46

2 files

0.2.45

2 files

0.2.44

2 files

0.2.43

2 files

0.2.42

2 files

0.2.41

2 files

0.2.40

2 files

0.2.39

2 files

0.2.38

2 files

0.2.37

2 files

0.2.36

2 files

0.2.35

2 files

0.2.34

2 files

0.2.33

2 files

0.2.32

1 file

0.2.31

2 files

0.2.30

2 files

0.2.29

2 files

0.2.28

2 files

0.2.27

2 files

0.2.26

2 files

0.2.25

2 files

0.2.24

2 files

0.2.23

2 files

0.2.22

2 files

0.2.21

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page