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 101 forks source link

Update usage of OpenAI client #166

Closed AbhinavMir closed 2 months ago

AbhinavMir commented 2 months ago

📥 Pull Request

📘 Description The Jupyter notebook example currently uses an outdated OpenAI Python library example.

🎯 Goal Update the usage to reference OpenAI's client correctly.

areibman commented 2 months ago

Technically the same but I think adding the api key in the line adds clarity. So LGTM

AbhinavMir commented 2 months ago

@areibman Hm, weird. Current usage was erroring out with OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable for me. I was running off the same example mentioned in the docs. Thanks nonetheless! Thought I'd send out what worked for me!

areibman commented 2 months ago

Thank you @AbhinavMir!!