Update Grok for function call override

This commit is contained in:
Mark Backman
2025-01-11 16:06:31 -05:00
parent 874b8bb136
commit 0852570212

View File

@@ -65,8 +65,12 @@ class GrokAssistantContextAggregator(OpenAIAssistantContextAggregator):
"tool_call_id": frame.tool_call_id,
}
)
# Only run the LLM if there are no more function calls in progress.
run_llm = not bool(self._function_calls_in_progress)
if frame.override_run_llm:
# Explicit override
run_llm = frame.run_llm
else:
# Default behavior
run_llm = not bool(self._function_calls_in_progress)
else:
self._context.add_message({"role": "assistant", "content": aggregation})