Skip to content

Commit f74da03

Browse files
fix(agentkit): expose llm headers and align mllm enablement
1 parent 8addd98 commit f74da03

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/agora_agent/agentkit/agent.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,12 @@ def with_mllm(self, vendor: BaseMLLM) -> "Agent":
197197
if isinstance(new_agent._mllm, dict):
198198
new_agent._mllm.setdefault("enable", True)
199199
if new_agent._advanced_features is None:
200-
new_agent._advanced_features = {"enable_mllm": True}
200+
new_agent._advanced_features = StartAgentsRequestPropertiesAdvancedFeatures(enable_mllm=True)
201201
elif isinstance(new_agent._advanced_features, dict):
202-
new_agent._advanced_features = {**new_agent._advanced_features, "enable_mllm": True}
202+
new_agent._advanced_features = typing.cast(
203+
AdvancedFeatures,
204+
{**new_agent._advanced_features, "enable_mllm": True},
205+
)
203206
else:
204207
new_agent._advanced_features = new_agent._advanced_features.model_copy(update={"enable_mllm": True})
205208
return new_agent

0 commit comments

Comments
 (0)