tacet
Official Python client for the Tacet API.
Install
pip install tacet
# or
uv add tacet
Quickstart
from tacet import Tacet, choice, score, noul
client = Tacet(api_key="tacet_sk_...") # or set TACET_API_KEY
result = client.decide(
state="Customer says their export has been stuck at 'processing' for two days.",
questions={
"routing_team": choice(
"Which team should own this ticket?",
{"billing": "Payment or invoicing issues", "support": "Product or account issues"},
),
"urgency": score(
"How urgent is this ticket?",
["low", "medium", "high", "critical"],
),
"needs_human": noul("Does this ticket need a human to step in?"),
},
)
print(result.answers["routing_team"].choice)
print(result.answers["urgency"].score)
print(result.answers["needs_human"].noul)
print(result.usage.input_tokens)
An AsyncTacet client with the same methods, awaited, is available for
async code.
Question types
- choice: pick one option out of a named set.
criteriamaps option names to descriptions. The answer carrieschoice,probabilities(one per option), andconfidence. - score: an expected level over an ordered list of levels.
criteriais that list. The answer carriesscore,probabilities(one per level index), andconfidence. - noul: yes or no.
noulis the probability of yes, from 0 to 1, and an optionalcriteriaobject says what "true" and "false" mean. The answer carriesnoulandconfidence, no probabilities.
The choice, score, and noul helpers build the question dict for you;
you can also pass the dict shape directly.
Errors and retries
Every non-2xx response raises a subclass of TacetError, which carries
status, code, error_type, param, request_id, and message:
AuthenticationError: 401 (missing, invalid, or revoked API key)InsufficientCreditError: 402 (out of credit)RateLimitError: 429, also carriesretry_aftersecondsInvalidRequestError: 400/404/413 (bad request, unknown model, state too large, etc.)APIError: 5xxAPIConnectionError: the request failed before a response came back
The client retries 429s (honoring the Retry-After header) and 500/502/503/504
responses and connection failures, with exponential backoff and jitter, up to
max_retries times (default 2). Other 4xx errors fail immediately and are
never retried.
Idle starts
If the API hasn't been called in a while, the first request after that idle period can take tens of seconds while it starts back up. The default timeout (90 seconds) accounts for this; don't lower it unless you know your traffic is steady.
Pricing
$0.042 per 1M input tokens, and output is free. Details are in the API docs.
Release files for tacet 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tacet-0.1.1.tar.gz | 22.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tacet-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.7 kB
Release files / tacet-0.1.1.tar.gz
| Download URL | tacet-0.1.1.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a565d5e4fe5637c5387ea84c95e1906d2e0079c6749221e896cc4bd80ef0b423
|
|
BLAKE2b-256 checksum How to use checksums |
82ff612c3616567b9c39b2da493121eafda30c0d5415f86633d520591d6a2aab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / tacet-0.1.1-py3-none-any.whl
| Download URL | tacet-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05e61a57eff80079a1f293905ff99b9c8dd5a6a718be240e0e526c856039b0ee
|
|
BLAKE2b-256 checksum How to use checksums |
1755bff77a355ac6944e92d1885ed81a155d73e870d4c7abc12673ebc039c86b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|