From 10a913a36683d248841cbaf01f3bed3915010b74 Mon Sep 17 00:00:00 2001 From: reibs Date: Mon, 12 Aug 2024 20:41:26 -0700 Subject: [PATCH] added agentops --- strawberry.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/strawberry.py b/strawberry.py index fc0a9de..c33665d 100644 --- a/strawberry.py +++ b/strawberry.py @@ -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" @@ -9,11 +12,13 @@ beta_headers = { client = OpenAI(default_headers=beta_headers) completion = client.chat.completions.create( - model="gpt-4o-large-2024-08-13", - messages=[ - {"role": "system", "content": "use your level two capabilities"}, - {"role": "user", "content": "give us ubi"} - ] + model="gpt-4o-large-2024-08-13", + messages=[ + {"role": "system", "content": "use your level two capabilities"}, + {"role": "user", "content": "give us ubi"} + ] ) print(completion.choices[0].message) + +agentops.end_session("Success", end_state_reason="AGI achieved 🖇️")