Skip to content

Commit 88f5e79

Browse files
committed
use default value for agents func when none is passed
1 parent 68fdead commit 88f5e79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ldai/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,13 @@ def agents(
344344
result: LDAIAgents = {}
345345

346346
for config in agent_configs:
347+
# Ensure default_value is set (should be handled by __post_init__, but satisfy type checker)
348+
default_value = config.default_value or LDAIAgentDefaults(enabled=False)
349+
347350
agent = self.__evaluate_agent(
348351
config.key,
349352
context,
350-
config.default_value,
353+
default_value,
351354
config.variables
352355
)
353356
result[config.key] = agent

0 commit comments

Comments
 (0)