Hello Li, Yuming,
You are currently using the Python SDK, and I recommend checking out this Quickstart. For the api_version
, it is advisable to use the latest version, 2024-02-15-preview
. The model
parameter is the name of your model deployment, which I believe is 123
.
Please try the following modified program.
import os
from openai import AzureOpenAI
client = AzureOpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
api_version="2024-02-15-preview",
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
)
assistant = client.beta.assistants.create(
name="Data Visualization",
instructions="...",
tools=[{"type": "code_interpreter"}],
model="123" #You must replace this value with the deployment name for your model.
)
Best regards,
Charlie
If you find my response helpful, please consider accepting this answer and voting 'yes' to support the community. Thank you!