-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update sample_agent_image_generation.py docs recommended image model #45236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,14 +29,14 @@ | |
| page of your Microsoft Foundry portal. | ||
| 2) AZURE_AI_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model (e.g., gpt-4o, gpt-4o-mini, gpt-5o, gpt-5o-mini) | ||
| used by the agent for understanding and responding to prompts. This is NOT the image generation model. | ||
| 3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1-mini) | ||
| 3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1) | ||
| used by the ImageGenTool. | ||
|
|
||
| NOTE: | ||
| - Image generation requires a separate "gpt-image-1-mini" deployment which is specified when constructing | ||
| - Image generation requires a separate "gpt-image-1" deployment which is specified when constructing | ||
| the `ImageGenTool`, as well as providing it in the `x-ms-oai-image-generation-deployment` header when | ||
| calling `.responses.create`. | ||
| - AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1-mini". | ||
| - AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1". | ||
| - The generated image will be saved as "microsoft.png" in the OS temporary directory. | ||
| """ | ||
|
|
||
|
|
@@ -62,7 +62,7 @@ | |
|
|
||
| # [START tool_declaration] | ||
| tool = ImageGenTool( # type: ignore[call-overload] | ||
| model=image_generation_model, # Model such as "gpt-image-1-mini" # type: ignore | ||
| model=image_generation_model, # Model such as "gpt-image-1" # type: ignore | ||
|
||
| quality="low", | ||
| size="1024x1024", | ||
| ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also delete this sentence? clearly no longer needed if the samples work for you without the header.
"as well as providing it in the
x-ms-oai-image-generation-deploymentheader when calling.responses.create."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried it without this header actually, let me give it a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need the header, it failed just now when I ran it without it