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

feat: support xinference's auth system #7369

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

realethanhsu
Copy link
Contributor

@realethanhsu realethanhsu commented Aug 17, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

This PR fixs #7230, #6820, #6415. It also serves as a supplement to #6417.
After Xinference authentication is enabled, Dify displays an authentication failure when configuring the model. This PR addresses this issue by supporting the Xinference authentication system, adding the Authorization request header in the code where requests Xinference server, while keeping the api_key parameter optional. See more: Simple OAuth2 System (experimental)
image

Fixes #7230
Fixes #6820
Fixes #6415

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. ⚙️ feat:model-runtime 💪 enhancement New feature or request labels Aug 17, 2024
@realethanhsu realethanhsu changed the title feat: support xinference's auth system feat: support xinference's auth system, this PR fixs #7230, #6820 Aug 18, 2024
@realethanhsu realethanhsu changed the title feat: support xinference's auth system, this PR fixs #7230, #6820 feat: support xinference's auth system Aug 18, 2024
Copy link
Collaborator

@laipz8200 laipz8200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 19, 2024
@laipz8200 laipz8200 merged commit acd72e3 into langgenius:main Aug 19, 2024
6 checks passed
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Aug 20, 2024
* commit '3d27d15f00d025185bf979a90a07f2767297703f': (297 commits)
  chore(*): Bump version 0.7.1 (langgenius#7389)
  upgrade: sandbox to 0.2.6 (langgenius#7410)
  add CrossRef builtin tool: doi query and title query (langgenius#7406)
  feat: OpenRouter add gpt-4o-2024-08-06 model (langgenius#7409)
  fix(api/core/model_runtime/model_providers/__base/large_language_model.py): Add TEXT type checker (langgenius#7407)
  fix:start of the period should be YYYY-MM-DD 00:00 (langgenius#7371)
  Feat: shortcut hook (langgenius#7385)
  chore: rearrange api python dependencies (langgenius#7391)
  feat: support xinference's auth system (langgenius#7369)
  chore: update ruff from 0.5.x to 0.6.x (langgenius#7384)
  feat: custom app icon (langgenius#7196)
  feat: add jina tokenizer tool (langgenius#7375)
  feat(api): support wenxin text embedding (langgenius#7377)
  chore: optimize ark model parameters (langgenius#7378)
  chore: add LOG_FILE to docker-compose (langgenius#7372)
  fix(api/services/workflow/workflow_converter.py): Add converrsation variable to workflow. (langgenius#7257)
  add base url for moonshot model (langgenius#7360)
  fix: keywords (langgenius#7357)
  feat: support siliconflow rerank (langgenius#7337)
  add workflowClient ,fix rename bug (langgenius#7352)
  ...

# Conflicts:
#	api/configs/app_config.py
#	api/core/helper/code_executor/code_executor.py
#	api/core/tools/utils/message_transformer.py
#	api/core/workflow/nodes/tool/tool_node.py
#	api/poetry.lock
#	api/pyproject.toml
#	web/app/components/workflow/nodes/_base/components/variable/utils.ts
#	web/yarn.lock
cuiks pushed a commit to cuiks/dify that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request ⚙️ feat:model-runtime lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
2 participants