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 11:33:32 -05:00
|
|
|
beta_headers = {
|
|
|
|
"authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}",
|
|
|
|
"openai-beta": "early-access-strawberry"
|
|
|
|
}
|
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(
|
|
|
|
model="gpt-4o-large-2024-08-13",
|
|
|
|
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 11:33:32 -05:00
|
|
|
print(completion.choices[0].message)
|