Skip to content

prefactor_core.config module

Configuration for prefactor-core.

This module contains configuration classes for the prefactor-core SDK.

Bases: BaseModel

Complete configuration for PrefactorCoreClient.

Configuration for the HTTP client.

Configuration for queue processing.

Optional schema registry for aggregating span type definitions.

  • Type: Any

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

)

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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.

Number of concurrent worker tasks.

  • Type: int

Maximum retry attempts per failed operation.

  • Type: int

Base delay for exponential backoff (seconds).

  • Type: float

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].