prefactor_core.config module
prefactor_core.config module
Section titled “prefactor_core.config module”Configuration for prefactor-core.
This module contains configuration classes for the prefactor-core SDK.
class prefactor_core.config.PrefactorCoreConfig(*, http_config: HttpClientConfig, queue_config: QueueConfig = , schema_registry: Any = None)
Section titled “class prefactor_core.config.PrefactorCoreConfig(*, http_config: HttpClientConfig, queue_config: QueueConfig = , schema_registry: Any = None)”Bases: BaseModel
Complete configuration for PrefactorCoreClient.
http_config
Section titled “http_config”Configuration for the HTTP client.
- Type: HttpClientConfig
queue_config
Section titled “queue_config”Configuration for queue processing.
- Type: QueueConfig
schema_registry
Section titled “schema_registry”Optional schema registry for aggregating span type definitions.
- Type: Any
Example
Section titled “Example”from prefactor_core.schema_registry import SchemaRegistry from prefactor_core import PrefactorCoreConfig
registry = SchemaRegistry() registry.register(“langchain:llm”, {“type”: “object”})
config = PrefactorCoreConfig( : http_config=HttpClientConfig(…), schema_registry=registry
)
model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
queue_config : QueueConfig
Section titled “queue_config : QueueConfig”schema_registry : Any
Section titled “schema_registry : Any”class prefactor_core.config.QueueConfig(, num_workers: Annotated[int, Ge(ge=1), Le(le=20)] = 3, max_retries: Annotated[int, Ge(ge=0)] = 3, retry_delay_base: Annotated[float, Gt(gt=0)] = 1.0)
Section titled “class prefactor_core.config.QueueConfig(, num_workers: Annotated[int, Ge(ge=1), Le(le=20)] = 3, max_retries: Annotated[int, Ge(ge=0)] = 3, retry_delay_base: Annotated[float, Gt(gt=0)] = 1.0)”Bases: BaseModel
Configuration for queue processing.
num_workers
Section titled “num_workers”Number of concurrent worker tasks.
- Type: int
max_retries
Section titled “max_retries”Maximum retry attempts per failed operation.
- Type: int
retry_delay_base
Section titled “retry_delay_base”Base delay for exponential backoff (seconds).
- Type: float
max_retries : int
Section titled “max_retries : int”model_config = {}
Section titled “model_config = {}”Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].