Skip to content

agentops_integration#25

Open
sarath59 wants to merge 1 commit intobrylie:mainfrom
sarath59:agentops_integration
Open

agentops_integration#25
sarath59 wants to merge 1 commit intobrylie:mainfrom
sarath59:agentops_integration

Conversation

@sarath59
Copy link
Copy Markdown

integrated agentops for better LLM tracking and monitoring

Comment on lines +9 to +17
# Load environment variables
load_dotenv()

# Initialize AgentOps
AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY")
if not AGENTOPS_API_KEY:
raise ValueError("AGENTOPS_API_KEY not found in environment variables")

agentops.init(AGENTOPS_API_KEY)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This initialization should happen in the app.py only, since it only needs to happen when the app is bootstrapped.

Suggested change
# Load environment variables
load_dotenv()
# Initialize AgentOps
AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY")
if not AGENTOPS_API_KEY:
raise ValueError("AGENTOPS_API_KEY not found in environment variables")
agentops.init(AGENTOPS_API_KEY)

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