mirror of
https://github.com/iruletheworldmo/strawberry.git
synced 2024-08-13 23:12:55 -05:00
added agentops
This commit is contained in:
parent
62173297b7
commit
10a913a366
1 changed files with 10 additions and 5 deletions
|
@ -1,6 +1,9 @@
|
||||||
import os
|
import os
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
|
|
||||||
|
import agentops
|
||||||
|
agentops.init(api_key=os.environ['AGENTOPS_API_KEY'])
|
||||||
|
|
||||||
beta_headers = {
|
beta_headers = {
|
||||||
"authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}",
|
"authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}",
|
||||||
"openai-beta": "early-access-strawberry"
|
"openai-beta": "early-access-strawberry"
|
||||||
|
@ -9,11 +12,13 @@ beta_headers = {
|
||||||
client = OpenAI(default_headers=beta_headers)
|
client = OpenAI(default_headers=beta_headers)
|
||||||
|
|
||||||
completion = client.chat.completions.create(
|
completion = client.chat.completions.create(
|
||||||
model="gpt-4o-large-2024-08-13",
|
model="gpt-4o-large-2024-08-13",
|
||||||
messages=[
|
messages=[
|
||||||
{"role": "system", "content": "use your level two capabilities"},
|
{"role": "system", "content": "use your level two capabilities"},
|
||||||
{"role": "user", "content": "give us ubi"}
|
{"role": "user", "content": "give us ubi"}
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
print(completion.choices[0].message)
|
print(completion.choices[0].message)
|
||||||
|
|
||||||
|
agentops.end_session("Success", end_state_reason="AGI achieved 🖇️")
|
||||||
|
|
Loading…
Reference in a new issue