Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple fix to update container status after llm complete #8311

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -189,11 +189,13 @@ def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
# If we're receiving streaming tokens from `on_llm_new_token`, this response
# data is redundant
self._reset_llm_token_stream()
# set the container status to complete
self.complete(self._labeler.get_final_agent_thought_label())

def on_llm_error(self, error: BaseException, *args: Any, **kwargs: Any) -> None:
self._container.markdown("**LLM encountered an error...**")
self._container.exception(error)
self._state = LLMThoughtState.ERROR
self.complete("LLM encountered an error...")

def on_tool_start(
self, serialized: dict[str, Any], input_str: str, **kwargs: Any
Expand Down