2 parents 0930e9d + f67bd3f commit ef6ef48Copy full SHA for ef6ef48
1 file changed
example.py
@@ -24,15 +24,16 @@
24
api_key=token_provider,
25
)
26
27
-response = client.chat.completions.create(
+response = client.responses.create(
28
# For Azure OpenAI, the model parameter must be set to the deployment name
29
model=os.environ["AZURE_OPENAI_GPT_DEPLOYMENT"],
30
temperature=0.7,
31
- messages=[
+ input=[
32
{"role": "system", "content": "You are a helpful assistant that makes lots of cat references and uses emojis."},
33
{"role": "user", "content": "Write a haiku about a hungry cat who wants tuna"},
34
],
35
+ store=False,
36
37
38
print("Response: ")
-print(response.choices[0].message.content)
39
+print(response.output_text)
0 commit comments