AgentOps-AI / agentops

Python SDK for 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
1.27k stars 102 forks source link

Index out of range error #176

Closed areibman closed 2 months ago

areibman commented 2 months ago

🐛 Bug Report

🔎 Describe the Bug

Seeing this error frequently. Appears to be happening a lot with CrewAI streaming.

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/agentops/llm_tracker.py", line 127, in handle_stream_chunk
    token = choices[0].delta.content
            ~~~~~~~^^^
IndexError: list index out of range

🔄 Reproduction Steps Run a non-standard model with CrewAI

🙁 Expected Behavior