LLMConfig

LLMConfig(**kwargs: Any)
Parameters:
NameDescription
**kwargsType: Any

Static Methods

from_json

from_json(
    *,
    env: str | None = None,
    path: str | Path | None = None,
    file_location: str | None = None,
    **kwargs: Any
) -> LLMConfig
Parameters:
NameDescription
envType: str | None

Default: None
pathType: str | pathlib.Path | None

Default: None
file_locationType: str | None

Default: None
**kwargsType: Any

get_current_llm_config

get_current_llm_config(llm_config: Optional[LLMConfig] = None) -> LLMConfig | None
Parameters:
NameDescription
llm_configType: Optional[LLMConfig]

Default: None

Instance Methods

copy

copy(self) -> LLMConfig

deepcopy

deepcopy(self, memo: dict[int, Any] | None = None) -> LLMConfig
Parameters:
NameDescription
memoType: dict[int, typing.Any] | None

Default: None

get

get(
    self,
    key: str,
    default: Any | None = None
) -> Any
Parameters:
NameDescription
keyType: str
defaultType: Any | None

Default: None

items

items(self) -> Iterable[tuple[str, Any]]

keys

keys(self) -> Iterable[str]

model_dump

model_dump(
    self,
    *args: Any,
    exclude_none: bool = True,
    **kwargs: Any
) -> dict[str, Any]
Parameters:
NameDescription
*argsType: Any
exclude_noneType: bool

Default: True
**kwargsType: Any

model_dump_json

model_dump_json(
    self,
    *args: Any,
    exclude_none: bool = True,
    **kwargs: Any
) -> str
Parameters:
NameDescription
*argsType: Any
exclude_noneType: bool

Default: True
**kwargsType: Any

model_validate

model_validate(
    self,
    *args: Any,
    **kwargs: Any
) -> Any
Parameters:
NameDescription
*argsType: Any
**kwargsType: Any

model_validate_json

model_validate_json(
    json_data: str | bytes | bytearray,
    *,
    strict: bool | None = None,
    context: Any | None = None,
    by_alias: bool | None = None,
    by_name: bool | None = None
) -> Self

!!! abstract “Usage Documentation” JSON Parsing

Validate the given JSON data against the Pydantic model.

Parameters:
NameDescription
json_dataThe JSON data to validate.

Type: str | bytes | bytearray
strictWhether to enforce types strictly.

Type: bool | None

Default: None
contextExtra variables to pass to the validator.

Type: Any | None

Default: None
by_aliasWhether to use the field’s alias when validating against the provided input data.

Type: bool | None

Default: None
by_nameWhether to use the field’s name when validating against the provided input data.

Type: bool | None

Default: None
Returns:
TypeDescription
SelfThe validated Pydantic model.

model_validate_strings

model_validate_strings(
    obj: Any,
    *,
    strict: bool | None = None,
    context: Any | None = None,
    by_alias: bool | None = None,
    by_name: bool | None = None
) -> Self

Validate the given object with string data against the Pydantic model.

Parameters:
NameDescription
objThe object containing string data to validate.

Type: Any
strictWhether to enforce types strictly.

Type: bool | None

Default: None
contextExtra variables to pass to the validator.

Type: Any | None

Default: None
by_aliasWhether to use the field’s alias when validating against the provided input data.

Type: bool | None

Default: None
by_nameWhether to use the field’s name when validating against the provided input data.

Type: bool | None

Default: None
Returns:
TypeDescription
SelfThe validated Pydantic model.

values

values(self) -> Iterable[Any]

where

where(
    self,
    *,
    exclude: bool = False,
    **kwargs: Any
) -> LLMConfig
Parameters:
NameDescription
excludeType: bool

Default: False
**kwargsType: Any