diff --git a/src/khoj/processor/operator/operator_actions.py b/src/khoj/processor/operator/operator_actions.py index 435083cd..05a65d01 100644 --- a/src/khoj/processor/operator/operator_actions.py +++ b/src/khoj/processor/operator/operator_actions.py @@ -119,6 +119,12 @@ class RequestUserAction(BaseAction): request: str +class NoopAction(BaseAction): + """No operation action.""" + + type: Literal["noop"] = "noop" + + OperatorAction = Union[ ClickAction, DoubleClickAction, @@ -139,4 +145,5 @@ OperatorAction = Union[ GotoAction, BackAction, RequestUserAction, + NoopAction, ] diff --git a/src/khoj/processor/operator/operator_agent_openai.py b/src/khoj/processor/operator/operator_agent_openai.py index 8ff0ae4a..47696f8c 100644 --- a/src/khoj/processor/operator/operator_agent_openai.py +++ b/src/khoj/processor/operator/operator_agent_openai.py @@ -160,7 +160,11 @@ class OpenAIOperatorAgent(OperatorAgent): except Exception as e: logger.error(f"Error converting OpenAI action {action_type}: {e}") content = f"Error: {action_type}: {e}" - + elif block.type == "message": + rendered_response["text"] = response.output_text + elif block.type == "reasoning": + actions.append(NoopAction()) + action_results.append(block) if action_to_run or content: actions.append(action_to_run) if action_to_run or content: