Skip to content

Fix cancel IA response for toolings#99

Merged
alejamp merged 2 commits into
cel-ai:mainfrom
Grefth:main
Mar 10, 2026
Merged

Fix cancel IA response for toolings#99
alejamp merged 2 commits into
cel-ai:mainfrom
Grefth:main

Conversation

@Grefth
Copy link
Copy Markdown
Contributor

@Grefth Grefth commented Mar 10, 2026

fix: Add support for EventResponse across the assistant pipeline so functions can return events that optionally disable further AI responses. BaseAssistant now returns EventResponse where appropriate. Macaw NLP imports EventResponse, checks for it during tool calls, sets a cancel_ai flag when disable_ai_response is requested, logs the action, and skips the subsequent LLM invocation. MessageGateway now avoids yielding or dispatching empty streamed content by only handling non-blank content. These changes prevent unwanted LLM replies after event handlers and stop empty partial messages from being sent.

Grefth and others added 2 commits March 10, 2026 14:31
fix: Add support for EventResponse across the assistant pipeline so functions can return events that optionally disable further AI responses. BaseAssistant now returns EventResponse where appropriate. Macaw NLP imports EventResponse, checks for it during tool calls, sets a cancel_ai flag when disable_ai_response is requested, logs the action, and skips the subsequent LLM invocation. MessageGateway now avoids yielding or dispatching empty streamed content by only handling non-blank content. These changes prevent unwanted LLM replies after event handlers and stop empty partial messages from being sent.
@alejamp alejamp merged commit f7915f3 into cel-ai:main Mar 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants