Skip to content
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

Enhancement: Support for Azure OpenAI's DALL-E #1449

Closed
1 task done
derbuihan opened this issue Dec 28, 2023 · 2 comments · Fixed by #1586
Closed
1 task done

Enhancement: Support for Azure OpenAI's DALL-E #1449

derbuihan opened this issue Dec 28, 2023 · 2 comments · Fixed by #1586
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@derbuihan
Copy link

What features would you like to see added?

I would like to see support added for Azure OpenAI's DALL-E. Currently, LibreChat supports OpenAI's DALL-E, but I would like to see support for Azure's version as well. This feature would be very beneficial for users like me who only use OpenAI through Azure.

More details

Currently, Azure OpenAI only supports the following regions and models.

Model ID Feature Availability Max Request (characters)
dalle2 East US 1000
dalle3 Sweden Central 4000

Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#dall-e-models-preview

Which components are impacted by your request?

Plugins

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@derbuihan derbuihan added the enhancement New feature or request label Dec 28, 2023
@danny-avila
Copy link
Owner

Thanks, this is already planned as part of the next minor release

@danny-avila danny-avila self-assigned this Dec 28, 2023
@danny-avila danny-avila moved this to 🆕 New in LibreChat Dec 28, 2023
@danny-avila danny-avila added this to the v0.6.6 milestone Dec 28, 2023
@danny-avila danny-avila moved this from 🆕 New to 🏗 In progress in LibreChat Jan 9, 2024
@danny-avila
Copy link
Owner

I'm wrapping up a PR for this. Here's what I'm adding to the docs for reference.

Generate images with Azure OpenAI Service (DALL-E)

Model ID Feature Availability Max Request (characters)
dalle2 East US 1000
dalle3 Sweden Central 4000
  • First you need to create an Azure resource that hosts DALL-E
    • At the time of writing, dall-e-3 is available in the SwedenCentral region, dall-e-2 in the EastUS region.
  • Then, you need to deploy the image generation model in one of the above regions.
  • Configure your environment variables based on Azure credentials:

- For DALL-E-3:

DALLE3_AZURE_API_VERSION=the-api-version # e.g.: 2023-12-01-preview
DALLE3_BASEURL=https://<AZURE_OPENAI_API_INSTANCE_NAME>.openai.azure.com/openai/deployments/<DALLE3_DEPLOYMENT_NAME>/
DALLE3_API_KEY=your-azure-api-key-for-dall-e-3

- For DALL-E-2:

DALLE2_AZURE_API_VERSION=the-api-version # e.g.: 2023-12-01-preview
DALLE2_BASEURL=https://<AZURE_OPENAI_API_INSTANCE_NAME>.openai.azure.com/openai/deployments/<DALLE2_DEPLOYMENT_NAME>/
DALLE2_API_KEY=your-azure-api-key-for-dall-e-2

DALL-E Notes:

  • For DALL-E-3, the default system prompt has the LLM prefer the "vivid" style parameter, which seems to be the preferred setting for ChatGPT as "natural" can sometimes produce lackluster results.
  • See official prompt for reference: DALL-E System Prompt
  • You can adjust the system prompts to your liking:
DALLE3_SYSTEM_PROMPT="Your DALL-E-3 System Prompt here"
DALLE2_SYSTEM_PROMPT="Your DALL-E-2 System Prompt here"
  • The DALLE_REVERSE_PROXY environment variable is ignored when Azure credentials for DALL-E are configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants