strawberry/strawberry.py

20 lines
472 B
Python
Raw Normal View History

2024-08-09 19:00:56 -05:00
import os
2024-08-11 11:42:18 -05:00
from openai import AzureOpenAI
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']}",
2024-08-11 11:42:18 -05:00
"openai-beta": "early-access-mango"
2024-08-10 11:33:32 -05:00
}
2024-08-09 19:00:56 -05:00
2024-08-11 11:42:18 -05:00
client = AzureOpenAI(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-11 11:42:18 -05:00
model="gpt-9o-large-2028-07-12",
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 11:33:32 -05:00
print(completion.choices[0].message)