nat.data_models.config#

Attributes#

Classes#

TelemetryConfig

GeneralConfig

Config

Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes.

Functions#

_process_validation_error(err, handler, info)

Module Contents#

logger#
_process_validation_error(
err: pydantic.ValidationError,
handler: pydantic.ValidatorFunctionWrapHandler,
info: pydantic.ValidationInfo,
)#
class TelemetryConfig(/, **data: Any)#

Bases: pydantic.BaseModel

logging: dict[str, nat.data_models.logging.LoggingBaseConfig] = None#
tracing: dict[str, nat.data_models.telemetry_exporter.TelemetryExporterBaseConfig] = None#
classmethod validate_components(
value: Any,
handler: pydantic.ValidatorFunctionWrapHandler,
info: pydantic.ValidationInfo,
)#
classmethod rebuild_annotations()#
class GeneralConfig(/, **data: Any)#

Bases: pydantic.BaseModel

model_config#

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

use_uvloop: bool | None = None#

This field is deprecated and ignored. It previously controlled whether to use uvloop as the event loop. uvloop usage is now determined automatically based on the platform.

telemetry: TelemetryConfig#
front_end: nat.data_models.front_end.FrontEndBaseConfig#
classmethod validate_components(
value: Any,
handler: pydantic.ValidatorFunctionWrapHandler,
info: pydantic.ValidationInfo,
)#
classmethod rebuild_annotations()#
class Config(/, **data: Any)#

Bases: nat.data_models.common.HashableBaseModel

Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config#

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

general: GeneralConfig#
functions: dict[str, nat.data_models.function.FunctionBaseConfig] = None#
function_groups: dict[str, nat.data_models.function.FunctionGroupBaseConfig] = None#
llms: dict[str, nat.data_models.llm.LLMBaseConfig] = None#
embedders: dict[str, nat.data_models.embedder.EmbedderBaseConfig] = None#
memory: dict[str, nat.data_models.memory.MemoryBaseConfig] = None#
object_stores: dict[str, nat.data_models.object_store.ObjectStoreBaseConfig] = None#
optimizer: nat.data_models.optimizer.OptimizerConfig#
retrievers: dict[str, nat.data_models.retriever.RetrieverBaseConfig] = None#
ttc_strategies: dict[str, nat.data_models.ttc_strategy.TTCStrategyBaseConfig] = None#
workflow: nat.data_models.function.FunctionBaseConfig#
authentication: dict[str, nat.data_models.authentication.AuthProviderBaseConfig] = None#
eval: nat.data_models.evaluate.EvalConfig#
print_summary(stream: TextIO = sys.stdout)#

Print a summary of the configuration

classmethod validate_components(
value: Any,
handler: pydantic.ValidatorFunctionWrapHandler,
info: pydantic.ValidationInfo,
)#
classmethod rebuild_annotations()#
AIQConfig#