Update Anthropic and Gemini to allow overriding run_llm
This commit is contained in:
@@ -775,7 +775,14 @@ class AnthropicAssistantContextAggregator(LLMAssistantContextAggregator):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
run_llm = True
|
if frame.override_run_llm:
|
||||||
|
# Explicit override
|
||||||
|
print("Explicit override")
|
||||||
|
run_llm = frame.run_llm
|
||||||
|
else:
|
||||||
|
# Default behavior
|
||||||
|
print("Default behavior")
|
||||||
|
run_llm = True
|
||||||
elif aggregation:
|
elif aggregation:
|
||||||
self._context.add_message({"role": "assistant", "content": aggregation})
|
self._context.add_message({"role": "assistant", "content": aggregation})
|
||||||
|
|
||||||
|
|||||||
@@ -282,7 +282,12 @@ class GoogleAssistantContextAggregator(OpenAIAssistantContextAggregator):
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
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:
|
else:
|
||||||
if aggregation.strip():
|
if aggregation.strip():
|
||||||
self._context.add_message(
|
self._context.add_message(
|
||||||
|
|||||||
Reference in New Issue
Block a user