AgentOps-AI / agentops

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks like CrewAI, Langchain, and Autogen
https://agentops.ai
MIT License
2.2k stars 214 forks source link

[Bug]: inconsistent SIGINT behavior #477

Open teocns opened 3 weeks ago

teocns commented 3 weeks ago

Contact Details

teocns@gmail.com

📦 Package Version

latest

🎞️ Framework Version

N/A

🔎 Describe the Bug

import os
import time

import agentops
import dotenv

dotenv.load_dotenv()

agentops.init(api_key=os.environ["AGENTOPS_API_KEY"])

while True:
    time.sleep(0.2)
  1. Run the script

  2. Spam <C-c>

  3. Won't [always] terminate

🖇 AgentOps: Session Replay: https://app.agentops.ai/drilldown?session_id=6f8b6bee-33c5-4288-9377-c1f2bb0d264f
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
^C🖇 AgentOps: SIGINT detected. Ending session...
... (Goes on forever)

🤝 Contribution

oogxdd commented 1 week ago

+on this