Skip to content

why do you use 3 times self._output_guardrails_task.cancel()? #67

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

Closed
moseshu opened this issue Mar 12, 2025 · 1 comment
Closed

why do you use 3 times self._output_guardrails_task.cancel()? #67

moseshu opened this issue Mar 12, 2025 · 1 comment
Labels
question Question about using the SDK

Comments

@moseshu
Copy link

moseshu commented Mar 12, 2025

Question

in the result.py,why do you use 3 times self._output_guardrails_task.cancel()?

def _cleanup_tasks(self):
        if self._run_impl_task and not self._run_impl_task.done():
            self._run_impl_task.cancel()

        if self._input_guardrails_task and not self._input_guardrails_task.done():
            self._input_guardrails_task.cancel()

        if self._output_guardrails_task and not self._output_guardrails_task.done():
            self._output_guardrails_task.cancel()
            self._output_guardrails_task.cancel()
            self._output_guardrails_task.cancel()
@moseshu moseshu added the question Question about using the SDK label Mar 12, 2025
@rm-openai
Copy link
Collaborator

Mistake. Fixed in #103. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about using the SDK
Projects
None yet
Development

No branches or pull requests

2 participants