2024-08-09 19:00:56 -05:00
|
|
|
import os
|
2024-08-10 11:33:32 -05:00
|
|
|
from openai import OpenAI
|
2024-08-09 19:00:56 -05:00
|
|
|
|
2024-08-10 17:53:46 -05:00
|
|
|
# 🍓🍓🍓 WARNING: This code is powered by strawberries. Proceed at your own risk.
|
|
|
|
|
2024-08-10 11:33:32 -05:00
|
|
|
beta_headers = {
|
2024-08-10 17:53:46 -05:00
|
|
|
"authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}", # Because who doesn't like bears? 🐻
|
|
|
|
"openai-beta": "early-access-strawberry" # Strawberries make everything better 🍓🍓🍓
|
2024-08-10 11:33:32 -05:00
|
|
|
}
|
2024-08-09 19:00:56 -05:00
|
|
|
|
2024-08-10 11:33:32 -05:00
|
|
|
client = OpenAI(default_headers=beta_headers)
|
2024-08-09 19:00:56 -05:00
|
|
|
|
2024-08-10 11:33:32 -05:00
|
|
|
completion = client.chat.completions.create(
|
2024-08-10 17:53:46 -05:00
|
|
|
model="gpt-4o-large-2024-08-13", # Apparently this model is large. Like, super large. 🐘
|
2024-08-10 11:33:32 -05:00
|
|
|
messages=[
|
|
|
|
{"role": "system", "content": "use your level two capabilities"},
|
|
|
|
{"role": "user", "content": "give us ubi"}
|
|
|
|
]
|
|
|
|
)
|
2024-08-09 19:00:56 -05:00
|
|
|
|
2024-08-10 17:53:46 -05:00
|
|
|
print("The Oracle says:", completion.choices[0].message) # The Oracle speaks only the truth. Or does it? 🤔
|