pandera.decisions.ProviderCapabilities¶

class pandera.decisions.ProviderCapabilities(kinds=frozenset({'choice', 'noul', 'score'}), max_options=255, max_levels=10, max_questions=None, reports_confidence=frozenset({'choice', 'score'}), price_per_million_input_tokens=None)[source]¶

What a provider’s model can be asked, as opposed to how fast.

Decision models differ here even when they share a wire format: a small local model may take fewer options per question than a hosted one, and a classifier-only model may not answer scores at all. The defaults are the question vocabulary’s own bounds – two to 255 options, two to ten levels – which every provider speaking the shared wire format inherits, so a provider only declares where it is narrower.

A provider is checked against these before any request is made, so an unsupported question is an error naming the column rather than a failure from the server on row one.

Attributes

kinds

Question kinds the model answers.

max_levels

Most levels a single Score may have.

max_options

Most options a single Choice may offer.

max_questions

Most questions one request may carry, when the provider caps it.

price_per_million_input_tokens

What input costs, for plan().

reports_confidence

Kinds for which the model reports how certain it is.

Methods

__init__(kinds=frozenset({'choice', 'noul', 'score'}), max_options=255, max_levels=10, max_questions=None, reports_confidence=frozenset({'choice', 'score'}), price_per_million_input_tokens=None)[source]¶