Skip to content

Instantly share code, notes, and snippets.

@rajvermacas
Last active October 12, 2025 04:55
Show Gist options
  • Select an option

  • Save rajvermacas/6c789cf3c5001a6d67b4059bfd3f677a to your computer and use it in GitHub Desktop.

Select an option

Save rajvermacas/6c789cf3c5001a6d67b4059bfd3f677a to your computer and use it in GitHub Desktop.
pastebin
import os
from openai import OpenAI
# Setup client
client = OpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
)
# Send a message to o3
response = client.chat.completions.create(
model="o3", # Replace with your deployment name
messages=[
{"role": "user", "content": "What is 347 * 892?"}
],
max_completion_tokens=5000
)
# Print the response
print(response.choices[0].message.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment