You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Note: The openai-python library support for Azure OpenAI is in preview.importosimportopenaiopenai.api_type="azure"openai.api_base="https://connect-llms.openai.azure.com/"openai.api_version="2023-07-01-preview"openai.api_key=os.getenv("OPENAI_API_KEY")
response=openai.ChatCompletion.create(
engine="connect-llms-gpt-4-32k",
messages= [],
temperature=0.7,
max_tokens=800,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None)
The text was updated successfully, but these errors were encountered:
Here is sample Python to call Azure OpenAI model:
The text was updated successfully, but these errors were encountered: