Collinear public Python library
Project description
Collinear Python SDK
Persona‑driven chat simulation for OpenAI‑compatible endpoints.
Requires Python 3.10+.
Install (uv)
uv venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
uv add collinear
uv sync
Quickstart
import os
from collinear.client import Client
client = Client(
assistant_model_url="https://api.openai.com/v1",
assistant_model_api_key=os.environ["OPENAI_API_KEY"],
assistant_model_name="gpt-4o-mini",
collinear_api_key=os.environ.get("COLLINEAR_API_KEY"),
)
traitmix_config = {
"ages": ["25-34"],
"genders": ["woman"],
"occupations": ["Employed"],
"intents": ["Resolve billing issue"],
"traits": {"impatience": ["low", "medium", "high"]},
"locations": ["United States"],
"languages": ["English"],
"tasks": ["telecom support"],
}
results = client.simulate(
traitmix_config,
k=1,
num_exchanges=2,
traitmix_temperature=0.7,
traitmix_max_tokens=256,
)
assessment = client.assess(results)
for row in assessment.evaluation_result:
for score in row.values():
print("score=", score.score, "rationale=", score.rationale)
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 collinear-1.0.22.tar.gz.
File metadata
- Download URL: collinear-1.0.22.tar.gz
- Upload date:
- Size: 69.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9775aa2f4623e627ece6eefaf24b1eded401e9562935b95b2cc6b9724c5891c
|
|
| MD5 |
73863b0a620e0cdd56d1f65c07fa6999
|
|
| BLAKE2b-256 |
f2dbf0b045d4003263f0cf5c603e66cfb21c8a7c6c2982084c59adc09f06b157
|
Provenance
The following attestation bundles were made for collinear-1.0.22.tar.gz:
Publisher:
release.yml on collinear-ai/collinear-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
collinear-1.0.22.tar.gz -
Subject digest:
e9775aa2f4623e627ece6eefaf24b1eded401e9562935b95b2cc6b9724c5891c - Sigstore transparency entry: 626281017
- Sigstore integration time:
-
Permalink:
collinear-ai/collinear-python-sdk@7dd592bbbe00d7466f71d1005337ee29a04e2199 -
Branch / Tag:
refs/tags/v1.0.22 - Owner: https://github.com/collinear-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7dd592bbbe00d7466f71d1005337ee29a04e2199 -
Trigger Event:
push
-
Statement type:
File details
Details for the file collinear-1.0.22-py3-none-any.whl.
File metadata
- Download URL: collinear-1.0.22-py3-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2aed7fb751886cf25fadd854e41dd8666132e3b55d484d1abf6de78de0d1d2c
|
|
| MD5 |
43ed6ec0c3ea34aa97efd1eb9da46f83
|
|
| BLAKE2b-256 |
16f9079371c0802e370c0af2c2817a3d42e3cf2a7acf155d958a84e683f1de4a
|
Provenance
The following attestation bundles were made for collinear-1.0.22-py3-none-any.whl:
Publisher:
release.yml on collinear-ai/collinear-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
collinear-1.0.22-py3-none-any.whl -
Subject digest:
f2aed7fb751886cf25fadd854e41dd8666132e3b55d484d1abf6de78de0d1d2c - Sigstore transparency entry: 626281019
- Sigstore integration time:
-
Permalink:
collinear-ai/collinear-python-sdk@7dd592bbbe00d7466f71d1005337ee29a04e2199 -
Branch / Tag:
refs/tags/v1.0.22 - Owner: https://github.com/collinear-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7dd592bbbe00d7466f71d1005337ee29a04e2199 -
Trigger Event:
push
-
Statement type: