added agentops

This commit is contained in:
reibs 2024-08-12 20:41:26 -07:00
parent 62173297b7
commit 10a913a366

View file

@ -1,6 +1,9 @@
import os
from openai import OpenAI
import agentops
agentops.init(api_key=os.environ['AGENTOPS_API_KEY'])
beta_headers = {
"authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}",
"openai-beta": "early-access-strawberry"
@ -17,3 +20,5 @@ completion = client.chat.completions.create(
)
print(completion.choices[0].message)
agentops.end_session("Success", end_state_reason="AGI achieved 🖇️")