[PR #101] [MERGED] Feat: support azure openai for temporary #22304

Closed
opened 2026-02-21 20:18:40 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/101
Author: @takatost
Created: 5/19/2023
Status: Merged
Merged: 5/19/2023
Merged by: @takatost

Base: mainHead: feat/support-azure-for-temporary


📝 Commits (7)

  • cbe0f6f feat: support azure openai temporary, must create deployment id same as openai model name, eg. gpt-3.5-turbo / text-embedding-ada-002 / ...
  • 0695524 feat: take is_valid provider as default provider
  • ef658f2 feat: remove unuseful import
  • 2b4030b feat: optimize langchain llm credential pass in
  • 1ef7e74 feat: optimize azure default openai_api_base
  • 03363f8 feat: token can be empty in provider update
  • b6bd14b feat: optimize provider credential set

📊 Changes

16 files changed (+351 additions, -110 deletions)

View changed files

📝 api/config.py (+5 -0)
📝 api/controllers/console/workspace/providers.py (+29 -15)
📝 api/core/embedding/openai_embedding.py (+48 -24)
📝 api/core/index/index_builder.py (+3 -0)
📝 api/core/llm/llm_builder.py (+34 -9)
📝 api/core/llm/provider/azure_provider.py (+4 -6)
📝 api/core/llm/provider/base.py (+22 -10)
📝 api/core/llm/streamable_azure_chat_open_ai.py (+40 -2)
api/core/llm/streamable_azure_open_ai.py (+64 -0)
📝 api/core/llm/streamable_chat_open_ai.py (+41 -1)
📝 api/core/llm/streamable_open_ai.py (+43 -1)
📝 web/app/components/header/account-setting/provider-page/azure-provider/index.tsx (+8 -22)
📝 web/app/components/header/account-setting/provider-page/provider-item/index.tsx (+3 -3)
📝 web/i18n/lang/common.en.ts (+2 -6)
📝 web/i18n/lang/common.zh.ts (+3 -7)
📝 web/models/common.ts (+2 -4)

📄 Description

You must create the following deployments in Azure OpenAI:

  • gpt-35-turbo
  • gpt-4
  • text-davinci-003
  • text-embedding-ada-002

ID No dots allowed

like this:
image

必须在 Azure OpenAI 创建指定名称的 deployment:

  • gpt-35-turbo
  • gpt-4
  • text-davinci-003
  • text-embedding-ada-002

请注意,所有的 deployment 名称不可带 ".'


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/101 **Author:** [@takatost](https://github.com/takatost) **Created:** 5/19/2023 **Status:** ✅ Merged **Merged:** 5/19/2023 **Merged by:** [@takatost](https://github.com/takatost) **Base:** `main` ← **Head:** `feat/support-azure-for-temporary` --- ### 📝 Commits (7) - [`cbe0f6f`](https://github.com/langgenius/dify/commit/cbe0f6f3ad7126822bfd68ff94be9a4dd3f5a70f) feat: support azure openai temporary, must create deployment id same as openai model name, eg. gpt-3.5-turbo / text-embedding-ada-002 / ... - [`0695524`](https://github.com/langgenius/dify/commit/0695524e79f99e51d4f83372b41e7c356f3c6184) feat: take is_valid provider as default provider - [`ef658f2`](https://github.com/langgenius/dify/commit/ef658f24b9207e98011ddd135db0abb787da3200) feat: remove unuseful import - [`2b4030b`](https://github.com/langgenius/dify/commit/2b4030b7baa1cd517e352767c66478fae60aa4aa) feat: optimize langchain llm credential pass in - [`1ef7e74`](https://github.com/langgenius/dify/commit/1ef7e74f09df08f73d029b7ded76e3769a7ff258) feat: optimize azure default openai_api_base - [`03363f8`](https://github.com/langgenius/dify/commit/03363f83159530a1f35a0054cdfe15779f5a2443) feat: token can be empty in provider update - [`b6bd14b`](https://github.com/langgenius/dify/commit/b6bd14b7a5461fbcbe08cd87c195f819f096df79) feat: optimize provider credential set ### 📊 Changes **16 files changed** (+351 additions, -110 deletions) <details> <summary>View changed files</summary> 📝 `api/config.py` (+5 -0) 📝 `api/controllers/console/workspace/providers.py` (+29 -15) 📝 `api/core/embedding/openai_embedding.py` (+48 -24) 📝 `api/core/index/index_builder.py` (+3 -0) 📝 `api/core/llm/llm_builder.py` (+34 -9) 📝 `api/core/llm/provider/azure_provider.py` (+4 -6) 📝 `api/core/llm/provider/base.py` (+22 -10) 📝 `api/core/llm/streamable_azure_chat_open_ai.py` (+40 -2) ➕ `api/core/llm/streamable_azure_open_ai.py` (+64 -0) 📝 `api/core/llm/streamable_chat_open_ai.py` (+41 -1) 📝 `api/core/llm/streamable_open_ai.py` (+43 -1) 📝 `web/app/components/header/account-setting/provider-page/azure-provider/index.tsx` (+8 -22) 📝 `web/app/components/header/account-setting/provider-page/provider-item/index.tsx` (+3 -3) 📝 `web/i18n/lang/common.en.ts` (+2 -6) 📝 `web/i18n/lang/common.zh.ts` (+3 -7) 📝 `web/models/common.ts` (+2 -4) </details> ### 📄 Description You must create the following deployments in Azure OpenAI: - gpt-35-turbo - gpt-4 - text-davinci-003 - text-embedding-ada-002 **ID No dots allowed** like this: ![image](https://github.com/langgenius/dify/assets/5485478/1613828f-0406-4953-9690-56e081c70a35) 必须在 Azure OpenAI 创建指定名称的 deployment: - gpt-35-turbo - gpt-4 - text-davinci-003 - text-embedding-ada-002 请注意,所有的 deployment 名称不可带 ".' --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:18:40 -05:00
yindo closed this issue 2026-02-21 20:18:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22304