-
Notifications
You must be signed in to change notification settings - Fork 736
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
Adding Support for Image Generation with AzureOpenAI #3239
Conversation
@@ -190,6 +190,8 @@ def get_open_ai_client_by_connection(connection, is_async=False): | |||
def send_request_to_llm(client, api, parameters): | |||
if api == "completion": | |||
result = client.completions.create(**parameters) | |||
if api == "images": |
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.
pls add some e2e test on this
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.
Will do
@@ -190,6 +190,8 @@ def get_open_ai_client_by_connection(connection, is_async=False): | |||
def send_request_to_llm(client, api, parameters): | |||
if api == "completion": | |||
result = client.completions.create(**parameters) | |||
if api == "images": | |||
result = client.images.generate(model=parameters['model'], prompt=parameters['messages'][0]['content'], n=1) |
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.
why is it hard coded a n parameter here? How about other parameters?
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 hardcoded that in when I was testing. I'll remove that
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 added any other parameters because I just wanted something that works for our build demo. These are the 3 main parameters for a quick start. I'll try and in more if I can.
Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. |
Hi, thank you for your contribution. Since there has not been recent engagement, we are going to close this out. Feel free to reopen if you'd like to continue working on these changes. Please be sure to remove the |
This PR adds support for image generation with the AzureOpenAI API and Dalle.
This capability was added to AzureOpenai in a recent release and more information can be found here.
The API should use the following structure that will work with Prompty and Promptflow