Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/art/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ def __init__(
report_metrics=report_metrics,
**kwargs,
)
if _internal_config is not None:
# Bypass BaseModel __setattr__ to allow setting private attr
object.__setattr__(self, "_internal_config", _internal_config)
object.__setattr__(self, "_costs_lock", asyncio.Lock())
object.__setattr__(self, "_cost_calculator", self._noop_cost_calculator)

Expand All @@ -725,9 +728,6 @@ def _noop_cost_calculator(
_prompt_tokens: int | None, _completion_tokens: int | None
) -> dict[str, float]:
return {}
if _internal_config is not None:
# Bypass BaseModel __setattr__ to allow setting private attr
object.__setattr__(self, "_internal_config", _internal_config)

@overload
def __new__(
Expand Down