Strict Feature Test
ProxAI tries to unify the API calls of different providers and models. However, some providers/models have different feature sets and lack some features.
px.generate_text(
prompt='What is the capital of France?',
provider_model=('openai', 'o3-mini'),
max_tokens=2000)The capital of France is Paris.For the above example, ProxAI will try best effort even the o3-mini model
doesn’t support max_tokens parameter.
- By default,
strict_feature_testisFalse.
If you want to raise error when a feature is not supported by the provider or
the model, you can use the strict_feature_test parameter.
px.connect(strict_feature_test=True)
px.generate_text(
prompt='What is the capital of France?',
provider_model=('openai', 'o3-mini'),
max_tokens=2000)...
--> 241 raise Exception(message)
242 else:
243 logging_utils.log_message(
Exception: o3-mini does not support max tokens.Last updated on