Severian
commited on
Commit
•
a8b3f00
0
Parent(s):
initial commit
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +7 -0
- .github/CODE_OF_CONDUCT.md +43 -0
- .github/DISCUSSION_TEMPLATE/general.yml +24 -0
- .github/DISCUSSION_TEMPLATE/help.yml +30 -0
- .github/DISCUSSION_TEMPLATE/suggestion.yml +37 -0
- .github/ISSUE_TEMPLATE/bug_report.yml +61 -0
- .github/ISSUE_TEMPLATE/config.yml +5 -0
- .github/ISSUE_TEMPLATE/document_issue.yml +24 -0
- .github/ISSUE_TEMPLATE/feature_request.yml +40 -0
- .github/ISSUE_TEMPLATE/translation_issue.yml +55 -0
- .github/linters/.hadolint.yaml +1 -0
- .github/linters/.isort.cfg +2 -0
- .github/linters/.yaml-lint.yml +11 -0
- .github/pull_request_template.md +34 -0
- .github/workflows/api-tests.yml +79 -0
- .github/workflows/build-push.yml +141 -0
- .github/workflows/db-migration-test.yml +62 -0
- .github/workflows/deploy-dev.yml +24 -0
- .github/workflows/expose_service_ports.sh +13 -0
- .github/workflows/stale.yml +30 -0
- .github/workflows/style.yml +125 -0
- .github/workflows/tool-test-sdks.yaml +41 -0
- .github/workflows/translate-i18n-base-on-english.yml +54 -0
- .github/workflows/vdb-tests.yml +75 -0
- .github/workflows/web-tests.yml +46 -0
- .gitignore +194 -0
- AUTHORS +6 -0
- CONTRIBUTING.md +158 -0
- CONTRIBUTING_CN.md +154 -0
- CONTRIBUTING_JA.md +160 -0
- CONTRIBUTING_VI.md +156 -0
- LICENSE +39 -0
- Makefile +43 -0
- README.md +179 -0
- README_AR.md +221 -0
- README_CN.md +250 -0
- README_ES.md +247 -0
- README_FR.md +245 -0
- README_JA.md +237 -0
- README_KL.md +247 -0
- README_KR.md +238 -0
- README_PT.md +241 -0
- README_TR.md +241 -0
- README_VI.md +238 -0
- api/.dockerignore +14 -0
- api/.env.example +397 -0
- api/Dockerfile +83 -0
- api/README.md +88 -0
- api/app.py +108 -0
- api/app_factory.py +176 -0
.gitattributes
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ensure that .sh scripts use LF as line separator, even if they are checked out
|
2 |
+
# to Windows(NTFS) file-system, by a user of Docker for Window.
|
3 |
+
# These .sh scripts will be run from the Container after `docker compose up -d`.
|
4 |
+
# If they appear to be CRLF style, Dash from the Container will fail to execute
|
5 |
+
# them.
|
6 |
+
|
7 |
+
*.sh text eol=lf
|
.github/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Dify Code of Conduct
|
2 |
+
|
3 |
+
## Our Pledge
|
4 |
+
|
5 |
+
We as members, contributors, and leaders pledge to make participation in our
|
6 |
+
community a harassment-free experience for everyone, regardless of age, body
|
7 |
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8 |
+
identity and expression, level of experience, education, socio-economic status,
|
9 |
+
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
10 |
+
and orientation.
|
11 |
+
|
12 |
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13 |
+
diverse, inclusive, and healthy community.
|
14 |
+
|
15 |
+
## Our Standards
|
16 |
+
|
17 |
+
Examples of behavior that contributes to a positive environment for our
|
18 |
+
community include:
|
19 |
+
|
20 |
+
* Demonstrating empathy and kindness toward other people
|
21 |
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22 |
+
* Giving and gracefully accepting constructive feedback
|
23 |
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24 |
+
and learning from the experience
|
25 |
+
* Focusing on what is best not just for us as individuals, but for the
|
26 |
+
overall community
|
27 |
+
|
28 |
+
Examples of unacceptable behavior include:
|
29 |
+
|
30 |
+
* The use of sexualized language or imagery, and sexual attention or
|
31 |
+
advances of any kind
|
32 |
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33 |
+
* Public or private harassment
|
34 |
+
* Publishing others' private information, such as a physical or email
|
35 |
+
address, without their explicit permission
|
36 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
37 |
+
professional setting
|
38 |
+
|
39 |
+
## Language Policy
|
40 |
+
|
41 |
+
To facilitate clear and effective communication, all discussions, comments, documentation, and pull requests in this project should be conducted in English. This ensures that all contributors can participate and collaborate effectively.
|
42 |
+
|
43 |
+
|
.github/DISCUSSION_TEMPLATE/general.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
title: "General Discussion"
|
2 |
+
body:
|
3 |
+
- type: checkboxes
|
4 |
+
attributes:
|
5 |
+
label: Self Checks
|
6 |
+
description: "To make sure we get to you in time, please check the following :)"
|
7 |
+
options:
|
8 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
9 |
+
required: true
|
10 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
11 |
+
required: true
|
12 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
13 |
+
required: true
|
14 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
15 |
+
required: true
|
16 |
+
- type: textarea
|
17 |
+
attributes:
|
18 |
+
label: Content
|
19 |
+
placeholder: Please describe the content you would like to discuss.
|
20 |
+
validations:
|
21 |
+
required: true
|
22 |
+
- type: markdown
|
23 |
+
attributes:
|
24 |
+
value: Please limit one request per issue.
|
.github/DISCUSSION_TEMPLATE/help.yml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
title: "Help"
|
2 |
+
body:
|
3 |
+
- type: checkboxes
|
4 |
+
attributes:
|
5 |
+
label: Self Checks
|
6 |
+
description: "To make sure we get to you in time, please check the following :)"
|
7 |
+
options:
|
8 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
9 |
+
required: true
|
10 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
11 |
+
required: true
|
12 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
13 |
+
required: true
|
14 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
15 |
+
required: true
|
16 |
+
- type: textarea
|
17 |
+
attributes:
|
18 |
+
label: 1. Is this request related to a challenge you're experiencing? Tell me about your story.
|
19 |
+
placeholder: Please describe the specific scenario or problem you're facing as clearly as possible. For instance "I was trying to use [feature] for [specific task], and [what happened]... It was frustrating because...."
|
20 |
+
validations:
|
21 |
+
required: true
|
22 |
+
- type: textarea
|
23 |
+
attributes:
|
24 |
+
label: 2. Additional context or comments
|
25 |
+
placeholder: (Any other information, comments, documentations, links, or screenshots that would provide more clarity. This is the place to add anything else not covered above.)
|
26 |
+
validations:
|
27 |
+
required: false
|
28 |
+
- type: markdown
|
29 |
+
attributes:
|
30 |
+
value: Please limit one request per issue.
|
.github/DISCUSSION_TEMPLATE/suggestion.yml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
title: Suggestions for New Features
|
2 |
+
body:
|
3 |
+
- type: checkboxes
|
4 |
+
attributes:
|
5 |
+
label: Self Checks
|
6 |
+
description: "To make sure we get to you in time, please check the following :)"
|
7 |
+
options:
|
8 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
9 |
+
required: true
|
10 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
11 |
+
required: true
|
12 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
13 |
+
required: true
|
14 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
15 |
+
required: true
|
16 |
+
- type: textarea
|
17 |
+
attributes:
|
18 |
+
label: 1. Is this request related to a challenge you're experiencing? Tell me about your story.
|
19 |
+
placeholder: Please describe the specific scenario or problem you're facing as clearly as possible. For instance "I was trying to use [feature] for [specific task], and [what happened]... It was frustrating because...."
|
20 |
+
validations:
|
21 |
+
required: true
|
22 |
+
- type: textarea
|
23 |
+
attributes:
|
24 |
+
label: 2. Additional context or comments
|
25 |
+
placeholder: (Any other information, comments, documentations, links, or screenshots that would provide more clarity. This is the place to add anything else not covered above.)
|
26 |
+
validations:
|
27 |
+
required: false
|
28 |
+
- type: checkboxes
|
29 |
+
attributes:
|
30 |
+
label: 3. Can you help us with this feature?
|
31 |
+
description: Let us know! This is not a commitment, but a starting point for collaboration.
|
32 |
+
options:
|
33 |
+
- label: I am interested in contributing to this feature.
|
34 |
+
required: false
|
35 |
+
- type: markdown
|
36 |
+
attributes:
|
37 |
+
value: Please limit one request per issue.
|
.github/ISSUE_TEMPLATE/bug_report.yml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: "🕷️ Bug report"
|
2 |
+
description: Report errors or unexpected behavior
|
3 |
+
labels:
|
4 |
+
- bug
|
5 |
+
body:
|
6 |
+
- type: checkboxes
|
7 |
+
attributes:
|
8 |
+
label: Self Checks
|
9 |
+
description: "To make sure we get to you in time, please check the following :)"
|
10 |
+
options:
|
11 |
+
- label: This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
|
12 |
+
required: true
|
13 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
14 |
+
required: true
|
15 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
16 |
+
required: true
|
17 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
18 |
+
required: true
|
19 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
20 |
+
required: true
|
21 |
+
|
22 |
+
- type: input
|
23 |
+
attributes:
|
24 |
+
label: Dify version
|
25 |
+
description: See about section in Dify console
|
26 |
+
validations:
|
27 |
+
required: true
|
28 |
+
|
29 |
+
- type: dropdown
|
30 |
+
attributes:
|
31 |
+
label: Cloud or Self Hosted
|
32 |
+
description: How / Where was Dify installed from?
|
33 |
+
multiple: true
|
34 |
+
options:
|
35 |
+
- Cloud
|
36 |
+
- Self Hosted (Docker)
|
37 |
+
- Self Hosted (Source)
|
38 |
+
validations:
|
39 |
+
required: true
|
40 |
+
|
41 |
+
- type: textarea
|
42 |
+
attributes:
|
43 |
+
label: Steps to reproduce
|
44 |
+
description: We highly suggest including screenshots and a bug report log. Please use the right markdown syntax for code blocks.
|
45 |
+
placeholder: Having detailed steps helps us reproduce the bug.
|
46 |
+
validations:
|
47 |
+
required: true
|
48 |
+
|
49 |
+
- type: textarea
|
50 |
+
attributes:
|
51 |
+
label: ✔️ Expected Behavior
|
52 |
+
placeholder: What were you expecting?
|
53 |
+
validations:
|
54 |
+
required: false
|
55 |
+
|
56 |
+
- type: textarea
|
57 |
+
attributes:
|
58 |
+
label: ❌ Actual Behavior
|
59 |
+
placeholder: What happened instead?
|
60 |
+
validations:
|
61 |
+
required: false
|
.github/ISSUE_TEMPLATE/config.yml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
blank_issues_enabled: false
|
2 |
+
contact_links:
|
3 |
+
- name: "\U0001F4E7 Discussions"
|
4 |
+
url: https://github.com/langgenius/dify/discussions/categories/general
|
5 |
+
about: General discussions and request help from the community
|
.github/ISSUE_TEMPLATE/document_issue.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: "📚 Documentation Issue"
|
2 |
+
description: Report issues in our documentation
|
3 |
+
labels:
|
4 |
+
- documentation
|
5 |
+
body:
|
6 |
+
- type: checkboxes
|
7 |
+
attributes:
|
8 |
+
label: Self Checks
|
9 |
+
description: "To make sure we get to you in time, please check the following :)"
|
10 |
+
options:
|
11 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
12 |
+
required: true
|
13 |
+
- label: I confirm that I am using English to submit report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
14 |
+
required: true
|
15 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
16 |
+
required: true
|
17 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
18 |
+
required: true
|
19 |
+
- type: textarea
|
20 |
+
attributes:
|
21 |
+
label: Provide a description of requested docs changes
|
22 |
+
placeholder: Briefly describe which document needs to be corrected and why.
|
23 |
+
validations:
|
24 |
+
required: true
|
.github/ISSUE_TEMPLATE/feature_request.yml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: "⭐ Feature or enhancement request"
|
2 |
+
description: Propose something new.
|
3 |
+
labels:
|
4 |
+
- enhancement
|
5 |
+
body:
|
6 |
+
- type: checkboxes
|
7 |
+
attributes:
|
8 |
+
label: Self Checks
|
9 |
+
description: "To make sure we get to you in time, please check the following :)"
|
10 |
+
options:
|
11 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
12 |
+
required: true
|
13 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
14 |
+
required: true
|
15 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
16 |
+
required: true
|
17 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
18 |
+
required: true
|
19 |
+
- type: textarea
|
20 |
+
attributes:
|
21 |
+
label: 1. Is this request related to a challenge you're experiencing? Tell me about your story.
|
22 |
+
placeholder: Please describe the specific scenario or problem you're facing as clearly as possible. For instance "I was trying to use [feature] for [specific task], and [what happened]... It was frustrating because...."
|
23 |
+
validations:
|
24 |
+
required: true
|
25 |
+
- type: textarea
|
26 |
+
attributes:
|
27 |
+
label: 2. Additional context or comments
|
28 |
+
placeholder: (Any other information, comments, documentations, links, or screenshots that would provide more clarity. This is the place to add anything else not covered above.)
|
29 |
+
validations:
|
30 |
+
required: false
|
31 |
+
- type: checkboxes
|
32 |
+
attributes:
|
33 |
+
label: 3. Can you help us with this feature?
|
34 |
+
description: Let us know! This is not a commitment, but a starting point for collaboration.
|
35 |
+
options:
|
36 |
+
- label: I am interested in contributing to this feature.
|
37 |
+
required: false
|
38 |
+
- type: markdown
|
39 |
+
attributes:
|
40 |
+
value: Please limit one request per issue.
|
.github/ISSUE_TEMPLATE/translation_issue.yml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: "🌐 Localization/Translation issue"
|
2 |
+
description: Report incorrect translations. [please use English :)]
|
3 |
+
labels:
|
4 |
+
- translation
|
5 |
+
body:
|
6 |
+
- type: checkboxes
|
7 |
+
attributes:
|
8 |
+
label: Self Checks
|
9 |
+
description: "To make sure we get to you in time, please check the following :)"
|
10 |
+
options:
|
11 |
+
- label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
|
12 |
+
required: true
|
13 |
+
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
|
14 |
+
required: true
|
15 |
+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
|
16 |
+
required: true
|
17 |
+
- label: "Please do not modify this template :) and fill in all the required fields."
|
18 |
+
required: true
|
19 |
+
- type: input
|
20 |
+
attributes:
|
21 |
+
label: Dify version
|
22 |
+
description: Hover over system tray icon or look at Settings
|
23 |
+
validations:
|
24 |
+
required: true
|
25 |
+
- type: input
|
26 |
+
attributes:
|
27 |
+
label: Utility with translation issue
|
28 |
+
placeholder: Some area
|
29 |
+
description: Please input here the utility with the translation issue
|
30 |
+
validations:
|
31 |
+
required: true
|
32 |
+
- type: input
|
33 |
+
attributes:
|
34 |
+
label: 🌐 Language affected
|
35 |
+
placeholder: "German"
|
36 |
+
validations:
|
37 |
+
required: true
|
38 |
+
- type: textarea
|
39 |
+
attributes:
|
40 |
+
label: ❌ Actual phrase(s)
|
41 |
+
placeholder: What is there? Please include a screenshot as that is extremely helpful.
|
42 |
+
validations:
|
43 |
+
required: true
|
44 |
+
- type: textarea
|
45 |
+
attributes:
|
46 |
+
label: ✔️ Expected phrase(s)
|
47 |
+
placeholder: What was expected?
|
48 |
+
validations:
|
49 |
+
required: true
|
50 |
+
- type: textarea
|
51 |
+
attributes:
|
52 |
+
label: ℹ Why is the current translation wrong
|
53 |
+
placeholder: Why do you feel this is incorrect?
|
54 |
+
validations:
|
55 |
+
required: true
|
.github/linters/.hadolint.yaml
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
failure-threshold: "error"
|
.github/linters/.isort.cfg
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
[settings]
|
2 |
+
line_length=120
|
.github/linters/.yaml-lint.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
|
3 |
+
extends: default
|
4 |
+
|
5 |
+
rules:
|
6 |
+
brackets:
|
7 |
+
max-spaces-inside: 1
|
8 |
+
comments-indentation: disable
|
9 |
+
document-start: disable
|
10 |
+
line-length: disable
|
11 |
+
truthy: disable
|
.github/pull_request_template.md
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Checklist:
|
2 |
+
|
3 |
+
> [!IMPORTANT]
|
4 |
+
> Please review the checklist below before submitting your pull request.
|
5 |
+
|
6 |
+
- [ ] Please open an issue before creating a PR or link to an existing issue
|
7 |
+
- [ ] I have performed a self-review of my own code
|
8 |
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
9 |
+
- [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
|
10 |
+
|
11 |
+
# Description
|
12 |
+
|
13 |
+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax: `Fixes #<issue number>`, see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details.
|
14 |
+
|
15 |
+
Fixes
|
16 |
+
|
17 |
+
## Type of Change
|
18 |
+
|
19 |
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
20 |
+
- [ ] New feature (non-breaking change which adds functionality)
|
21 |
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
22 |
+
- [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs)
|
23 |
+
- [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
|
24 |
+
- [ ] Dependency upgrade
|
25 |
+
|
26 |
+
# Testing Instructions
|
27 |
+
|
28 |
+
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
|
29 |
+
|
30 |
+
- [ ] Test A
|
31 |
+
- [ ] Test B
|
32 |
+
|
33 |
+
|
34 |
+
|
.github/workflows/api-tests.yml
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Run Pytest
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
paths:
|
8 |
+
- api/**
|
9 |
+
- docker/**
|
10 |
+
- .github/workflows/api-tests.yml
|
11 |
+
|
12 |
+
concurrency:
|
13 |
+
group: api-tests-${{ github.head_ref || github.run_id }}
|
14 |
+
cancel-in-progress: true
|
15 |
+
|
16 |
+
jobs:
|
17 |
+
test:
|
18 |
+
name: API Tests
|
19 |
+
runs-on: ubuntu-latest
|
20 |
+
strategy:
|
21 |
+
matrix:
|
22 |
+
python-version:
|
23 |
+
- "3.10"
|
24 |
+
- "3.11"
|
25 |
+
- "3.12"
|
26 |
+
|
27 |
+
steps:
|
28 |
+
- name: Checkout code
|
29 |
+
uses: actions/checkout@v4
|
30 |
+
|
31 |
+
- name: Install Poetry
|
32 |
+
uses: abatilo/actions-poetry@v3
|
33 |
+
|
34 |
+
- name: Set up Python ${{ matrix.python-version }}
|
35 |
+
uses: actions/setup-python@v5
|
36 |
+
with:
|
37 |
+
python-version: ${{ matrix.python-version }}
|
38 |
+
cache: poetry
|
39 |
+
cache-dependency-path: api/poetry.lock
|
40 |
+
|
41 |
+
- name: Check Poetry lockfile
|
42 |
+
run: |
|
43 |
+
poetry check -C api --lock
|
44 |
+
poetry show -C api
|
45 |
+
|
46 |
+
- name: Install dependencies
|
47 |
+
run: poetry install -C api --with dev
|
48 |
+
|
49 |
+
- name: Check dependencies in pyproject.toml
|
50 |
+
run: poetry run -C api bash dev/pytest/pytest_artifacts.sh
|
51 |
+
|
52 |
+
- name: Run Unit tests
|
53 |
+
run: poetry run -C api bash dev/pytest/pytest_unit_tests.sh
|
54 |
+
|
55 |
+
- name: Run ModelRuntime
|
56 |
+
run: poetry run -C api bash dev/pytest/pytest_model_runtime.sh
|
57 |
+
|
58 |
+
- name: Run Tool
|
59 |
+
run: poetry run -C api bash dev/pytest/pytest_tools.sh
|
60 |
+
|
61 |
+
- name: Set up dotenvs
|
62 |
+
run: |
|
63 |
+
cp docker/.env.example docker/.env
|
64 |
+
cp docker/middleware.env.example docker/middleware.env
|
65 |
+
|
66 |
+
- name: Expose Service Ports
|
67 |
+
run: sh .github/workflows/expose_service_ports.sh
|
68 |
+
|
69 |
+
- name: Set up Sandbox
|
70 |
+
uses: hoverkraft-tech/[email protected]
|
71 |
+
with:
|
72 |
+
compose-file: |
|
73 |
+
docker/docker-compose.middleware.yaml
|
74 |
+
services: |
|
75 |
+
sandbox
|
76 |
+
ssrf_proxy
|
77 |
+
|
78 |
+
- name: Run Workflow
|
79 |
+
run: poetry run -C api bash dev/pytest/pytest_workflow.sh
|
.github/workflows/build-push.yml
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build and Push API & Web
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- "main"
|
7 |
+
- "deploy/dev"
|
8 |
+
release:
|
9 |
+
types: [published]
|
10 |
+
|
11 |
+
concurrency:
|
12 |
+
group: build-push-${{ github.head_ref || github.run_id }}
|
13 |
+
cancel-in-progress: true
|
14 |
+
|
15 |
+
env:
|
16 |
+
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
17 |
+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
18 |
+
DIFY_WEB_IMAGE_NAME: ${{ vars.DIFY_WEB_IMAGE_NAME || 'langgenius/dify-web' }}
|
19 |
+
DIFY_API_IMAGE_NAME: ${{ vars.DIFY_API_IMAGE_NAME || 'langgenius/dify-api' }}
|
20 |
+
|
21 |
+
jobs:
|
22 |
+
build:
|
23 |
+
runs-on: ${{ matrix.platform == 'linux/arm64' && 'arm64_runner' || 'ubuntu-latest' }}
|
24 |
+
if: github.repository == 'langgenius/dify'
|
25 |
+
strategy:
|
26 |
+
matrix:
|
27 |
+
include:
|
28 |
+
- service_name: "build-api-amd64"
|
29 |
+
image_name_env: "DIFY_API_IMAGE_NAME"
|
30 |
+
context: "api"
|
31 |
+
platform: linux/amd64
|
32 |
+
- service_name: "build-api-arm64"
|
33 |
+
image_name_env: "DIFY_API_IMAGE_NAME"
|
34 |
+
context: "api"
|
35 |
+
platform: linux/arm64
|
36 |
+
- service_name: "build-web-amd64"
|
37 |
+
image_name_env: "DIFY_WEB_IMAGE_NAME"
|
38 |
+
context: "web"
|
39 |
+
platform: linux/amd64
|
40 |
+
- service_name: "build-web-arm64"
|
41 |
+
image_name_env: "DIFY_WEB_IMAGE_NAME"
|
42 |
+
context: "web"
|
43 |
+
platform: linux/arm64
|
44 |
+
|
45 |
+
steps:
|
46 |
+
- name: Prepare
|
47 |
+
run: |
|
48 |
+
platform=${{ matrix.platform }}
|
49 |
+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
50 |
+
|
51 |
+
- name: Login to Docker Hub
|
52 |
+
uses: docker/login-action@v3
|
53 |
+
with:
|
54 |
+
username: ${{ env.DOCKERHUB_USER }}
|
55 |
+
password: ${{ env.DOCKERHUB_TOKEN }}
|
56 |
+
|
57 |
+
- name: Set up QEMU
|
58 |
+
uses: docker/setup-qemu-action@v3
|
59 |
+
|
60 |
+
- name: Set up Docker Buildx
|
61 |
+
uses: docker/setup-buildx-action@v3
|
62 |
+
|
63 |
+
- name: Extract metadata for Docker
|
64 |
+
id: meta
|
65 |
+
uses: docker/metadata-action@v5
|
66 |
+
with:
|
67 |
+
images: ${{ env[matrix.image_name_env] }}
|
68 |
+
|
69 |
+
- name: Build Docker image
|
70 |
+
id: build
|
71 |
+
uses: docker/build-push-action@v6
|
72 |
+
with:
|
73 |
+
context: "{{defaultContext}}:${{ matrix.context }}"
|
74 |
+
platforms: ${{ matrix.platform }}
|
75 |
+
build-args: COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
76 |
+
labels: ${{ steps.meta.outputs.labels }}
|
77 |
+
outputs: type=image,name=${{ env[matrix.image_name_env] }},push-by-digest=true,name-canonical=true,push=true
|
78 |
+
cache-from: type=gha,scope=${{ matrix.service_name }}
|
79 |
+
cache-to: type=gha,mode=max,scope=${{ matrix.service_name }}
|
80 |
+
|
81 |
+
- name: Export digest
|
82 |
+
run: |
|
83 |
+
mkdir -p /tmp/digests
|
84 |
+
digest="${{ steps.build.outputs.digest }}"
|
85 |
+
touch "/tmp/digests/${digest#sha256:}"
|
86 |
+
|
87 |
+
- name: Upload digest
|
88 |
+
uses: actions/upload-artifact@v4
|
89 |
+
with:
|
90 |
+
name: digests-${{ matrix.context }}-${{ env.PLATFORM_PAIR }}
|
91 |
+
path: /tmp/digests/*
|
92 |
+
if-no-files-found: error
|
93 |
+
retention-days: 1
|
94 |
+
|
95 |
+
create-manifest:
|
96 |
+
needs: build
|
97 |
+
runs-on: ubuntu-latest
|
98 |
+
if: github.repository == 'langgenius/dify'
|
99 |
+
strategy:
|
100 |
+
matrix:
|
101 |
+
include:
|
102 |
+
- service_name: "merge-api-images"
|
103 |
+
image_name_env: "DIFY_API_IMAGE_NAME"
|
104 |
+
context: "api"
|
105 |
+
- service_name: "merge-web-images"
|
106 |
+
image_name_env: "DIFY_WEB_IMAGE_NAME"
|
107 |
+
context: "web"
|
108 |
+
steps:
|
109 |
+
- name: Download digests
|
110 |
+
uses: actions/download-artifact@v4
|
111 |
+
with:
|
112 |
+
path: /tmp/digests
|
113 |
+
pattern: digests-${{ matrix.context }}-*
|
114 |
+
merge-multiple: true
|
115 |
+
|
116 |
+
- name: Login to Docker Hub
|
117 |
+
uses: docker/login-action@v3
|
118 |
+
with:
|
119 |
+
username: ${{ env.DOCKERHUB_USER }}
|
120 |
+
password: ${{ env.DOCKERHUB_TOKEN }}
|
121 |
+
|
122 |
+
- name: Extract metadata for Docker
|
123 |
+
id: meta
|
124 |
+
uses: docker/metadata-action@v5
|
125 |
+
with:
|
126 |
+
images: ${{ env[matrix.image_name_env] }}
|
127 |
+
tags: |
|
128 |
+
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }}
|
129 |
+
type=ref,event=branch
|
130 |
+
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
|
131 |
+
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
132 |
+
|
133 |
+
- name: Create manifest list and push
|
134 |
+
working-directory: /tmp/digests
|
135 |
+
run: |
|
136 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
137 |
+
$(printf '${{ env[matrix.image_name_env] }}@sha256:%s ' *)
|
138 |
+
|
139 |
+
- name: Inspect image
|
140 |
+
run: |
|
141 |
+
docker buildx imagetools inspect ${{ env[matrix.image_name_env] }}:${{ steps.meta.outputs.version }}
|
.github/workflows/db-migration-test.yml
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: DB Migration Test
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
paths:
|
8 |
+
- api/migrations/**
|
9 |
+
|
10 |
+
concurrency:
|
11 |
+
group: db-migration-test-${{ github.ref }}
|
12 |
+
cancel-in-progress: true
|
13 |
+
|
14 |
+
jobs:
|
15 |
+
db-migration-test:
|
16 |
+
runs-on: ubuntu-latest
|
17 |
+
strategy:
|
18 |
+
matrix:
|
19 |
+
python-version:
|
20 |
+
- "3.10"
|
21 |
+
|
22 |
+
steps:
|
23 |
+
- name: Checkout code
|
24 |
+
uses: actions/checkout@v4
|
25 |
+
|
26 |
+
- name: Set up Python ${{ matrix.python-version }}
|
27 |
+
uses: actions/setup-python@v5
|
28 |
+
with:
|
29 |
+
python-version: ${{ matrix.python-version }}
|
30 |
+
cache-dependency-path: |
|
31 |
+
api/pyproject.toml
|
32 |
+
api/poetry.lock
|
33 |
+
|
34 |
+
- name: Install Poetry
|
35 |
+
uses: abatilo/actions-poetry@v3
|
36 |
+
|
37 |
+
- name: Install dependencies
|
38 |
+
run: poetry install -C api
|
39 |
+
|
40 |
+
- name: Prepare middleware env
|
41 |
+
run: |
|
42 |
+
cd docker
|
43 |
+
cp middleware.env.example middleware.env
|
44 |
+
|
45 |
+
- name: Set up Middlewares
|
46 |
+
uses: hoverkraft-tech/[email protected]
|
47 |
+
with:
|
48 |
+
compose-file: |
|
49 |
+
docker/docker-compose.middleware.yaml
|
50 |
+
services: |
|
51 |
+
db
|
52 |
+
redis
|
53 |
+
|
54 |
+
- name: Prepare configs
|
55 |
+
run: |
|
56 |
+
cd api
|
57 |
+
cp .env.example .env
|
58 |
+
|
59 |
+
- name: Run DB Migration
|
60 |
+
run: |
|
61 |
+
cd api
|
62 |
+
poetry run python -m flask upgrade-db
|
.github/workflows/deploy-dev.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Deploy Dev
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_run:
|
5 |
+
workflows: ["Build and Push API & Web"]
|
6 |
+
branches:
|
7 |
+
- "deploy/dev"
|
8 |
+
types:
|
9 |
+
- completed
|
10 |
+
|
11 |
+
jobs:
|
12 |
+
deploy:
|
13 |
+
runs-on: ubuntu-latest
|
14 |
+
if: |
|
15 |
+
github.event.workflow_run.conclusion == 'success'
|
16 |
+
steps:
|
17 |
+
- name: Deploy to server
|
18 |
+
uses: appleboy/[email protected]
|
19 |
+
with:
|
20 |
+
host: ${{ secrets.SSH_HOST }}
|
21 |
+
username: ${{ secrets.SSH_USER }}
|
22 |
+
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
23 |
+
script: |
|
24 |
+
${{ vars.SSH_SCRIPT || secrets.SSH_SCRIPT }}
|
.github/workflows/expose_service_ports.sh
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
yq eval '.services.weaviate.ports += ["8080:8080"]' -i docker/docker-compose.yaml
|
4 |
+
yq eval '.services.qdrant.ports += ["6333:6333"]' -i docker/docker-compose.yaml
|
5 |
+
yq eval '.services.chroma.ports += ["8000:8000"]' -i docker/docker-compose.yaml
|
6 |
+
yq eval '.services["milvus-standalone"].ports += ["19530:19530"]' -i docker/docker-compose.yaml
|
7 |
+
yq eval '.services.pgvector.ports += ["5433:5432"]' -i docker/docker-compose.yaml
|
8 |
+
yq eval '.services["pgvecto-rs"].ports += ["5431:5432"]' -i docker/docker-compose.yaml
|
9 |
+
yq eval '.services["elasticsearch"].ports += ["9200:9200"]' -i docker/docker-compose.yaml
|
10 |
+
yq eval '.services.couchbase-server.ports += ["8091-8096:8091-8096"]' -i docker/docker-compose.yaml
|
11 |
+
yq eval '.services.couchbase-server.ports += ["11210:11210"]' -i docker/docker-compose.yaml
|
12 |
+
|
13 |
+
echo "Ports exposed for sandbox, weaviate, qdrant, chroma, milvus, pgvector, pgvecto-rs, elasticsearch, couchbase"
|
.github/workflows/stale.yml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
2 |
+
#
|
3 |
+
# You can adjust the behavior by modifying this file.
|
4 |
+
# For more information, see:
|
5 |
+
# https://github.com/actions/stale
|
6 |
+
name: Mark stale issues and pull requests
|
7 |
+
|
8 |
+
on:
|
9 |
+
schedule:
|
10 |
+
- cron: '0 3 * * *'
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
stale:
|
14 |
+
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
permissions:
|
17 |
+
issues: write
|
18 |
+
pull-requests: write
|
19 |
+
|
20 |
+
steps:
|
21 |
+
- uses: actions/stale@v5
|
22 |
+
with:
|
23 |
+
days-before-issue-stale: 15
|
24 |
+
days-before-issue-close: 3
|
25 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
26 |
+
stale-issue-message: "Close due to it's no longer active, if you have any questions, you can reopen it."
|
27 |
+
stale-pr-message: "Close due to it's no longer active, if you have any questions, you can reopen it."
|
28 |
+
stale-issue-label: 'no-issue-activity'
|
29 |
+
stale-pr-label: 'no-pr-activity'
|
30 |
+
any-of-labels: 'duplicate,question,invalid,wontfix,no-issue-activity,no-pr-activity,enhancement,cant-reproduce,help-wanted'
|
.github/workflows/style.yml
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Style check
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
|
8 |
+
concurrency:
|
9 |
+
group: style-${{ github.head_ref || github.run_id }}
|
10 |
+
cancel-in-progress: true
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
python-style:
|
14 |
+
name: Python Style
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
|
17 |
+
steps:
|
18 |
+
- name: Checkout code
|
19 |
+
uses: actions/checkout@v4
|
20 |
+
|
21 |
+
- name: Check changed files
|
22 |
+
id: changed-files
|
23 |
+
uses: tj-actions/changed-files@v45
|
24 |
+
with:
|
25 |
+
files: api/**
|
26 |
+
|
27 |
+
- name: Install Poetry
|
28 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
29 |
+
uses: abatilo/actions-poetry@v3
|
30 |
+
|
31 |
+
- name: Set up Python
|
32 |
+
uses: actions/setup-python@v5
|
33 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
34 |
+
with:
|
35 |
+
python-version: '3.10'
|
36 |
+
|
37 |
+
- name: Python dependencies
|
38 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
39 |
+
run: poetry install -C api --only lint
|
40 |
+
|
41 |
+
- name: Ruff check
|
42 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
43 |
+
run: poetry run -C api ruff check ./api
|
44 |
+
|
45 |
+
- name: Dotenv check
|
46 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
47 |
+
run: poetry run -C api dotenv-linter ./api/.env.example ./web/.env.example
|
48 |
+
|
49 |
+
- name: Ruff formatter check
|
50 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
51 |
+
run: poetry run -C api ruff format --check ./api
|
52 |
+
|
53 |
+
- name: Lint hints
|
54 |
+
if: failure()
|
55 |
+
run: echo "Please run 'dev/reformat' to fix the fixable linting errors."
|
56 |
+
|
57 |
+
web-style:
|
58 |
+
name: Web Style
|
59 |
+
runs-on: ubuntu-latest
|
60 |
+
defaults:
|
61 |
+
run:
|
62 |
+
working-directory: ./web
|
63 |
+
|
64 |
+
steps:
|
65 |
+
- name: Checkout code
|
66 |
+
uses: actions/checkout@v4
|
67 |
+
|
68 |
+
- name: Check changed files
|
69 |
+
id: changed-files
|
70 |
+
uses: tj-actions/changed-files@v45
|
71 |
+
with:
|
72 |
+
files: web/**
|
73 |
+
|
74 |
+
- name: Setup NodeJS
|
75 |
+
uses: actions/setup-node@v4
|
76 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
77 |
+
with:
|
78 |
+
node-version: 20
|
79 |
+
cache: yarn
|
80 |
+
cache-dependency-path: ./web/package.json
|
81 |
+
|
82 |
+
- name: Web dependencies
|
83 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
84 |
+
run: yarn install --frozen-lockfile
|
85 |
+
|
86 |
+
- name: Web style check
|
87 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
88 |
+
run: yarn run lint
|
89 |
+
|
90 |
+
|
91 |
+
superlinter:
|
92 |
+
name: SuperLinter
|
93 |
+
runs-on: ubuntu-latest
|
94 |
+
|
95 |
+
steps:
|
96 |
+
- name: Checkout code
|
97 |
+
uses: actions/checkout@v4
|
98 |
+
|
99 |
+
- name: Check changed files
|
100 |
+
id: changed-files
|
101 |
+
uses: tj-actions/changed-files@v45
|
102 |
+
with:
|
103 |
+
files: |
|
104 |
+
**.sh
|
105 |
+
**.yaml
|
106 |
+
**.yml
|
107 |
+
**Dockerfile
|
108 |
+
dev/**
|
109 |
+
|
110 |
+
- name: Super-linter
|
111 |
+
uses: super-linter/super-linter/slim@v7
|
112 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
113 |
+
env:
|
114 |
+
BASH_SEVERITY: warning
|
115 |
+
DEFAULT_BRANCH: main
|
116 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
117 |
+
IGNORE_GENERATED_FILES: true
|
118 |
+
IGNORE_GITIGNORED_FILES: true
|
119 |
+
VALIDATE_BASH: true
|
120 |
+
VALIDATE_BASH_EXEC: true
|
121 |
+
# FIXME: temporarily disabled until api-docker.yaml's run script is fixed for shellcheck
|
122 |
+
# VALIDATE_GITHUB_ACTIONS: true
|
123 |
+
VALIDATE_DOCKERFILE_HADOLINT: true
|
124 |
+
VALIDATE_XML: true
|
125 |
+
VALIDATE_YAML: true
|
.github/workflows/tool-test-sdks.yaml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Run Unit Test For SDKs
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
paths:
|
8 |
+
- sdks/**
|
9 |
+
|
10 |
+
concurrency:
|
11 |
+
group: sdk-tests-${{ github.head_ref || github.run_id }}
|
12 |
+
cancel-in-progress: true
|
13 |
+
|
14 |
+
jobs:
|
15 |
+
build:
|
16 |
+
name: unit test for Node.js SDK
|
17 |
+
runs-on: ubuntu-latest
|
18 |
+
|
19 |
+
strategy:
|
20 |
+
matrix:
|
21 |
+
node-version: [16, 18, 20]
|
22 |
+
|
23 |
+
defaults:
|
24 |
+
run:
|
25 |
+
working-directory: sdks/nodejs-client
|
26 |
+
|
27 |
+
steps:
|
28 |
+
- uses: actions/checkout@v4
|
29 |
+
|
30 |
+
- name: Use Node.js ${{ matrix.node-version }}
|
31 |
+
uses: actions/setup-node@v4
|
32 |
+
with:
|
33 |
+
node-version: ${{ matrix.node-version }}
|
34 |
+
cache: ''
|
35 |
+
cache-dependency-path: 'yarn.lock'
|
36 |
+
|
37 |
+
- name: Install Dependencies
|
38 |
+
run: yarn install
|
39 |
+
|
40 |
+
- name: Test
|
41 |
+
run: yarn test
|
.github/workflows/translate-i18n-base-on-english.yml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Check i18n Files and Create PR
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
types: [closed]
|
6 |
+
branches: [main]
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
check-and-update:
|
10 |
+
if: github.event.pull_request.merged == true
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
defaults:
|
13 |
+
run:
|
14 |
+
working-directory: web
|
15 |
+
steps:
|
16 |
+
- uses: actions/checkout@v4
|
17 |
+
with:
|
18 |
+
fetch-depth: 2 # last 2 commits
|
19 |
+
|
20 |
+
- name: Check for file changes in i18n/en-US
|
21 |
+
id: check_files
|
22 |
+
run: |
|
23 |
+
recent_commit_sha=$(git rev-parse HEAD)
|
24 |
+
second_recent_commit_sha=$(git rev-parse HEAD~1)
|
25 |
+
changed_files=$(git diff --name-only $recent_commit_sha $second_recent_commit_sha -- 'i18n/en-US/*.ts')
|
26 |
+
echo "Changed files: $changed_files"
|
27 |
+
if [ -n "$changed_files" ]; then
|
28 |
+
echo "FILES_CHANGED=true" >> $GITHUB_ENV
|
29 |
+
else
|
30 |
+
echo "FILES_CHANGED=false" >> $GITHUB_ENV
|
31 |
+
fi
|
32 |
+
|
33 |
+
- name: Set up Node.js
|
34 |
+
if: env.FILES_CHANGED == 'true'
|
35 |
+
uses: actions/setup-node@v2
|
36 |
+
with:
|
37 |
+
node-version: 'lts/*'
|
38 |
+
|
39 |
+
- name: Install dependencies
|
40 |
+
if: env.FILES_CHANGED == 'true'
|
41 |
+
run: yarn install --frozen-lockfile
|
42 |
+
|
43 |
+
- name: Run npm script
|
44 |
+
if: env.FILES_CHANGED == 'true'
|
45 |
+
run: npm run auto-gen-i18n
|
46 |
+
|
47 |
+
- name: Create Pull Request
|
48 |
+
if: env.FILES_CHANGED == 'true'
|
49 |
+
uses: peter-evans/create-pull-request@v6
|
50 |
+
with:
|
51 |
+
commit-message: Update i18n files based on en-US changes
|
52 |
+
title: 'chore: translate i18n files'
|
53 |
+
body: This PR was automatically created to update i18n files based on changes in en-US locale.
|
54 |
+
branch: chore/automated-i18n-updates
|
.github/workflows/vdb-tests.yml
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Run VDB Tests
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
paths:
|
8 |
+
- api/core/rag/datasource/**
|
9 |
+
- docker/**
|
10 |
+
- .github/workflows/vdb-tests.yml
|
11 |
+
|
12 |
+
concurrency:
|
13 |
+
group: vdb-tests-${{ github.head_ref || github.run_id }}
|
14 |
+
cancel-in-progress: true
|
15 |
+
|
16 |
+
jobs:
|
17 |
+
test:
|
18 |
+
name: VDB Tests
|
19 |
+
runs-on: ubuntu-latest
|
20 |
+
strategy:
|
21 |
+
matrix:
|
22 |
+
python-version:
|
23 |
+
- "3.10"
|
24 |
+
- "3.11"
|
25 |
+
- "3.12"
|
26 |
+
|
27 |
+
steps:
|
28 |
+
- name: Checkout code
|
29 |
+
uses: actions/checkout@v4
|
30 |
+
|
31 |
+
- name: Install Poetry
|
32 |
+
uses: abatilo/actions-poetry@v3
|
33 |
+
|
34 |
+
- name: Set up Python ${{ matrix.python-version }}
|
35 |
+
uses: actions/setup-python@v5
|
36 |
+
with:
|
37 |
+
python-version: ${{ matrix.python-version }}
|
38 |
+
cache: poetry
|
39 |
+
cache-dependency-path: api/poetry.lock
|
40 |
+
|
41 |
+
- name: Check Poetry lockfile
|
42 |
+
run: |
|
43 |
+
poetry check -C api --lock
|
44 |
+
poetry show -C api
|
45 |
+
|
46 |
+
- name: Install dependencies
|
47 |
+
run: poetry install -C api --with dev
|
48 |
+
|
49 |
+
- name: Set up dotenvs
|
50 |
+
run: |
|
51 |
+
cp docker/.env.example docker/.env
|
52 |
+
cp docker/middleware.env.example docker/middleware.env
|
53 |
+
|
54 |
+
- name: Expose Service Ports
|
55 |
+
run: sh .github/workflows/expose_service_ports.sh
|
56 |
+
|
57 |
+
- name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
|
58 |
+
uses: hoverkraft-tech/[email protected]
|
59 |
+
with:
|
60 |
+
compose-file: |
|
61 |
+
docker/docker-compose.yaml
|
62 |
+
services: |
|
63 |
+
weaviate
|
64 |
+
qdrant
|
65 |
+
couchbase-server
|
66 |
+
etcd
|
67 |
+
minio
|
68 |
+
milvus-standalone
|
69 |
+
pgvecto-rs
|
70 |
+
pgvector
|
71 |
+
chroma
|
72 |
+
elasticsearch
|
73 |
+
|
74 |
+
- name: Test Vector Stores
|
75 |
+
run: poetry run -C api bash dev/pytest/pytest_vdb.sh
|
.github/workflows/web-tests.yml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Web Tests
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
paths:
|
8 |
+
- web/**
|
9 |
+
|
10 |
+
concurrency:
|
11 |
+
group: web-tests-${{ github.head_ref || github.run_id }}
|
12 |
+
cancel-in-progress: true
|
13 |
+
|
14 |
+
jobs:
|
15 |
+
test:
|
16 |
+
name: Web Tests
|
17 |
+
runs-on: ubuntu-latest
|
18 |
+
defaults:
|
19 |
+
run:
|
20 |
+
working-directory: ./web
|
21 |
+
|
22 |
+
steps:
|
23 |
+
- name: Checkout code
|
24 |
+
uses: actions/checkout@v4
|
25 |
+
|
26 |
+
- name: Check changed files
|
27 |
+
id: changed-files
|
28 |
+
uses: tj-actions/changed-files@v45
|
29 |
+
with:
|
30 |
+
files: web/**
|
31 |
+
|
32 |
+
- name: Setup Node.js
|
33 |
+
uses: actions/setup-node@v4
|
34 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
35 |
+
with:
|
36 |
+
node-version: 20
|
37 |
+
cache: yarn
|
38 |
+
cache-dependency-path: ./web/package.json
|
39 |
+
|
40 |
+
- name: Install dependencies
|
41 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
42 |
+
run: yarn install --frozen-lockfile
|
43 |
+
|
44 |
+
- name: Run tests
|
45 |
+
if: steps.changed-files.outputs.any_changed == 'true'
|
46 |
+
run: yarn test
|
.gitignore
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
pip-wheel-metadata/
|
24 |
+
share/python-wheels/
|
25 |
+
*.egg-info/
|
26 |
+
.installed.cfg
|
27 |
+
*.egg
|
28 |
+
MANIFEST
|
29 |
+
|
30 |
+
# PyInstaller
|
31 |
+
# Usually these files are written by a python script from a template
|
32 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
33 |
+
*.manifest
|
34 |
+
*.spec
|
35 |
+
|
36 |
+
# Installer logs
|
37 |
+
pip-log.txt
|
38 |
+
pip-delete-this-directory.txt
|
39 |
+
|
40 |
+
# Unit test / coverage reports
|
41 |
+
htmlcov/
|
42 |
+
.tox/
|
43 |
+
.nox/
|
44 |
+
.coverage
|
45 |
+
.coverage.*
|
46 |
+
.cache
|
47 |
+
nosetests.xml
|
48 |
+
coverage.xml
|
49 |
+
*.cover
|
50 |
+
*.py,cover
|
51 |
+
.hypothesis/
|
52 |
+
.pytest_cache/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
target/
|
76 |
+
|
77 |
+
# Jupyter Notebook
|
78 |
+
.ipynb_checkpoints
|
79 |
+
|
80 |
+
# IPython
|
81 |
+
profile_default/
|
82 |
+
ipython_config.py
|
83 |
+
|
84 |
+
# pyenv
|
85 |
+
.python-version
|
86 |
+
|
87 |
+
# pipenv
|
88 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
89 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
90 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
91 |
+
# install all needed dependencies.
|
92 |
+
#Pipfile.lock
|
93 |
+
|
94 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
95 |
+
__pypackages__/
|
96 |
+
|
97 |
+
# Celery stuff
|
98 |
+
celerybeat-schedule
|
99 |
+
celerybeat.pid
|
100 |
+
|
101 |
+
# SageMath parsed files
|
102 |
+
*.sage.py
|
103 |
+
|
104 |
+
# Environments
|
105 |
+
.env
|
106 |
+
.venv
|
107 |
+
env/
|
108 |
+
venv/
|
109 |
+
ENV/
|
110 |
+
env.bak/
|
111 |
+
venv.bak/
|
112 |
+
.conda/
|
113 |
+
|
114 |
+
# Spyder project settings
|
115 |
+
.spyderproject
|
116 |
+
.spyproject
|
117 |
+
|
118 |
+
# Rope project settings
|
119 |
+
.ropeproject
|
120 |
+
|
121 |
+
# mkdocs documentation
|
122 |
+
/site
|
123 |
+
|
124 |
+
# mypy
|
125 |
+
.mypy_cache/
|
126 |
+
.dmypy.json
|
127 |
+
dmypy.json
|
128 |
+
|
129 |
+
# Pyre type checker
|
130 |
+
.pyre/
|
131 |
+
.idea/'
|
132 |
+
|
133 |
+
.DS_Store
|
134 |
+
web/.vscode/settings.json
|
135 |
+
|
136 |
+
# Intellij IDEA Files
|
137 |
+
.idea/*
|
138 |
+
!.idea/vcs.xml
|
139 |
+
!.idea/icon.png
|
140 |
+
.ideaDataSources/
|
141 |
+
*.iml
|
142 |
+
api/.idea
|
143 |
+
|
144 |
+
api/.env
|
145 |
+
api/storage/*
|
146 |
+
|
147 |
+
docker-legacy/volumes/app/storage/*
|
148 |
+
docker-legacy/volumes/db/data/*
|
149 |
+
docker-legacy/volumes/redis/data/*
|
150 |
+
docker-legacy/volumes/weaviate/*
|
151 |
+
docker-legacy/volumes/qdrant/*
|
152 |
+
docker-legacy/volumes/etcd/*
|
153 |
+
docker-legacy/volumes/minio/*
|
154 |
+
docker-legacy/volumes/milvus/*
|
155 |
+
docker-legacy/volumes/chroma/*
|
156 |
+
docker-legacy/volumes/opensearch/data/*
|
157 |
+
docker-legacy/volumes/pgvectors/data/*
|
158 |
+
docker-legacy/volumes/pgvector/data/*
|
159 |
+
|
160 |
+
docker/volumes/app/storage/*
|
161 |
+
docker/volumes/certbot/*
|
162 |
+
docker/volumes/db/data/*
|
163 |
+
docker/volumes/redis/data/*
|
164 |
+
docker/volumes/weaviate/*
|
165 |
+
docker/volumes/qdrant/*
|
166 |
+
docker/volumes/etcd/*
|
167 |
+
docker/volumes/minio/*
|
168 |
+
docker/volumes/milvus/*
|
169 |
+
docker/volumes/chroma/*
|
170 |
+
docker/volumes/opensearch/data/*
|
171 |
+
docker/volumes/myscale/data/*
|
172 |
+
docker/volumes/myscale/log/*
|
173 |
+
docker/volumes/unstructured/*
|
174 |
+
docker/volumes/pgvector/data/*
|
175 |
+
docker/volumes/pgvecto_rs/data/*
|
176 |
+
docker/volumes/couchbase/*
|
177 |
+
docker/volumes/oceanbase/*
|
178 |
+
|
179 |
+
docker/nginx/conf.d/default.conf
|
180 |
+
docker/nginx/ssl/*
|
181 |
+
!docker/nginx/ssl/.gitkeep
|
182 |
+
docker/middleware.env
|
183 |
+
|
184 |
+
sdks/python-client/build
|
185 |
+
sdks/python-client/dist
|
186 |
+
sdks/python-client/dify_client.egg-info
|
187 |
+
|
188 |
+
.vscode/*
|
189 |
+
!.vscode/launch.json
|
190 |
+
pyrightconfig.json
|
191 |
+
api/.vscode
|
192 |
+
|
193 |
+
.idea/
|
194 |
+
.vscode
|
AUTHORS
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
nite-knite
|
2 |
+
goocarlos
|
3 |
+
crazywoola
|
4 |
+
iamjoel
|
5 |
+
idsong
|
6 |
+
takatost
|
CONTRIBUTING.md
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
So you're looking to contribute to Dify - that's awesome, we can't wait to see what you do. As a startup with limited headcount and funding, we have grand ambitions to design the most intuitive workflow for building and managing LLM applications. Any help from the community counts, truly.
|
2 |
+
|
3 |
+
We need to be nimble and ship fast given where we are, but we also want to make sure that contributors like you get as smooth an experience at contributing as possible. We've assembled this contribution guide for that purpose, aiming at getting you familiarized with the codebase & how we work with contributors, so you could quickly jump to the fun part.
|
4 |
+
|
5 |
+
This guide, like Dify itself, is a constant work in progress. We highly appreciate your understanding if at times it lags behind the actual project, and welcome any feedback for us to improve.
|
6 |
+
|
7 |
+
In terms of licensing, please take a minute to read our short [License and Contributor Agreement](./LICENSE). The community also adheres to the [code of conduct](https://github.com/langgenius/.github/blob/main/CODE_OF_CONDUCT.md).
|
8 |
+
|
9 |
+
## Before you jump in
|
10 |
+
|
11 |
+
[Find](https://github.com/langgenius/dify/issues?q=is:issue+is:open) an existing issue, or [open](https://github.com/langgenius/dify/issues/new/choose) a new one. We categorize issues into 2 types:
|
12 |
+
|
13 |
+
### Feature requests:
|
14 |
+
|
15 |
+
* If you're opening a new feature request, we'd like you to explain what the proposed feature achieves, and include as much context as possible. [@perzeusss](https://github.com/perzeuss) has made a solid [Feature Request Copilot](https://udify.app/chat/MK2kVSnw1gakVwMX) that helps you draft out your needs. Feel free to give it a try.
|
16 |
+
|
17 |
+
* If you want to pick one up from the existing issues, simply drop a comment below it saying so.
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
A team member working in the related direction will be looped in. If all looks good, they will give the go-ahead for you to start coding. We ask that you hold off working on the feature until then, so none of your work goes to waste should we propose changes.
|
22 |
+
|
23 |
+
Depending on whichever area the proposed feature falls under, you might talk to different team members. Here's rundown of the areas each our team members are working on at the moment:
|
24 |
+
|
25 |
+
| Member | Scope |
|
26 |
+
| ------------------------------------------------------------ | ---------------------------------------------------- |
|
27 |
+
| [@yeuoly](https://github.com/Yeuoly) | Architecting Agents |
|
28 |
+
| [@jyong](https://github.com/JohnJyong) | RAG pipeline design |
|
29 |
+
| [@GarfieldDai](https://github.com/GarfieldDai) | Building workflow orchestrations |
|
30 |
+
| [@iamjoel](https://github.com/iamjoel) & [@zxhlyh](https://github.com/zxhlyh) | Making our frontend a breeze to use |
|
31 |
+
| [@guchenhe](https://github.com/guchenhe) & [@crazywoola](https://github.com/crazywoola) | Developer experience, points of contact for anything |
|
32 |
+
| [@takatost](https://github.com/takatost) | Overall product direction and architecture |
|
33 |
+
|
34 |
+
How we prioritize:
|
35 |
+
|
36 |
+
| Feature Type | Priority |
|
37 |
+
| ------------------------------------------------------------ | --------------- |
|
38 |
+
| High-Priority Features as being labeled by a team member | High Priority |
|
39 |
+
| Popular feature requests from our [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Medium Priority |
|
40 |
+
| Non-core features and minor enhancements | Low Priority |
|
41 |
+
| Valuable but not immediate | Future-Feature |
|
42 |
+
|
43 |
+
### Anything else (e.g. bug report, performance optimization, typo correction):
|
44 |
+
|
45 |
+
* Start coding right away.
|
46 |
+
|
47 |
+
How we prioritize:
|
48 |
+
|
49 |
+
| Issue Type | Priority |
|
50 |
+
| ------------------------------------------------------------ | --------------- |
|
51 |
+
| Bugs in core functions (cannot login, applications not working, security loopholes) | Critical |
|
52 |
+
| Non-critical bugs, performance boosts | Medium Priority |
|
53 |
+
| Minor fixes (typos, confusing but working UI) | Low Priority |
|
54 |
+
|
55 |
+
|
56 |
+
## Installing
|
57 |
+
|
58 |
+
Here are the steps to set up Dify for development:
|
59 |
+
|
60 |
+
### 1. Fork this repository
|
61 |
+
|
62 |
+
### 2. Clone the repo
|
63 |
+
|
64 |
+
Clone the forked repository from your terminal:
|
65 |
+
|
66 |
+
```
|
67 |
+
git clone [email protected]:<github_username>/dify.git
|
68 |
+
```
|
69 |
+
|
70 |
+
### 3. Verify dependencies
|
71 |
+
|
72 |
+
Dify requires the following dependencies to build, make sure they're installed on your system:
|
73 |
+
|
74 |
+
- [Docker](https://www.docker.com/)
|
75 |
+
- [Docker Compose](https://docs.docker.com/compose/install/)
|
76 |
+
- [Node.js v18.x (LTS)](http://nodejs.org)
|
77 |
+
- [npm](https://www.npmjs.com/) version 8.x.x or [Yarn](https://yarnpkg.com/)
|
78 |
+
- [Python](https://www.python.org/) version 3.10.x
|
79 |
+
|
80 |
+
### 4. Installations
|
81 |
+
|
82 |
+
Dify is composed of a backend and a frontend. Navigate to the backend directory by `cd api/`, then follow the [Backend README](api/README.md) to install it. In a separate terminal, navigate to the frontend directory by `cd web/`, then follow the [Frontend README](web/README.md) to install.
|
83 |
+
|
84 |
+
Check the [installation FAQ](https://docs.dify.ai/learn-more/faq/install-faq) for a list of common issues and steps to troubleshoot.
|
85 |
+
|
86 |
+
### 5. Visit dify in your browser
|
87 |
+
|
88 |
+
To validate your set up, head over to [http://localhost:3000](http://localhost:3000) (the default, or your self-configured URL and port) in your browser. You should now see Dify up and running.
|
89 |
+
|
90 |
+
## Developing
|
91 |
+
|
92 |
+
If you are adding a model provider, [this guide](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/README.md) is for you.
|
93 |
+
|
94 |
+
If you are adding a tool provider to Agent or Workflow, [this guide](./api/core/tools/README.md) is for you.
|
95 |
+
|
96 |
+
To help you quickly navigate where your contribution fits, a brief, annotated outline of Dify's backend & frontend is as follows:
|
97 |
+
|
98 |
+
### Backend
|
99 |
+
|
100 |
+
Dify’s backend is written in Python using [Flask](https://flask.palletsprojects.com/en/3.0.x/). It uses [SQLAlchemy](https://www.sqlalchemy.org/) for ORM and [Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) for task queueing. Authorization logic goes via Flask-login.
|
101 |
+
|
102 |
+
```
|
103 |
+
[api/]
|
104 |
+
├── constants // Constant settings used throughout code base.
|
105 |
+
├── controllers // API route definitions and request handling logic.
|
106 |
+
├── core // Core application orchestration, model integrations, and tools.
|
107 |
+
├── docker // Docker & containerization related configurations.
|
108 |
+
├── events // Event handling and processing
|
109 |
+
├── extensions // Extensions with 3rd party frameworks/platforms.
|
110 |
+
├── fields // field definitions for serialization/marshalling.
|
111 |
+
├── libs // Reusable libraries and helpers.
|
112 |
+
├── migrations // Scripts for database migration.
|
113 |
+
├── models // Database models & schema definitions.
|
114 |
+
├── services // Specifies business logic.
|
115 |
+
├── storage // Private key storage.
|
116 |
+
├── tasks // Handling of async tasks and background jobs.
|
117 |
+
└── tests
|
118 |
+
```
|
119 |
+
|
120 |
+
### Frontend
|
121 |
+
|
122 |
+
The website is bootstrapped on [Next.js](https://nextjs.org/) boilerplate in Typescript and uses [Tailwind CSS](https://tailwindcss.com/) for styling. [React-i18next](https://react.i18next.com/) is used for internationalization.
|
123 |
+
|
124 |
+
```
|
125 |
+
[web/]
|
126 |
+
├── app // layouts, pages, and components
|
127 |
+
│ ├── (commonLayout) // common layout used throughout the app
|
128 |
+
│ ├── (shareLayout) // layouts specifically shared across token-specific sessions
|
129 |
+
│ ├── activate // activate page
|
130 |
+
│ ├── components // shared by pages and layouts
|
131 |
+
│ ├── install // install page
|
132 |
+
│ ├── signin // signin page
|
133 |
+
│ └── styles // globally shared styles
|
134 |
+
├── assets // Static assets
|
135 |
+
├── bin // scripts ran at build step
|
136 |
+
├── config // adjustable settings and options
|
137 |
+
├── context // shared contexts used by different portions of the app
|
138 |
+
├── dictionaries // Language-specific translate files
|
139 |
+
├── docker // container configurations
|
140 |
+
├── hooks // Reusable hooks
|
141 |
+
├── i18n // Internationalization configuration
|
142 |
+
├── models // describes data models & shapes of API responses
|
143 |
+
├── public // meta assets like favicon
|
144 |
+
├── service // specifies shapes of API actions
|
145 |
+
├── test
|
146 |
+
├── types // descriptions of function params and return values
|
147 |
+
└── utils // Shared utility functions
|
148 |
+
```
|
149 |
+
|
150 |
+
## Submitting your PR
|
151 |
+
|
152 |
+
At last, time to open a pull request (PR) to our repo. For major features, we first merge them into the `deploy/dev` branch for testing, before they go into the `main` branch. If you run into issues like merge conflicts or don't know how to open a pull request, check out [GitHub's pull request tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests).
|
153 |
+
|
154 |
+
And that's it! Once your PR is merged, you will be featured as a contributor in our [README](https://github.com/langgenius/dify/blob/main/README.md).
|
155 |
+
|
156 |
+
## Getting Help
|
157 |
+
|
158 |
+
If you ever get stuck or got a burning question while contributing, simply shoot your queries our way via the related GitHub issue, or hop onto our [Discord](https://discord.gg/8Tpq4AcN9c) for a quick chat.
|
CONTRIBUTING_CN.md
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
所以你想为 Dify 做贡献 - 这太棒了,我们迫不及待地想看到你的贡献。作为一家人员和资金有限的初创公司,我们有着雄心勃勃的目标,希望设计出最直观的工作流程来构建和管理 LLM 应用程序。社区的任何帮助都是宝贵的。
|
2 |
+
|
3 |
+
考虑到我们的现状,我们需要灵活快速地交付,但我们也希望确保像你这样的贡献者在贡献过程中获得尽可能顺畅的体验。我们为此编写了这份贡献指南,旨在让你熟悉代码库和我们与贡献者的合作方式,以便你能快速进入有趣的部分。
|
4 |
+
|
5 |
+
这份指南,就像 Dify 本身一样,是一个不断改进的工作。如果有时它落后于实际项目,我们非常感谢你的理解,并欢迎提供任何反馈以供我们改进。
|
6 |
+
|
7 |
+
在许可方面,请花一分钟阅读我们简短的 [许可证和贡献者协议](./LICENSE)。社区还遵守 [行为准则](https://github.com/langgenius/.github/blob/main/CODE_OF_CONDUCT.md)。
|
8 |
+
|
9 |
+
## 在开始之前
|
10 |
+
|
11 |
+
[查找](https://github.com/langgenius/dify/issues?q=is:issue+is:open)现有问题,或 [创建](https://github.com/langgenius/dify/issues/new/choose) 一个新问题。我们将问题分为两类:
|
12 |
+
|
13 |
+
### 功能请求:
|
14 |
+
|
15 |
+
* 如果您要提出新的功能请求,请解释所提议的功能的目标,并尽可能提供详细的上下文。[@perzeusss](https://github.com/perzeuss) 制作了一个很好的 [功能请求助手](https://udify.app/chat/MK2kVSnw1gakVwMX),可以帮助您起草需求。随时尝试一下。
|
16 |
+
|
17 |
+
* 如果您想从现有问题中选择一个,请在其下方留下评论表示您的意愿。
|
18 |
+
|
19 |
+
相关方向的团队成员将参与其中。如果一切顺利,他们将批准您开始编码。在此之前,请不要开始工作,以免我们提出更改导致您的工作付诸东流。
|
20 |
+
|
21 |
+
根据所提议的功能所属的领域不同,您可能需要与不同的团队成员交流。以下是我们团队成员目前正在从事的各个领域的概述:
|
22 |
+
|
23 |
+
| 团队成员 | 工作范围 |
|
24 |
+
| ------------------------------------------------------------ | ---------------------------------------------------- |
|
25 |
+
| [@yeuoly](https://github.com/Yeuoly) | 架构 Agents |
|
26 |
+
| [@jyong](https://github.com/JohnJyong) | RAG 流水线设计 |
|
27 |
+
| [@GarfieldDai](https://github.com/GarfieldDai) | 构建 workflow 编排 |
|
28 |
+
| [@iamjoel](https://github.com/iamjoel) & [@zxhlyh](https://github.com/zxhlyh) | 让我们的前端更易用 |
|
29 |
+
| [@guchenhe](https://github.com/guchenhe) & [@crazywoola](https://github.com/crazywoola) | 开发人员体验, 综合事项联系人 |
|
30 |
+
| [@takatost](https://github.com/takatost) | 产品整体方向和架构 |
|
31 |
+
|
32 |
+
事项优先级:
|
33 |
+
|
34 |
+
| 功能类型 | 优先级 |
|
35 |
+
| ------------------------------------------------------------ | --------------- |
|
36 |
+
| 被团队成员标记为高优先级的功能 | 高优先级 |
|
37 |
+
| 在 [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks) 内反馈的常见功能请求 | 中等优先级 |
|
38 |
+
| 非核心功能和小幅改进 | 低优先级 |
|
39 |
+
| 有价值但不紧急 | 未来功能 |
|
40 |
+
|
41 |
+
### 其他任何事情(例如 bug 报告、性能优化、拼写错误更正):
|
42 |
+
* 立即开始编码。
|
43 |
+
|
44 |
+
事项优先级:
|
45 |
+
|
46 |
+
| Issue 类型 | 优先级 |
|
47 |
+
| ------------------------------------------------------------ | --------------- |
|
48 |
+
| 核心功能的 Bugs(例如无法登录、应用无法工作、安全漏洞) | 紧急 |
|
49 |
+
| 非紧急 bugs, 性能提升 | 中等优先级 |
|
50 |
+
| 小幅修复(错别字, 能正常工作但存在误导的 UI) | 低优先级 |
|
51 |
+
|
52 |
+
## 安装
|
53 |
+
|
54 |
+
以下是设置 Dify 进行开发的步骤:
|
55 |
+
|
56 |
+
### 1. Fork 该仓库
|
57 |
+
|
58 |
+
### 2. 克隆仓库
|
59 |
+
|
60 |
+
从终端克隆代码仓库:
|
61 |
+
|
62 |
+
```
|
63 |
+
git clone [email protected]:<github_username>/dify.git
|
64 |
+
```
|
65 |
+
|
66 |
+
### 3. 验证依赖项
|
67 |
+
|
68 |
+
Dify 依赖以下工具和库:
|
69 |
+
|
70 |
+
- [Docker](https://www.docker.com/)
|
71 |
+
- [Docker Compose](https://docs.docker.com/compose/install/)
|
72 |
+
- [Node.js v18.x (LTS)](http://nodejs.org)
|
73 |
+
- [npm](https://www.npmjs.com/) version 8.x.x or [Yarn](https://yarnpkg.com/)
|
74 |
+
- [Python](https://www.python.org/) version 3.10.x
|
75 |
+
|
76 |
+
### 4. 安装
|
77 |
+
|
78 |
+
Dify 由后端和前端组成。通过 `cd api/` 导航到后端目录,然后按照 [后端 README](api/README.md) 进行安装。在另一个终端中,通过 `cd web/` 导航到前端目录,然后按照 [前端 README](web/README.md) 进行安装。
|
79 |
+
|
80 |
+
查看 [安装常见问题解答](https://docs.dify.ai/v/zh-hans/learn-more/faq/install-faq) 以获取常见问题列表和故障排除步骤。
|
81 |
+
|
82 |
+
### 5. 在浏览器中访问 Dify
|
83 |
+
|
84 |
+
为了验证您的设置,打开浏览器并访问 [http://localhost:3000](http://localhost:3000)(默认或您自定义的 URL 和端口)。现在您应该看到 Dify 正在运行。
|
85 |
+
|
86 |
+
## 开发
|
87 |
+
|
88 |
+
如果您要添加模型提供程序,请参考 [此指南](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/README.md)。
|
89 |
+
|
90 |
+
如果您要向 Agent 或 Workflow 添加工具提供程序,请参考 [此指南](./api/core/tools/README.md)。
|
91 |
+
|
92 |
+
为了帮助您快速了解您的贡献在哪个部分,以下是 Dify 后端和前端的简要注释大纲:
|
93 |
+
|
94 |
+
### 后端
|
95 |
+
|
96 |
+
Dify 的后端使用 Python 编写,使用 [Flask](https://flask.palletsprojects.com/en/3.0.x/) 框架。它使用 [SQLAlchemy](https://www.sqlalchemy.org/) 作为 ORM,使用 [Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) 作为任务队列。授权逻辑通过 Flask-login 进行处理。
|
97 |
+
|
98 |
+
```
|
99 |
+
[api/]
|
100 |
+
├── constants // 用于整个代码库的常量设置。
|
101 |
+
├── controllers // API 路由定义和请求处理逻辑。
|
102 |
+
├── core // 核心应用编排、模型集成和工具。
|
103 |
+
├── docker // Docker 和容器化相关配置。
|
104 |
+
├── events // 事件处理和处理。
|
105 |
+
├── extensions // 与第三方框架/平台的扩展。
|
106 |
+
├── fields // 用于序列化/封装的字段定义。
|
107 |
+
├── libs // 可重用的库和助手。
|
108 |
+
├── migrations // 数据库迁移脚本。
|
109 |
+
├── models // 数据库模型和架构定义。
|
110 |
+
├── services // 指定业务逻辑。
|
111 |
+
├── storage // 私钥存储。
|
112 |
+
├── tasks // 异步任务和后台作业的处理。
|
113 |
+
└── tests
|
114 |
+
```
|
115 |
+
|
116 |
+
### 前端
|
117 |
+
|
118 |
+
该网站使用基于 Typescript 的 [Next.js](https://nextjs.org/) 模板进行引导,并使用 [Tailwind CSS](https://tailwindcss.com/) 进行样式设计。[React-i18next](https://react.i18next.com/) 用于国际化。
|
119 |
+
|
120 |
+
```
|
121 |
+
[web/]
|
122 |
+
├── app // 布局、页面和组件
|
123 |
+
│ ├── (commonLayout) // 整个应用通用的布局
|
124 |
+
│ ├── (shareLayout) // 在特定会话中共享的布局
|
125 |
+
│ ├── activate // 激活页面
|
126 |
+
│ ├── components // 页面和布局共享的组件
|
127 |
+
│ ├── install // 安装页面
|
128 |
+
│ ├── signin // 登录页面
|
129 |
+
│ └── styles // 全局共享的样式
|
130 |
+
├── assets // 静态资源
|
131 |
+
├── bin // 构建步骤运行的脚本
|
132 |
+
├── config // 可调整的设置和选项
|
133 |
+
├── context // 应用中不同部分使用的共享上下文
|
134 |
+
├── dictionaries // 语言特定的翻译文件
|
135 |
+
├── docker // 容器配置
|
136 |
+
├── hooks // 可重用的钩子
|
137 |
+
├── i18n // 国际化配置
|
138 |
+
├── models // 描述数据模型和 API 响应的形状
|
139 |
+
├── public // 如 favicon 等元资源
|
140 |
+
├── service // 定义 API 操作的形状
|
141 |
+
├── test
|
142 |
+
├── types // 函数参数和返回值的描述
|
143 |
+
└── utils // 共享的实用函数
|
144 |
+
```
|
145 |
+
|
146 |
+
## 提交你的 PR
|
147 |
+
|
148 |
+
最后,是时候向我们的仓库提交一个拉取请求(PR)了。对于重要的功能,我们首先将它们合并到 `deploy/dev` 分支进行测试,然后再合并到 `main` 分支。如果你遇到合并冲突或者不知道如何提交拉取请求的问题,请查看 [GitHub 的拉取请求教程](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests)。
|
149 |
+
|
150 |
+
就是这样!一旦你的 PR 被合并,你将成为我们 [README](https://github.com/langgenius/dify/blob/main/README.md) 中的贡献者。
|
151 |
+
|
152 |
+
## 获取帮助
|
153 |
+
|
154 |
+
如果你在贡献过程中遇到困难或者有任何问题,可以通过相关的 GitHub 问题提出你的疑问,或者加入我们的 [Discord](https://discord.gg/8Tpq4AcN9c) 进行快速交流。
|
CONTRIBUTING_JA.md
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Dify にコントリビュートしたいとお考えなのですね。それは素晴らしいことです。
|
2 |
+
私たちは、LLM アプリケーションの構築と管理のための最も直感的なワークフローを設計するという壮大な野望を持っています。人数も資金も限られている新興企業として、コミュニティからの支援は本当に重要です。
|
3 |
+
|
4 |
+
私たちは現状を鑑み、機敏かつ迅速に開発をする必要がありますが、同時にあなた様のようなコントリビューターの方々に、可能な限りスムーズな貢献体験をしていただきたいと思っています。そのためにこのコントリビュートガイドを作成しました。
|
5 |
+
コードベースやコントリビュータの方々と私たちがどのように仕事をしているのかに慣れていただき、楽しいパートにすぐに飛び込めるようにすることが目的です。
|
6 |
+
|
7 |
+
このガイドは Dify そのものと同様に、継続的に改善されています。実際のプロジェクトに遅れをとることがあるかもしれませんが、ご理解のほどよろしくお願いいたします。
|
8 |
+
|
9 |
+
ライセンスに関しては、私たちの短い[ライセンスおよびコントリビューター規約](./LICENSE)をお読みください。また、コミュニティは[行動規範](https://github.com/langgenius/.github/blob/main/CODE_OF_CONDUCT.md)を遵守しています。
|
10 |
+
|
11 |
+
## 飛び込む前に
|
12 |
+
|
13 |
+
[既存の Issue](https://github.com/langgenius/dify/issues?q=is:issue+is:open) を探すか、[新しい Issue](https://github.com/langgenius/dify/issues/new/choose) を作成してください。私たちは Issue を 2 つのタイプに分類しています。
|
14 |
+
|
15 |
+
### 機能リクエスト
|
16 |
+
|
17 |
+
* 新しい機能要望を出す場合は、提案する機能が何を実現するものなのかを説明し、可能な限り多くのコンテキストを含めてください。[@perzeusss](https://github.com/perzeuss)は、あなた様の要望を書き出すのに役立つ [Feature Request Copilot](https://udify.app/chat/MK2kVSnw1gakVwMX) を作ってくれました。気軽に試してみてください。
|
18 |
+
|
19 |
+
* 既存の課題から 1 つ選びたい場合は、その下にコメントを書いてください。
|
20 |
+
|
21 |
+
関連する方向で作業しているチームメンバーが参加します。すべてが良好であれば、コーディングを開始する許可が与えられます。私たちが変更を提案した場合にあなた様の作業が無駄になることがないよう、それまでこの機能の作業を控えていただくようお願いいたします。
|
22 |
+
|
23 |
+
提案された機能がどの分野に属するかによって、あなた様は異なるチーム・メンバーと話をするかもしれません。以下は、各チームメンバーが現在取り組んでいる分野の概要です。
|
24 |
+
|
25 |
+
| Member | Scope |
|
26 |
+
| --------------------------------------------------------------------------------------- | ------------------------------------ |
|
27 |
+
| [@yeuoly](https://github.com/Yeuoly) | エージェントアーキテクチャ |
|
28 |
+
| [@jyong](https://github.com/JohnJyong) | RAG パイプライン設計 |
|
29 |
+
| [@GarfieldDai](https://github.com/GarfieldDai) | workflow orchestrations の構築 |
|
30 |
+
| [@iamjoel](https://github.com/iamjoel) & [@zxhlyh](https://github.com/zxhlyh) | フロントエンドを使いやすくする |
|
31 |
+
| [@guchenhe](https://github.com/guchenhe) & [@crazywoola](https://github.com/crazywoola) | 開発者体験、何でも相談できる窓口 |
|
32 |
+
| [@takatost](https://github.com/takatost) | 全体的な製品の方向性とアーキテクチャ |
|
33 |
+
|
34 |
+
優先順位の付け方:
|
35 |
+
|
36 |
+
| Feature Type | Priority |
|
37 |
+
| --------------------------------------------------------------------------------------------------------------------- | --------------- |
|
38 |
+
| チームメンバーによってラベル付けされた優先度の高い機能 | High Priority |
|
39 |
+
| [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks)の人気の機能リクエスト | Medium Priority |
|
40 |
+
| 非コア機能とマイナーな機能強化 | Low Priority |
|
41 |
+
| 価値はあるが即効性はない | Future-Feature |
|
42 |
+
|
43 |
+
### その他 (バグレポート、パフォ���マンスの最適化、誤字の修正など)
|
44 |
+
|
45 |
+
* すぐにコーディングを始めてください
|
46 |
+
|
47 |
+
優先順位の付け方:
|
48 |
+
|
49 |
+
| Issue Type | Priority |
|
50 |
+
| -------------------------------------------------------------------------------------- | --------------- |
|
51 |
+
| コア機能のバグ(ログインできない、アプリケーションが動作しない、セキュリティの抜け穴) | Critical |
|
52 |
+
| 致命的でないバグ、パフォーマンス向上 | Medium Priority |
|
53 |
+
| 細かな修正(誤字脱字、機能はするが分かりにくい UI) | Low Priority |
|
54 |
+
|
55 |
+
## インストール
|
56 |
+
|
57 |
+
以下の手順で 、Difyのセットアップをしてください。
|
58 |
+
|
59 |
+
### 1. このリポジトリをフォークする
|
60 |
+
|
61 |
+
### 2. リポジトリをクローンする
|
62 |
+
|
63 |
+
フォークしたリポジトリをターミナルからクローンします。
|
64 |
+
|
65 |
+
```
|
66 |
+
git clone [email protected]:<github_username>/dify.git
|
67 |
+
```
|
68 |
+
|
69 |
+
### 3. 依存関係の確認
|
70 |
+
|
71 |
+
Dify を構築するには次の依存関係が必要です。それらがシステムにインストールされていることを確認してください。
|
72 |
+
|
73 |
+
- [Docker](https://www.docker.com/)
|
74 |
+
- [Docker Compose](https://docs.docker.com/compose/install/)
|
75 |
+
- [Node.js v18.x (LTS)](http://nodejs.org)
|
76 |
+
- [npm](https://www.npmjs.com/) version 8.x.x or [Yarn](https://yarnpkg.com/)
|
77 |
+
- [Python](https://www.python.org/) version 3.10.x
|
78 |
+
|
79 |
+
### 4. インストール
|
80 |
+
|
81 |
+
Dify はバックエンドとフロントエンドから構成されています。
|
82 |
+
まず`cd api/`でバックエンドのディレクトリに移動し、[Backend README](api/README.md)に従ってインストールします。
|
83 |
+
次に別のターミナルで、`cd web/`でフロントエンドのディレクトリに移動し、[Frontend README](web/README.md)に従ってインストールしてください。
|
84 |
+
|
85 |
+
よくある問題とトラブルシューティングの手順については、[installation FAQ](https://docs.dify.ai/v/japanese/learn-more/faq/install-faq) を確認してください。
|
86 |
+
|
87 |
+
### 5. ブラウザで dify にアクセスする
|
88 |
+
|
89 |
+
設定を確認するために、ブラウザで[http://localhost:3000](http://localhost:3000)(デフォルト、または自分で設定した URL とポート)にアクセスしてください。Dify が起動して実行中であることが確認できるはずです。
|
90 |
+
|
91 |
+
## 開発中
|
92 |
+
|
93 |
+
モデルプロバイダーを追加する場合は、[このガイド](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/README.md)が役立ちます。
|
94 |
+
|
95 |
+
Agent や Workflow にツールプロバイダーを追加する場合は、[このガイド](./api/core/tools/README.md)が役立ちます。
|
96 |
+
|
97 |
+
Dify のバックエンドとフロントエンドの概要を簡単に説明します。
|
98 |
+
|
99 |
+
### バックエンド
|
100 |
+
|
101 |
+
Dify のバックエンドは[Flask](https://flask.palletsprojects.com/en/3.0.x/)を使って Python で書かれています。ORM には[SQLAlchemy](https://www.sqlalchemy.org/)を、タスクキューには[Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html)を使っています。認証ロジックは Flask-login 経由で行われます。
|
102 |
+
|
103 |
+
```
|
104 |
+
[api/]
|
105 |
+
├── constants // コードベース全体で使用される定数設定
|
106 |
+
├── controllers // APIルート定義とリクエスト処理ロジック
|
107 |
+
├── core // アプリケーションの中核的な管理、モデル統合、およびツール
|
108 |
+
├── docker // Dockerおよびコンテナ関連の設定
|
109 |
+
├── events // イベントのハンドリングと処理
|
110 |
+
├── extensions // 第三者のフレームワーク/プラットフォームとの拡張
|
111 |
+
├── fields // シリアライゼーション/マーシャリング用のフィールド定義
|
112 |
+
├── libs // 再利用可能なライブラリとヘルパー
|
113 |
+
├── migrations // データベースマイグレーションスクリプト
|
114 |
+
├── models // データベースモデルとスキーマ定義
|
115 |
+
├── services // ビジネスロジックの定義
|
116 |
+
├── storage // 秘密鍵の保存
|
117 |
+
├── tasks // 非同期タスクとバックグラウンドジョブの処理
|
118 |
+
└── tests // テスト関連のファイル
|
119 |
+
```
|
120 |
+
|
121 |
+
### フロントエンド
|
122 |
+
|
123 |
+
このウェブサイトは、Typescriptベースの[Next.js](https://nextjs.org/)テンプレートを使ってブートストラップされ、[Tailwind CSS](https://tailwindcss.com/)を使ってスタイリングされています。国際化には[React-i18next](https://react.i18next.com/)を使用しています。
|
124 |
+
|
125 |
+
```
|
126 |
+
[web/]
|
127 |
+
├── app // レイアウト、ページ、コンポーネント
|
128 |
+
│ ├── (commonLayout) // アプリ全体で共通のレイアウト
|
129 |
+
│ ├── (shareLayout) // トークン特有のセッションで共有されるレイアウト
|
130 |
+
│ ├── activate // アクティベートページ
|
131 |
+
│ ├── components // ページやレイアウトで共有されるコンポーネント
|
132 |
+
│ ├── install // インストールページ
|
133 |
+
│ ├── signin // サインインページ
|
134 |
+
│ └── styles // グローバルに共有されるスタイル
|
135 |
+
├── assets // 静的アセット
|
136 |
+
├── bin // ビルドステップで実行されるスクリプト
|
137 |
+
├── config // 調整可能な設定とオプション
|
138 |
+
├── context // アプリの異なる部分で使用される共有コンテキスト
|
139 |
+
├── dictionaries // 言語別の翻訳ファイル
|
140 |
+
├── docker // コンテナ設定
|
141 |
+
├── hooks // 再利用可能なフック
|
142 |
+
├── i18n // 国際化設定
|
143 |
+
├── models // データモデルとAPIレスポンスの形状を記述
|
144 |
+
├── public // ファビコンなどのメタアセット
|
145 |
+
├── service // APIアクションの形状を指定
|
146 |
+
├── test
|
147 |
+
├── types // 関数のパラメータと戻り値の記述
|
148 |
+
└── utils // 共有ユーティリティ関数
|
149 |
+
```
|
150 |
+
|
151 |
+
## PR を投稿する
|
152 |
+
|
153 |
+
いよいよ、私たちのリポジトリにプルリクエスト (PR) を提出する時が来ました。主要な機能については、まず `deploy/dev` ブランチにマージしてテストしてから `main` ブランチにマージします。
|
154 |
+
マージ競合などの問題が発生した場合、またはプル リクエストを開く方法がわからない場合は、[GitHub's pull request tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests) をチェックしてみてください。
|
155 |
+
|
156 |
+
これで完了です!あなた様の PR がマージされると、[README](https://github.com/langgenius/dify/blob/main/README.md) にコントリビューターとして紹介されます。
|
157 |
+
|
158 |
+
## ヘルプを得る
|
159 |
+
|
160 |
+
コントリビュート中に行き詰まったり、疑問が生じたりした場合は、GitHub の関連する issue から質問していただくか、[Discord](https://discord.gg/8Tpq4AcN9c)でチャットしてください。
|
CONTRIBUTING_VI.md
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Thật tuyệt vời khi bạn muốn đóng góp cho Dify! Chúng tôi rất mong chờ được thấy những gì bạn sẽ làm. Là một startup với nguồn nhân lực và tài chính hạn chế, chúng tôi có tham vọng lớn là thiết kế quy trình trực quan nhất để xây dựng và quản lý các ứng dụng LLM. Mọi sự giúp đỡ từ cộng đồng đều rất quý giá đối với chúng tôi.
|
2 |
+
|
3 |
+
Chúng tôi cần linh hoạt và làm việc nhanh chóng, nhưng đồng thời cũng muốn đảm bảo các cộng tác viên như bạn có trải nghiệm đóng góp thuận lợi nhất có thể. Chúng tôi đã tạo ra hướng dẫn đóng góp này nhằm giúp bạn làm quen với codebase và cách chúng tôi làm việc với các cộng tác viên, để bạn có thể nhanh chóng bắt tay vào phần thú vị.
|
4 |
+
|
5 |
+
Hướng dẫn này, cũng như bản thân Dify, đang trong quá trình cải tiến liên tục. Chúng tôi rất cảm kích sự thông cảm của bạn nếu đôi khi nó không theo kịp dự án thực tế, và chúng tôi luôn hoan nghênh mọi phản hồi để cải thiện.
|
6 |
+
|
7 |
+
Về vấn đề cấp phép, xin vui lòng dành chút thời gian đọc qua [Thỏa thuận Cấp phép và Đóng góp](./LICENSE) ngắn gọn của chúng tôi. Cộng đồng cũng tuân thủ [quy tắc ứng xử](https://github.com/langgenius/.github/blob/main/CODE_OF_CONDUCT.md).
|
8 |
+
|
9 |
+
## Trước khi bắt đầu
|
10 |
+
|
11 |
+
[Tìm kiếm](https://github.com/langgenius/dify/issues?q=is:issue+is:open) một vấn đề hiện có, hoặc [tạo mới](https://github.com/langgenius/dify/issues/new/choose) một vấn đề. Chúng tôi phân loại các vấn đề thành 2 loại:
|
12 |
+
|
13 |
+
### Yêu cầu tính năng:
|
14 |
+
|
15 |
+
* Nếu bạn đang tạo một yêu cầu tính năng mới, chúng tôi muốn bạn giải thích tính năng đề xuất sẽ đạt được điều gì và cung cấp càng nhiều thông tin chi tiết càng tốt. [@perzeusss](https://github.com/perzeuss) đã tạo một [Trợ lý Yêu cầu Tính năng](https://udify.app/chat/MK2kVSnw1gakVwMX) rất hữu ích để giúp bạn soạn thảo nhu cầu của mình. Hãy thử dùng nó nhé.
|
16 |
+
|
17 |
+
* Nếu bạn muốn chọn một vấn đề từ danh sách hiện có, chỉ cần để lại bình luận dưới vấn đề đó nói rằng bạn sẽ làm.
|
18 |
+
|
19 |
+
Một thành viên trong nhóm làm việc trong lĩnh vực liên quan sẽ được thông báo. Nếu mọi thứ ổn, họ sẽ cho phép bạn bắt đầu code. Chúng tôi yêu cầu bạn chờ đợi cho đến lúc đó trước khi bắt tay vào làm tính năng, để không lãng phí công sức của bạn nếu chúng tôi đề xuất thay đổi.
|
20 |
+
|
21 |
+
Tùy thuộc vào lĩnh vực mà tính năng đề xuất thuộc về, bạn có thể nói chuyện với các thành viên khác nhau trong nhóm. Dưới đây là danh sách các lĩnh vực mà các thành viên trong nhóm chúng tôi đang làm việc hiện tại:
|
22 |
+
|
23 |
+
| Thành viên | Phạm vi |
|
24 |
+
| ------------------------------------------------------------ | ---------------------------------------------------- |
|
25 |
+
| [@yeuoly](https://github.com/Yeuoly) | Thiết kế kiến trúc Agents |
|
26 |
+
| [@jyong](https://github.com/JohnJyong) | Thiết kế quy trình RAG |
|
27 |
+
| [@GarfieldDai](https://github.com/GarfieldDai) | Xây dựng quy trình làm việc |
|
28 |
+
| [@iamjoel](https://github.com/iamjoel) & [@zxhlyh](https://github.com/zxhlyh) | Làm cho giao diện người dùng dễ sử dụng |
|
29 |
+
| [@guchenhe](https://github.com/guchenhe) & [@crazywoola](https://github.com/crazywoola) | Trải nghiệm nhà phát triển, đầu mối liên hệ cho mọi vấn đề |
|
30 |
+
| [@takatost](https://github.com/takatost) | Định hướng và kiến trúc tổng thể sản phẩm |
|
31 |
+
|
32 |
+
Cách chúng tôi ưu tiên:
|
33 |
+
|
34 |
+
| Loại tính năng | Mức độ ưu tiên |
|
35 |
+
| ------------------------------------------------------------ | -------------- |
|
36 |
+
| Tính năng ưu tiên cao được gắn nhãn bởi thành viên trong nhóm | Ưu tiên cao |
|
37 |
+
| Yêu cầu tính năng phổ biến từ [bảng phản hồi cộng đồng](https://github.com/langgenius/dify/discussions/categories/feedbacks) của chúng tôi | Ưu tiên trung bình |
|
38 |
+
| Tính năng không quan trọng và cải tiến nhỏ | Ưu tiên thấp |
|
39 |
+
| Có giá trị nhưng không cấp bách | Tính năng tương lai |
|
40 |
+
|
41 |
+
### Những vấn đề khác (ví dụ: báo cáo lỗi, tối ưu hiệu suất, sửa lỗi chính tả):
|
42 |
+
|
43 |
+
* Bắt đầu code ngay lập tức.
|
44 |
+
|
45 |
+
Cách chúng tôi ưu tiên:
|
46 |
+
|
47 |
+
| Loại vấn đề | Mức độ ưu tiên |
|
48 |
+
| ------------------------------------------------------------ | -------------- |
|
49 |
+
| Lỗi trong các chức năng chính (không thể đăng nhập, ứng dụng không hoạt động, lỗ hổng bảo mật) | Nghiêm trọng |
|
50 |
+
| Lỗi không quan trọng, cải thiện hiệu suất | Ưu tiên trung bình |
|
51 |
+
| Sửa lỗi nhỏ (lỗi chính tả, giao diện người dùng gây nhầm lẫn nhưng vẫn hoạt động) | Ưu tiên thấp |
|
52 |
+
|
53 |
+
|
54 |
+
## Cài đặt
|
55 |
+
|
56 |
+
Dưới đây là các bước để thiết lập Dify cho việc phát triển:
|
57 |
+
|
58 |
+
### 1. Fork repository này
|
59 |
+
|
60 |
+
### 2. Clone repository
|
61 |
+
|
62 |
+
Clone repository đã fork từ terminal của bạn:
|
63 |
+
|
64 |
+
```
|
65 |
+
git clone [email protected]:<tên_người_dùng_github>/dify.git
|
66 |
+
```
|
67 |
+
|
68 |
+
### 3. Kiểm tra các phụ thuộc
|
69 |
+
|
70 |
+
Dify yêu cầu các phụ thuộc sau để build, hãy đảm bảo chúng đã được cài đặt trên hệ thống của bạn:
|
71 |
+
|
72 |
+
- [Docker](https://www.docker.com/)
|
73 |
+
- [Docker Compose](https://docs.docker.com/compose/install/)
|
74 |
+
- [Node.js v18.x (LTS)](http://nodejs.org)
|
75 |
+
- [npm](https://www.npmjs.com/) phiên bản 8.x.x hoặc [Yarn](https://yarnpkg.com/)
|
76 |
+
- [Python](https://www.python.org/) phiên bản 3.10.x
|
77 |
+
|
78 |
+
### 4. Cài đặt
|
79 |
+
|
80 |
+
Dify bao gồm một backend và một frontend. Đi đến thư mục backend bằng lệnh `cd api/`, sau đó làm theo hướng dẫn trong [README của Backend](api/README.md) để cài đặt. Trong một terminal khác, đi đến thư mục frontend bằng lệnh `cd web/`, sau đó làm theo hướng dẫn trong [README của Frontend](web/README.md) để cài đặt.
|
81 |
+
|
82 |
+
Kiểm tra [FAQ về cài đặt](https://docs.dify.ai/learn-more/faq/install-faq) để xem danh sách các vấn đề thường gặp và các bước khắc phục.
|
83 |
+
|
84 |
+
### 5. Truy cập Dify trong trình duyệt của bạn
|
85 |
+
|
86 |
+
Để xác nhận cài đặt của bạn, hãy truy cập [http://localhost:3000](http://localhost:3000) (địa chỉ mặc định, hoặc URL và cổng bạn đã cấu hình) trong trình duyệt. Bạn sẽ thấy Dify đang chạy.
|
87 |
+
|
88 |
+
## Phát triển
|
89 |
+
|
90 |
+
Nếu bạn đang thêm một nhà cung cấp mô hình, [hướng dẫn này](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/README.md) dành cho bạn.
|
91 |
+
|
92 |
+
Nếu bạn đang thêm một nhà cung cấp công cụ cho Agent hoặc Workflow, [hướng dẫn này](./api/core/tools/README.md) dành cho bạn.
|
93 |
+
|
94 |
+
Để giúp bạn nhanh chóng định hướng phần đóng góp của mình, dưới đây là một bản phác thảo ngắn gọn về cấu trúc backend & frontend của Dify:
|
95 |
+
|
96 |
+
### Backend
|
97 |
+
|
98 |
+
Backend của Dify được viết bằng Python sử dụng [Flask](https://flask.palletsprojects.com/en/3.0.x/). Nó sử dụng [SQLAlchemy](https://www.sqlalchemy.org/) cho ORM và [Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) cho hàng đợi tác vụ. Logic xác thực được thực hiện thông qua Flask-login.
|
99 |
+
|
100 |
+
```
|
101 |
+
[api/]
|
102 |
+
├── constants // Các cài đặt hằng số được sử dụng trong toàn bộ codebase.
|
103 |
+
├── controllers // Định nghĩa các route API và logic xử lý yêu cầu.
|
104 |
+
├── core // Điều phối ứng dụng cốt lõi, tích hợp mô hình và công cụ.
|
105 |
+
├── docker // Cấu hình liên quan đến Docker & containerization.
|
106 |
+
├── events // Xử lý và xử lý sự kiện
|
107 |
+
├── extensions // Mở rộng với các framework/nền tảng bên thứ 3.
|
108 |
+
├── fields // Định nghĩa trường cho serialization/marshalling.
|
109 |
+
├── libs // Thư viện và tiện ích có thể tái sử dụng.
|
110 |
+
├── migrations // Script cho việc di chuyển cơ sở dữ liệu.
|
111 |
+
├── models // Mô hình cơ sở dữ liệu & định nghĩa schema.
|
112 |
+
├── services // Xác định logic nghiệp vụ.
|
113 |
+
├── storage // Lưu trữ khóa riêng tư.
|
114 |
+
├── tasks // Xử lý các tác vụ bất đồng bộ và công việc nền.
|
115 |
+
└── tests
|
116 |
+
```
|
117 |
+
|
118 |
+
### Frontend
|
119 |
+
|
120 |
+
Website được khởi tạo trên boilerplate [Next.js](https://nextjs.org/) bằng Typescript và sử dụng [Tailwind CSS](https://tailwindcss.com/) cho styling. [React-i18next](https://react.i18next.com/) được sử dụng cho việc quốc tế hóa.
|
121 |
+
|
122 |
+
```
|
123 |
+
[web/]
|
124 |
+
├── app // layouts, pages và components
|
125 |
+
│ ├── (commonLayout) // layout chung được sử dụng trong toàn bộ ứng dụng
|
126 |
+
│ ├── (shareLayout) // layouts được chia sẻ cụ thể cho các phiên dựa trên token
|
127 |
+
│ ├── activate // trang kích hoạt
|
128 |
+
│ ├── components // được chia sẻ bởi các trang và layouts
|
129 |
+
│ ├── install // trang cài đặt
|
130 |
+
│ ├── signin // trang đăng nhập
|
131 |
+
│ └── styles // styles được chia sẻ toàn cục
|
132 |
+
├── assets // Tài nguyên tĩnh
|
133 |
+
├── bin // scripts chạy ở bước build
|
134 |
+
├── config // cài đặt và tùy chọn có thể điều chỉnh
|
135 |
+
├── context // contexts được chia sẻ bởi các phần khác nhau của ứng dụng
|
136 |
+
├── dictionaries // File dịch cho từng ngôn ngữ
|
137 |
+
├── docker // cấu hình container
|
138 |
+
├── hooks // Hooks có thể tái sử dụng
|
139 |
+
├── i18n // Cấu hình quốc tế hóa
|
140 |
+
├── models // mô tả các mô hình dữ liệu & hình dạng của phản hồi API
|
141 |
+
├── public // tài nguyên meta như favicon
|
142 |
+
├── service // xác định hình dạng của các hành động API
|
143 |
+
├── test
|
144 |
+
├── types // mô tả các tham số hàm và giá trị trả về
|
145 |
+
└── utils // Các hàm tiện ích được chia sẻ
|
146 |
+
```
|
147 |
+
|
148 |
+
## Gửi PR của bạn
|
149 |
+
|
150 |
+
Cuối cùng, đã đến lúc mở một pull request (PR) đến repository của chúng tôi. Đối với các tính năng lớn, chúng tôi sẽ merge chúng vào nhánh `deploy/dev` để kiểm tra trước khi đưa vào nhánh `main`. Nếu bạn gặp vấn đề như xung đột merge hoặc không biết cách mở pull request, hãy xem [hướng dẫn về pull request của GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests).
|
151 |
+
|
152 |
+
Và thế là xong! Khi PR của bạn được merge, bạn sẽ được giới thiệu là một người đóng góp trong [README](https://github.com/langgenius/dify/blob/main/README.md) của chúng tôi.
|
153 |
+
|
154 |
+
## Nhận trợ giúp
|
155 |
+
|
156 |
+
Nếu bạn gặp khó khăn hoặc có câu hỏi cấp bách trong quá trình đóng góp, hãy đặt câu hỏi của bạn trong vấn đề GitHub liên quan, hoặc tham gia [Discord](https://discord.gg/8Tpq4AcN9c) của chúng tôi để trò chuyện nhanh chóng.
|
LICENSE
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Open Source License
|
2 |
+
|
3 |
+
Dify is licensed under the Apache License 2.0, with the following additional conditions:
|
4 |
+
|
5 |
+
1. Dify may be utilized commercially, including as a backend service for other applications or as an application development platform for enterprises. Should the conditions below be met, a commercial license must be obtained from the producer:
|
6 |
+
|
7 |
+
a. Multi-tenant service: Unless explicitly authorized by Dify in writing, you may not use the Dify source code to operate a multi-tenant environment.
|
8 |
+
- Tenant Definition: Within the context of Dify, one tenant corresponds to one workspace. The workspace provides a separated area for each tenant's data and configurations.
|
9 |
+
|
10 |
+
b. LOGO and copyright information: In the process of using Dify's frontend, you may not remove or modify the LOGO or copyright information in the Dify console or applications. This restriction is inapplicable to uses of Dify that do not involve its frontend.
|
11 |
+
- Frontend Definition: For the purposes of this license, the "frontend" of Dify includes all components located in the `web/` directory when running Dify from the raw source code, or the "web" image when running Dify with Docker.
|
12 |
+
|
13 |
+
Please contact [email protected] by email to inquire about licensing matters.
|
14 |
+
|
15 |
+
2. As a contributor, you should agree that:
|
16 |
+
|
17 |
+
a. The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary.
|
18 |
+
b. Your contributed code may be used for commercial purposes, including but not limited to its cloud business operations.
|
19 |
+
|
20 |
+
Apart from the specific conditions mentioned above, all other rights and restrictions follow the Apache License 2.0. Detailed information about the Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0.
|
21 |
+
|
22 |
+
The interactive design of this product is protected by appearance patent.
|
23 |
+
|
24 |
+
© 2024 LangGenius, Inc.
|
25 |
+
|
26 |
+
|
27 |
+
----------
|
28 |
+
|
29 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
30 |
+
you may not use this file except in compliance with the License.
|
31 |
+
You may obtain a copy of the License at
|
32 |
+
|
33 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
34 |
+
|
35 |
+
Unless required by applicable law or agreed to in writing, software
|
36 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
37 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
38 |
+
See the License for the specific language governing permissions and
|
39 |
+
limitations under the License.
|
Makefile
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Variables
|
2 |
+
DOCKER_REGISTRY=langgenius
|
3 |
+
WEB_IMAGE=$(DOCKER_REGISTRY)/dify-web
|
4 |
+
API_IMAGE=$(DOCKER_REGISTRY)/dify-api
|
5 |
+
VERSION=latest
|
6 |
+
|
7 |
+
# Build Docker images
|
8 |
+
build-web:
|
9 |
+
@echo "Building web Docker image: $(WEB_IMAGE):$(VERSION)..."
|
10 |
+
docker build -t $(WEB_IMAGE):$(VERSION) ./web
|
11 |
+
@echo "Web Docker image built successfully: $(WEB_IMAGE):$(VERSION)"
|
12 |
+
|
13 |
+
build-api:
|
14 |
+
@echo "Building API Docker image: $(API_IMAGE):$(VERSION)..."
|
15 |
+
docker build -t $(API_IMAGE):$(VERSION) ./api
|
16 |
+
@echo "API Docker image built successfully: $(API_IMAGE):$(VERSION)"
|
17 |
+
|
18 |
+
# Push Docker images
|
19 |
+
push-web:
|
20 |
+
@echo "Pushing web Docker image: $(WEB_IMAGE):$(VERSION)..."
|
21 |
+
docker push $(WEB_IMAGE):$(VERSION)
|
22 |
+
@echo "Web Docker image pushed successfully: $(WEB_IMAGE):$(VERSION)"
|
23 |
+
|
24 |
+
push-api:
|
25 |
+
@echo "Pushing API Docker image: $(API_IMAGE):$(VERSION)..."
|
26 |
+
docker push $(API_IMAGE):$(VERSION)
|
27 |
+
@echo "API Docker image pushed successfully: $(API_IMAGE):$(VERSION)"
|
28 |
+
|
29 |
+
# Build all images
|
30 |
+
build-all: build-web build-api
|
31 |
+
|
32 |
+
# Push all images
|
33 |
+
push-all: push-web push-api
|
34 |
+
|
35 |
+
build-push-api: build-api push-api
|
36 |
+
build-push-web: build-web push-web
|
37 |
+
|
38 |
+
# Build and push all images
|
39 |
+
build-push-all: build-all push-all
|
40 |
+
@echo "All Docker images have been built and pushed."
|
41 |
+
|
42 |
+
# Phony targets
|
43 |
+
.PHONY: build-web build-api push-web push-api build-all push-all build-push-all
|
README.md
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
📌 <a href="https://dify.ai/blog/introducing-dify-workflow-file-upload-a-demo-on-ai-podcast">Introducing Dify Workflow File Upload: Recreate Google NotebookLM Podcast</a>
|
5 |
+
</p>
|
6 |
+
|
7 |
+
<p align="center">
|
8 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
9 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Self-hosting</a> ·
|
10 |
+
<a href="https://docs.dify.ai">Documentation</a> ·
|
11 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Enterprise inquiry</a>
|
12 |
+
</p>
|
13 |
+
|
14 |
+
<p align="center">
|
15 |
+
<a href="https://dify.ai" target="_blank">
|
16 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
17 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
18 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
19 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
20 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
21 |
+
alt="chat on Discord"></a>
|
22 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
23 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
24 |
+
alt="follow on X(Twitter)"></a>
|
25 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
26 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
28 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
29 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
30 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
31 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
32 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
33 |
+
</p>
|
34 |
+
|
35 |
+
<p align="center">
|
36 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
37 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
38 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
39 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
40 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
41 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
42 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
43 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
44 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
45 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
46 |
+
</p>
|
47 |
+
|
48 |
+
|
49 |
+
Dify is an open-source LLM app development platform. Its intuitive interface combines agentic AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
|
50 |
+
|
51 |
+
## Quick start
|
52 |
+
> Before installing Dify, make sure your machine meets the following minimum system requirements:
|
53 |
+
>
|
54 |
+
>- CPU >= 2 Core
|
55 |
+
>- RAM >= 4 GiB
|
56 |
+
|
57 |
+
</br>
|
58 |
+
|
59 |
+
The easiest way to start the Dify server is through [docker compose](docker/docker-compose.yaml). Before running Dify with the following commands, make sure that [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed on your machine:
|
60 |
+
|
61 |
+
```bash
|
62 |
+
cd dify
|
63 |
+
cd docker
|
64 |
+
cp .env.example .env
|
65 |
+
docker compose up -d
|
66 |
+
```
|
67 |
+
|
68 |
+
After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization process.
|
69 |
+
|
70 |
+
#### Seeking help
|
71 |
+
Please refer to our [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) if you encounter problems setting up Dify. Reach out to [the community and us](#community--contact) if you are still having issues.
|
72 |
+
|
73 |
+
> If you'd like to contribute to Dify or do additional development, refer to our [guide to deploying from source code](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)
|
74 |
+
|
75 |
+
## Key features
|
76 |
+
**1. Workflow**:
|
77 |
+
Build and test powerful AI workflows on a visual canvas, leveraging all the following features and beyond.
|
78 |
+
|
79 |
+
|
80 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
**2. Comprehensive model support**:
|
85 |
+
Seamless integration with hundreds of proprietary / open-source LLMs from dozens of inference providers and self-hosted solutions, covering GPT, Mistral, Llama3, and any OpenAI API-compatible models. A full list of supported model providers can be found [here](https://docs.dify.ai/getting-started/readme/model-providers).
|
86 |
+
|
87 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
88 |
+
|
89 |
+
|
90 |
+
**3. Prompt IDE**:
|
91 |
+
Intuitive interface for crafting prompts, comparing model performance, and adding additional features such as text-to-speech to a chat-based app.
|
92 |
+
|
93 |
+
**4. RAG Pipeline**:
|
94 |
+
Extensive RAG capabilities that cover everything from document ingestion to retrieval, with out-of-box support for text extraction from PDFs, PPTs, and other common document formats.
|
95 |
+
|
96 |
+
**5. Agent capabilities**:
|
97 |
+
You can define agents based on LLM Function Calling or ReAct, and add pre-built or custom tools for the agent. Dify provides 50+ built-in tools for AI agents, such as Google Search, DALL·E, Stable Diffusion and WolframAlpha.
|
98 |
+
|
99 |
+
**6. LLMOps**:
|
100 |
+
Monitor and analyze application logs and performance over time. You could continuously improve prompts, datasets, and models based on production data and annotations.
|
101 |
+
|
102 |
+
**7. Backend-as-a-Service**:
|
103 |
+
All of Dify's offerings come with corresponding APIs, so you could effortlessly integrate Dify into your own business logic.
|
104 |
+
|
105 |
+
|
106 |
+
## Using Dify
|
107 |
+
|
108 |
+
- **Cloud </br>**
|
109 |
+
We host a [Dify Cloud](https://dify.ai) service for anyone to try with zero setup. It provides all the capabilities of the self-deployed version, and includes 200 free GPT-4 calls in the sandbox plan.
|
110 |
+
|
111 |
+
- **Self-hosting Dify Community Edition</br>**
|
112 |
+
Quickly get Dify running in your environment with this [starter guide](#quick-start).
|
113 |
+
Use our [documentation](https://docs.dify.ai) for further references and more in-depth instructions.
|
114 |
+
|
115 |
+
- **Dify for enterprise / organizations</br>**
|
116 |
+
We provide additional enterprise-centric features. [Log your questions for us through this chatbot](https://udify.app/chat/22L1zSxg6yW1cWQg) or [send us an email](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) to discuss enterprise needs. </br>
|
117 |
+
> For startups and small businesses using AWS, check out [Dify Premium on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) and deploy it to your own AWS VPC with one-click. It's an affordable AMI offering with the option to create apps with custom logo and branding.
|
118 |
+
|
119 |
+
|
120 |
+
## Staying ahead
|
121 |
+
|
122 |
+
Star Dify on GitHub and be instantly notified of new releases.
|
123 |
+
|
124 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
125 |
+
|
126 |
+
|
127 |
+
## Advanced Setup
|
128 |
+
|
129 |
+
If you need to customize the configuration, please refer to the comments in our [.env.example](docker/.env.example) file and update the corresponding values in your `.env` file. Additionally, you might need to make adjustments to the `docker-compose.yaml` file itself, such as changing image versions, port mappings, or volume mounts, based on your specific deployment environment and requirements. After making any changes, please re-run `docker-compose up -d`. You can find the full list of available environment variables [here](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
130 |
+
|
131 |
+
If you'd like to configure a highly-available setup, there are community-contributed [Helm Charts](https://helm.sh/) and YAML files which allow Dify to be deployed on Kubernetes.
|
132 |
+
|
133 |
+
- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
134 |
+
- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
135 |
+
- [YAML file by @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
136 |
+
|
137 |
+
#### Using Terraform for Deployment
|
138 |
+
|
139 |
+
Deploy Dify to Cloud Platform with a single click using [terraform](https://www.terraform.io/)
|
140 |
+
|
141 |
+
##### Azure Global
|
142 |
+
- [Azure Terraform by @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
143 |
+
|
144 |
+
##### Google Cloud
|
145 |
+
- [Google Cloud Terraform by @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
146 |
+
|
147 |
+
## Contributing
|
148 |
+
|
149 |
+
For those who'd like to contribute code, see our [Contribution Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
150 |
+
At the same time, please consider supporting Dify by sharing it on social media and at events and conferences.
|
151 |
+
|
152 |
+
|
153 |
+
> We are looking for contributors to help with translating Dify to languages other than Mandarin or English. If you are interested in helping, please see the [i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) for more information, and leave us a comment in the `global-users` channel of our [Discord Community Server](https://discord.gg/8Tpq4AcN9c).
|
154 |
+
|
155 |
+
## Community & contact
|
156 |
+
|
157 |
+
* [Github Discussion](https://github.com/langgenius/dify/discussions). Best for: sharing feedback and asking questions.
|
158 |
+
* [GitHub Issues](https://github.com/langgenius/dify/issues). Best for: bugs you encounter using Dify.AI, and feature proposals. See our [Contribution Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
159 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Best for: sharing your applications and hanging out with the community.
|
160 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Best for: sharing your applications and hanging out with the community.
|
161 |
+
|
162 |
+
**Contributors**
|
163 |
+
|
164 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
165 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
166 |
+
</a>
|
167 |
+
|
168 |
+
## Star history
|
169 |
+
|
170 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
171 |
+
|
172 |
+
|
173 |
+
## Security disclosure
|
174 |
+
|
175 |
+
To protect your privacy, please avoid posting security issues on GitHub. Instead, send your questions to [email protected] and we will provide you with a more detailed answer.
|
176 |
+
|
177 |
+
## License
|
178 |
+
|
179 |
+
This repository is available under the [Dify Open Source License](LICENSE), which is essentially Apache 2.0 with a few additional restrictions.
|
README_AR.md
ADDED
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">الاستضافة الذاتية</a> ·
|
6 |
+
<a href="https://docs.dify.ai">التوثيق</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">استفسار الشركات (للإنجليزية فقط)</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat on Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="follow on X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
<div style="text-align: right;">
|
45 |
+
مشروع Dify هو منصة تطوير تطبيقات الذكاء الصناعي مفتوحة المصدر. تجمع واجهته البديهية بين سير العمل الذكي بالذكاء الاصطناعي وخط أنابيب RAG وقدرات الوكيل وإدارة النماذج وميزات الملاحظة وأكثر من ذلك، مما يتيح لك الانتقال بسرعة من المرحلة التجريبية إلى الإنتاج. إليك قائمة بالميزات الأساسية:
|
46 |
+
</br> </br>
|
47 |
+
|
48 |
+
**1. سير العمل**: قم ببناء واختبار سير عمل الذكاء الاصطناعي القوي على قماش بصري، مستفيدًا من جميع الميزات التالية وأكثر.
|
49 |
+
|
50 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
51 |
+
|
52 |
+
|
53 |
+
**2. الدعم الشامل للنماذج**: تكامل سلس مع مئات من LLMs الخاصة / مفتوحة المصدر من عشرات من موفري التحليل والحلول المستضافة ذاتيًا، مما يغطي GPT و Mistral و Llama3 وأي نماذج متوافقة مع واجهة OpenAI API. يمكن العثور على قائمة كاملة بمزودي النموذج المدعومين [هنا](https://docs.dify.ai/getting-started/readme/model-providers).
|
54 |
+
|
55 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
56 |
+
|
57 |
+
**3. بيئة التطوير للأوامر**: واجهة بيئة التطوير المبتكرة لصياغة الأم�� ومقارنة أداء النموذج، وإضافة ميزات إضافية مثل تحويل النص إلى كلام إلى تطبيق قائم على الدردشة.
|
58 |
+
|
59 |
+
**4. خط أنابيب RAG**: قدرات RAG الواسعة التي تغطي كل شيء من استيعاب الوثائق إلى الاسترجاع، مع الدعم الفوري لاستخراج النص من ملفات PDF و PPT وتنسيقات الوثائق الشائعة الأخرى.
|
60 |
+
|
61 |
+
**5. قدرات الوكيل**: يمكنك تعريف الوكلاء بناءً على أمر وظيفة LLM أو ReAct، وإضافة أدوات مدمجة أو مخصصة للوكيل. توفر Dify أكثر من 50 أداة مدمجة لوكلاء الذكاء الاصطناعي، مثل البحث في Google و DALL·E وStable Diffusion و WolframAlpha.
|
62 |
+
|
63 |
+
**6. الـ LLMOps**: راقب وتحلل سجلات التطبيق والأداء على مر الزمن. يمكنك تحسين الأوامر والبيانات والنماذج باستمرار استنادًا إلى البيانات الإنتاجية والتعليقات.
|
64 |
+
|
65 |
+
**7.الواجهة الخلفية (Backend) كخدمة**: تأتي جميع عروض Dify مع APIs مطابقة، حتى يمكنك دمج Dify بسهولة في منطق أعمالك الخاص.
|
66 |
+
## مقارنة الميزات
|
67 |
+
<table style="width: 100%;">
|
68 |
+
<tr>
|
69 |
+
<th align="center">الميزة</th>
|
70 |
+
<th align="center">Dify.AI</th>
|
71 |
+
<th align="center">LangChain</th>
|
72 |
+
<th align="center">Flowise</th>
|
73 |
+
<th align="center">OpenAI Assistants API</th>
|
74 |
+
</tr>
|
75 |
+
<tr>
|
76 |
+
<td align="center">نهج البرمجة</td>
|
77 |
+
<td align="center">موجّه لـ تطبيق + واجهة برمجة تطبيق (API)</td>
|
78 |
+
<td align="center">برمجة Python</td>
|
79 |
+
<td align="center">موجه لتطبيق</td>
|
80 |
+
<td align="center">واجهة برمجة تطبيق (API)</td>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<td align="center">LLMs المدعومة</td>
|
84 |
+
<td align="center">تنوع غني</td>
|
85 |
+
<td align="center">تنوع غني</td>
|
86 |
+
<td align="center">تنوع غني</td>
|
87 |
+
<td align="center">فقط OpenAI</td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td align="center">محرك RAG</td>
|
91 |
+
<td align="center">✅</td>
|
92 |
+
<td align="center">✅</td>
|
93 |
+
<td align="center">✅</td>
|
94 |
+
<td align="center">✅</td>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<td align="center">الوكيل</td>
|
98 |
+
<td align="center">✅</td>
|
99 |
+
<td align="center">✅</td>
|
100 |
+
<td align="center">❌</td>
|
101 |
+
<td align="center">✅</td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<td align="center">سير العمل</td>
|
105 |
+
<td align="center">✅</td>
|
106 |
+
<td align="center">❌</td>
|
107 |
+
<td align="center">✅</td>
|
108 |
+
<td align="center">❌</td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<td align="center">الملاحظة</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
<td align="center">✅</td>
|
114 |
+
<td align="center">❌</td>
|
115 |
+
<td align="center">❌</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td align="center">ميزات الشركات (SSO / مراقبة الوصول)</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
<td align="center">❌</td>
|
121 |
+
<td align="center">❌</td>
|
122 |
+
<td align="center">❌</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td align="center">نشر محلي</td>
|
126 |
+
<td align="center">✅</td>
|
127 |
+
<td align="center">✅</td>
|
128 |
+
<td align="center">✅</td>
|
129 |
+
<td align="center">❌</td>
|
130 |
+
</tr>
|
131 |
+
</table>
|
132 |
+
|
133 |
+
|
134 |
+
## استخدام Dify
|
135 |
+
- **سحابة </br>**
|
136 |
+
نحن نستضيف [خدمة Dify Cloud](https://dify.ai) لأي شخص لتجربتها بدون أي إعدادات. توفر كل قدرات النسخة التي تمت استضافتها ذاتيًا، وتتضمن 200 أمر GPT-4 مجانًا في خطة الصندوق الرملي.
|
137 |
+
|
138 |
+
- **استضافة ذاتية لنسخة المجتمع Dify</br>**
|
139 |
+
ابدأ سريعًا في تشغيل Dify في بيئتك باستخدام [دليل البدء السريع](#البدء السريع).
|
140 |
+
استخدم [توثيقنا](https://docs.dify.ai) للمزيد من المراجع والتعليمات الأعمق.
|
141 |
+
|
142 |
+
- **مشروع Dify للشركات / المؤسسات</br>**
|
143 |
+
نحن نوفر ميزات إضافية مركزة على الشركات. [جدول اجتماع معنا](https://cal.com/guchenhe/30min) أو [أرسل لنا بريدًا إلكترونيًا](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) لمناقشة احتياجات الشركات. </br>
|
144 |
+
> بالنسبة للشركات الناشئة والشركات الصغيرة التي تستخدم خدمات AWS، تحقق من [Dify Premium على AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) ونشرها في شبكتك الخاصة على AWS VPC بنقرة واحدة. إنها عرض AMI بأسعار معقولة مع خيار إنشاء تطبيقات بشعار وعلامة تجارية مخصصة.
|
145 |
+
## البقاء قدمًا
|
146 |
+
|
147 |
+
قم بإضافة نجمة إلى Dify على GitHub وتلق تنبيهًا فوريًا بالإصدارات الجديدة.
|
148 |
+
|
149 |
+
![نجمنا](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
150 |
+
## البداية السريعة
|
151 |
+
> قبل تثبيت Dify، تأكد من أن جهازك يلبي الحد الأدنى من متطلبات النظام التالية:
|
152 |
+
>
|
153 |
+
>- معالج >= 2 نواة
|
154 |
+
>- ذاكرة وصول عشوائي (RAM) >= 4 جيجابايت
|
155 |
+
|
156 |
+
</br>
|
157 |
+
|
158 |
+
أسهل طريقة لبدء تشغيل خادم Dify هي تشغيل ملف [docker-compose.yml](docker/docker-compose.yaml) الخاص بنا. قبل تشغيل أمر التثبيت، تأكد من تثبيت [Docker](https://docs.docker.com/get-docker/) و [Docker Compose](https://docs.docker.com/compose/install/) على جهازك:
|
159 |
+
|
160 |
+
```bash
|
161 |
+
cd docker
|
162 |
+
cp .env.example .env
|
163 |
+
docker compose up -d
|
164 |
+
```
|
165 |
+
|
166 |
+
بعد التشغيل، يمكنك الوصول إلى لوحة تحكم Dify في متصفحك على [http://localhost/install](http://localhost/install) وبدء عملية التهيئة.
|
167 |
+
|
168 |
+
> إذا كنت ترغب في المساهمة في Dify أو القيام بتطوير إضافي، فانظر إلى [دليلنا للنشر من الشفرة (code) المصدرية](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)
|
169 |
+
|
170 |
+
## الخطوات التالية
|
171 |
+
|
172 |
+
إذا كنت بحاجة إلى تخصيص الإعدادات، فيرجى الرجوع إلى التعليقات في ملف [.env.example](docker/.env.example) وتحديث القيم المقابلة في ملف `.env`. بالإضافة إلى ذلك، قد تحتاج إلى إجراء تعديلات على ملف `docker-compose.yaml` نفسه، مثل تغيير إصدارات الصور أو تعيينات المنافذ أو نقاط تحميل وحدات التخزين، بناءً على بيئة النشر ومتطلباتك الخاصة. بعد إجراء أي تغييرات، يرجى إعادة تشغيل `docker-compose up -d`. يمكنك العثور على قائمة كاملة بمتغيرات البيئة المتاحة [هنا](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
173 |
+
|
174 |
+
يوجد مجتمع خاص بـ [Helm Charts](https://helm.sh/) وملفات YAML التي تسمح بتنفيذ Dify على Kubernetes للنظام من الإيجابيات العلوية.
|
175 |
+
|
176 |
+
- [رسم بياني Helm من قبل @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
177 |
+
- [رسم بياني Helm من قبل @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
178 |
+
- [ملف YAML من قبل @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
179 |
+
|
180 |
+
#### استخدام Terraform للتوزيع
|
181 |
+
|
182 |
+
انشر Dify إلى منصة السحابة بنقرة واحدة باستخدام [terraform](https://www.terraform.io/)
|
183 |
+
|
184 |
+
##### Azure Global
|
185 |
+
- [Azure Terraform بواسطة @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
186 |
+
|
187 |
+
##### Google Cloud
|
188 |
+
- [Google Cloud Terraform بواسطة @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
189 |
+
|
190 |
+
## المساهمة
|
191 |
+
|
192 |
+
لأولئك الذين يرغبون في المساهمة، انظر إلى [دليل المساهمة](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) لدينا.
|
193 |
+
في الوقت نفسه، يرجى النظر في دعم Dify عن طريق مشاركته على وسائل التواصل الاجتماعي وفي الفعاليات والمؤتمرات.
|
194 |
+
|
195 |
+
|
196 |
+
> نحن نبحث عن مساهمين لمساعدة في ترجمة Dify إلى لغات أخرى غير اللغة الصينية المندرين أو الإنجليزية. إذا كنت مهتمًا بالمساعدة، يرجى الاطلاع على [README للترجمة](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) لمزيد من المعلومات، واترك لنا تعليقًا في قناة `global-users` على [خادم المجتمع على Discord](https://discord.gg/8Tpq4AcN9c).
|
197 |
+
|
198 |
+
**المساهمون**
|
199 |
+
|
200 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
201 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
202 |
+
</a>
|
203 |
+
|
204 |
+
## المجتمع والاتصال
|
205 |
+
* [مناقشة Github](https://github.com/langgenius/dify/discussions). الأفضل لـ: مشاركة التعليقات وطرح الأسئلة.
|
206 |
+
* [المشكلات على GitHub](https://github.com/langgenius/dify/issues). الأفضل لـ: الأخطاء التي تواجهها في استخدام Dify.AI، واقتراحات الميزات. انظر [دليل المساهمة](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
207 |
+
* [Discord](https://discord.gg/FngNHpbcY7). الأفضل لـ: مشاركة تطبيقاتك والترفيه مع المجتمع.
|
208 |
+
* [تويتر](https://twitter.com/dify_ai). الأفضل لـ: مشاركة تطبيقاتك والترفيه مع المجتمع.
|
209 |
+
|
210 |
+
## تاريخ النجمة
|
211 |
+
|
212 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
213 |
+
|
214 |
+
|
215 |
+
## الكشف عن الأمان
|
216 |
+
|
217 |
+
لحماية خصوصيتك، يرجى تجنب نشر مشكلات الأمان ��لى GitHub. بدلاً من ذلك، أرسل أسئلتك إلى [email protected] وسنقدم لك إجابة أكثر تفصيلاً.
|
218 |
+
|
219 |
+
## الرخصة
|
220 |
+
|
221 |
+
هذا المستودع متاح تحت [رخصة البرنامج الحر Dify](LICENSE)، والتي تعتبر بشكل أساسي Apache 2.0 مع بعض القيود الإضافية.
|
README_CN.md
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<div align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify 云服务</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">自托管</a> ·
|
6 |
+
<a href="https://docs.dify.ai">文档</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">(需用英文)常见问题解答 / 联系团队</a>
|
8 |
+
</div>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat on Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="follow on X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<div align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
|
45 |
+
#
|
46 |
+
|
47 |
+
<div align="center">
|
48 |
+
<a href="https://trendshift.io/repositories/2152" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2152" alt="langgenius%2Fdify | 趋势转变" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
Dify 是一个开源的 LLM 应用开发平台。其直观的界面结合了 AI 工作流、RAG 管道、Agent、模型管理、可观测性功能等,让您可以快速从原型到生产。以下是其核心功能列表:
|
52 |
+
</br> </br>
|
53 |
+
|
54 |
+
**1. 工作流**:
|
55 |
+
在画布上构建和测试功能强大的 AI 工作流程,利用以下所有功能以及更多功能。
|
56 |
+
|
57 |
+
|
58 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
**2. 全面的模型支持**:
|
63 |
+
与数百种专有/开源 LLMs 以及数十种推理提供商和自托管解决方案无缝集成,涵盖 GPT、Mistral、Llama3 以及任何与 OpenAI API 兼容的模型。完整的支持模型提供商列表可在[此处](https://docs.dify.ai/getting-started/readme/model-providers)找到。
|
64 |
+
|
65 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
66 |
+
|
67 |
+
|
68 |
+
**3. Prompt IDE**:
|
69 |
+
用于制作提示、比较模型性能以及向基于聊天的应用程序添加其他功能(如文本转语音)的直观界面。
|
70 |
+
|
71 |
+
**4. RAG Pipeline**:
|
72 |
+
广泛的 RAG 功能,涵盖从文档摄入到检索的所有内容,支持从 PDF、PPT 和其他常见文档格式中提取文本的开箱即用的支持。
|
73 |
+
|
74 |
+
**5. Agent 智能体**:
|
75 |
+
您可以基于 LLM 函数调用或 ReAct 定义 Agent,并为 Agent ���加预构建或自定义工具。Dify 为 AI Agent 提供了50多种内置工具,如谷歌搜索、DALL·E、Stable Diffusion 和 WolframAlpha 等。
|
76 |
+
|
77 |
+
**6. LLMOps**:
|
78 |
+
随时间监视和分析应用程序日志和性能。您可以根据生产数据和标注持续改进提示、数据集和模型。
|
79 |
+
|
80 |
+
**7. 后端即服务**:
|
81 |
+
所有 Dify 的功能都带有相应的 API,因此您可以轻松地将 Dify 集成到自己的业务逻辑中。
|
82 |
+
|
83 |
+
|
84 |
+
## 功能比较
|
85 |
+
<table style="width: 100%;">
|
86 |
+
<tr>
|
87 |
+
<th align="center">功能</th>
|
88 |
+
<th align="center">Dify.AI</th>
|
89 |
+
<th align="center">LangChain</th>
|
90 |
+
<th align="center">Flowise</th>
|
91 |
+
<th align="center">OpenAI Assistant API</th>
|
92 |
+
</tr>
|
93 |
+
<tr>
|
94 |
+
<td align="center">编程方法</td>
|
95 |
+
<td align="center">API + 应用程序导向</td>
|
96 |
+
<td align="center">Python 代码</td>
|
97 |
+
<td align="center">应用程序导向</td>
|
98 |
+
<td align="center">API 导向</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td align="center">支持的 LLMs</td>
|
102 |
+
<td align="center">丰富多样</td>
|
103 |
+
<td align="center">丰富多样</td>
|
104 |
+
<td align="center">丰富多样</td>
|
105 |
+
<td align="center">仅限 OpenAI</td>
|
106 |
+
</tr>
|
107 |
+
<tr>
|
108 |
+
<td align="center">RAG引擎</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td align="center">Agent</td>
|
116 |
+
<td align="center">✅</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td align="center">工作流</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
<td align="center">✅</td>
|
126 |
+
<td align="center">❌</td>
|
127 |
+
</tr>
|
128 |
+
<tr>
|
129 |
+
<td align="center">可观测性</td>
|
130 |
+
<td align="center">✅</td>
|
131 |
+
<td align="center">✅</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
<td align="center">❌</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td align="center">企业功能(SSO/访问控制)</td>
|
137 |
+
<td align="center">✅</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
<td align="center">❌</td>
|
141 |
+
</tr>
|
142 |
+
<tr>
|
143 |
+
<td align="center">本地部署</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">✅</td>
|
146 |
+
<td align="center">✅</td>
|
147 |
+
<td align="center">❌</td>
|
148 |
+
</tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
## 使用 Dify
|
152 |
+
|
153 |
+
- **云 </br>**
|
154 |
+
我们提供[ Dify 云服务](https://dify.ai),任何人都可以零设置尝试。它提供了自部署版本的所有功能,并在沙盒计划中包含 200 次免费的 GPT-4 调用。
|
155 |
+
|
156 |
+
- **自托管 Dify 社区版</br>**
|
157 |
+
使用这个[入门指南](#快速启动)快速在您的环境中运行 Dify。
|
158 |
+
使用我们的[文档](https://docs.dify.ai)进行进一步的参考和更深入的说明。
|
159 |
+
|
160 |
+
- **面向企业/组织的 Dify</br>**
|
161 |
+
我们提供额外的面向企业的功能。[给我们发送电子邮件](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry)讨论企业需求。 </br>
|
162 |
+
> 对于使用 AWS 的初创公司和中小型企业,请查看 [AWS Marketplace 上的 Dify 高级版](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6),并使用一键部署到您自己的 AWS VPC。它是一个价格实惠的 AMI 产品,提供了使用自定义徽标和品牌创建应用程序的选项。
|
163 |
+
|
164 |
+
## 保持领先
|
165 |
+
|
166 |
+
在 GitHub 上给 Dify Star,并立即收到新版本的通知。
|
167 |
+
|
168 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
169 |
+
|
170 |
+
## 安装社区版
|
171 |
+
|
172 |
+
### 系统要求
|
173 |
+
|
174 |
+
在安装 Dify 之前,请确保您的机器满足以下最低系统要求:
|
175 |
+
|
176 |
+
- CPU >= 2 Core
|
177 |
+
- RAM >= 4 GiB
|
178 |
+
|
179 |
+
### 快速启动
|
180 |
+
|
181 |
+
启动 Dify 服务器的最简单方法是运行我们的 [docker-compose.yml](docker/docker-compose.yaml) 文件。在运行安装命令之前,请确保您的机器上安装了 [Docker](https://docs.docker.com/get-docker/) 和 [Docker Compose](https://docs.docker.com/compose/install/):
|
182 |
+
|
183 |
+
```bash
|
184 |
+
cd docker
|
185 |
+
cp .env.example .env
|
186 |
+
docker compose up -d
|
187 |
+
```
|
188 |
+
|
189 |
+
运行后,可以在浏览器上访问 [http://localhost/install](http://localhost/install) 进入 Dify 控制台并开始初始化安装操作。
|
190 |
+
|
191 |
+
### 自定义配置
|
192 |
+
|
193 |
+
如果您需要自定义配置,请参考 [.env.example](docker/.env.example) 文件中的注释,并更新 `.env` 文件中对应的值。此外,您可能需要根据您的具体部署环境和需求对 `docker-compose.yaml` 文件本身进行调整,例如更改镜像版本、端口映射或卷挂载。完成任何更改后,请重新运行 `docker-compose up -d`。您可以在[此处](https://docs.dify.ai/getting-started/install-self-hosted/environments)找到可用环境变量的完整列表。
|
194 |
+
|
195 |
+
#### 使用 Helm Chart 部署
|
196 |
+
|
197 |
+
使用 [Helm Chart](https://helm.sh/) 版本或者 YAML 文件,可以在 Kubernetes 上部署 Dify。
|
198 |
+
|
199 |
+
- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
200 |
+
- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
201 |
+
- [YAML 文件 by @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
202 |
+
|
203 |
+
#### 使用 Terraform 部署
|
204 |
+
|
205 |
+
使用 [terraform](https://www.terraform.io/) 一键将 Dify 部署到云平台
|
206 |
+
|
207 |
+
##### Azure Global
|
208 |
+
- [Azure Terraform by @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
209 |
+
|
210 |
+
##### Google Cloud
|
211 |
+
- [Google Cloud Terraform by @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
212 |
+
|
213 |
+
## Star History
|
214 |
+
|
215 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
216 |
+
|
217 |
+
|
218 |
+
## Contributing
|
219 |
+
|
220 |
+
对于那些想要贡献代码的人,请参阅我们的[贡献指南](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md)。
|
221 |
+
同时,请考虑通过社交媒体、活动和会议来支持 Dify 的分享。
|
222 |
+
|
223 |
+
> 我们正在寻找贡献者来帮助将Dify翻译成除了中文和英文之外的其他语言。如果您有兴趣帮助,请参阅我们的[i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md)获取更多信息,并在我们的[Discord社区服务器](https://discord.gg/8Tpq4AcN9c)的`global-users`频道中留言。
|
224 |
+
|
225 |
+
**Contributors**
|
226 |
+
|
227 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
228 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
229 |
+
</a>
|
230 |
+
|
231 |
+
## 社区与支持
|
232 |
+
|
233 |
+
我们欢迎您为 Dify 做出贡献,以帮助改善 Dify。包括:提交代码、问题、新想法,或分享您基于 Dify 创建的有趣且有用的 AI 应用程序。同时,我们也欢迎您在不同的活动、会议和社交媒体上分享 Dify。
|
234 |
+
|
235 |
+
- [Github Discussion](https://github.com/langgenius/dify/discussions). 👉:分享您的应用程序并与社区交流。
|
236 |
+
- [GitHub Issues](https://github.com/langgenius/dify/issues)。👉:使用 Dify.AI 时遇到的错误和问题,请参阅[贡献指南](CONTRIBUTING.md)。
|
237 |
+
- [电子邮件支持](mailto:[email protected]?subject=[GitHub]Questions%20About%20Dify)。👉:关于使用 Dify.AI 的问题。
|
238 |
+
- [Discord](https://discord.gg/FngNHpbcY7)。👉:分享您的应用程序并与社区交流。
|
239 |
+
- [X(Twitter)](https://twitter.com/dify_ai)。👉:分享您的应用程序并与社区交流。
|
240 |
+
- [商业许可](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry)。👉:有关商业用途许可 Dify.AI 的商业咨询。
|
241 |
+
- [微信]() 👉:扫描下方二维码,添加微信好友,备注 Dify,我们将邀请您加入 Dify 社区。
|
242 |
+
<img src="./images/wechat.png" alt="wechat" width="100"/>
|
243 |
+
|
244 |
+
## 安全问题
|
245 |
+
|
246 |
+
为了保护您的隐私,请避免在 GitHub 上发布安全问题。发送问题至 [email protected],我们将为您做更细致的解答。
|
247 |
+
|
248 |
+
## License
|
249 |
+
|
250 |
+
本仓库遵循 [Dify Open Source License](LICENSE) 开源协议,该许可证本质上是 Apache 2.0,但有一些额外的限制。
|
README_ES.md
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Auto-alojamiento</a> ·
|
6 |
+
<a href="https://docs.dify.ai">Documentación</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Consultas empresariales (en inglés)</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Insignia Estática" src="https://img.shields.io/badge/Producto-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Insignia Estática" src="https://img.shields.io/badge/gratis-precios?logo=gratis&color=%20%23155EEF&label=precios&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat en Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="seguir en X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Descargas de Docker" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Actividad de Commits el último mes" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Issues cerrados" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20cerrados&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Publicaciones de discusión" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
#
|
45 |
+
|
46 |
+
<p align="center">
|
47 |
+
<a href="https://trendshift.io/repositories/2152" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2152" alt="langgenius%2Fdify | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
48 |
+
</p>
|
49 |
+
Dify es una plataforma de desarrollo de aplicaciones de LLM de código abierto. Su interfaz intuitiva combina flujo de trabajo de IA, pipeline RAG, capacidades de agente, gestión de modelos, características de observabilidad y más, lo que le permite pasar rápidamente de un prototipo a producción. Aquí hay una lista de las características principales:
|
50 |
+
</br> </br>
|
51 |
+
|
52 |
+
**1. Flujo de trabajo**:
|
53 |
+
Construye y prueba potentes flujos de trabajo de IA en un lienzo visual, aprovechando todas las siguientes características y más.
|
54 |
+
|
55 |
+
|
56 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
**2. Soporte de modelos completo**:
|
61 |
+
Integración perfecta con cientos de LLMs propietarios / de código abierto de docenas de proveedores de inferencia y soluciones auto-alojadas, que cubren GPT, Mistral, Llama3 y cualquier modelo compatible con la API de OpenAI. Se puede encontrar una lista completa de proveedores de modelos admitidos [aquí](https://docs.dify.ai/getting-started/readme/model-providers).
|
62 |
+
|
63 |
+
![proveedores-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
64 |
+
|
65 |
+
|
66 |
+
**3. IDE de prompt**:
|
67 |
+
Interfaz intuitiva para crear prompts, comparar el rendimiento del modelo y agregar características adicionales como texto a voz a una aplicación basada en chat.
|
68 |
+
|
69 |
+
**4. Pipeline RAG**:
|
70 |
+
Amplias capacidades de RAG que cubren todo, desde la ingestión de documentos hasta la recuperación, con soporte listo para usar para la extracción de texto de PDF, PPT y otros formatos de documento comunes.
|
71 |
+
|
72 |
+
**5. Capacidades de agente**:
|
73 |
+
Puedes definir agent
|
74 |
+
|
75 |
+
es basados en LLM Function Calling o ReAct, y agregar herramientas preconstruidas o personalizadas para el agente. Dify proporciona más de 50 herramientas integradas para agentes de IA, como Búsqueda de Google, DALL·E, Difusión Estable y WolframAlpha.
|
76 |
+
|
77 |
+
**6. LLMOps**:
|
78 |
+
Supervisa y analiza registros de aplicaciones y rendimiento a lo largo del tiempo. Podrías mejorar continuamente prompts, conjuntos de datos y modelos basados en datos de producción y anotaciones.
|
79 |
+
|
80 |
+
**7. Backend como servicio**:
|
81 |
+
Todas las ofertas de Dify vienen con APIs correspondientes, por lo que podrías integrar Dify sin esfuerzo en tu propia lógica empresarial.
|
82 |
+
|
83 |
+
|
84 |
+
## Comparación de características
|
85 |
+
<table style="width: 100%;">
|
86 |
+
<tr>
|
87 |
+
<th align="center">Característica</th>
|
88 |
+
<th align="center">Dify.AI</th>
|
89 |
+
<th align="center">LangChain</th>
|
90 |
+
<th align="center">Flowise</th>
|
91 |
+
<th align="center">API de Asistentes de OpenAI</th>
|
92 |
+
</tr>
|
93 |
+
<tr>
|
94 |
+
<td align="center">Enfoque de programación</td>
|
95 |
+
<td align="center">API + orientado a la aplicación</td>
|
96 |
+
<td align="center">Código Python</td>
|
97 |
+
<td align="center">Orientado a la aplicación</td>
|
98 |
+
<td align="center">Orientado a la API</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td align="center">LLMs admitidos</td>
|
102 |
+
<td align="center">Gran variedad</td>
|
103 |
+
<td align="center">Gran variedad</td>
|
104 |
+
<td align="center">Gran variedad</td>
|
105 |
+
<td align="center">Solo OpenAI</td>
|
106 |
+
</tr>
|
107 |
+
<tr>
|
108 |
+
<td align="center">Motor RAG</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td align="center">Agente</td>
|
116 |
+
<td align="center">✅</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td align="center">Flujo de trabajo</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
<td align="center">✅</td>
|
126 |
+
<td align="center">❌</td>
|
127 |
+
</tr>
|
128 |
+
<tr>
|
129 |
+
<td align="center">Observabilidad</td>
|
130 |
+
<td align="center">✅</td>
|
131 |
+
<td align="center">✅</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
<td align="center">❌</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td align="center">Característica empresarial (SSO/Control de acceso)</td>
|
137 |
+
<td align="center">✅</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
<td align="center">❌</td>
|
141 |
+
</tr>
|
142 |
+
<tr>
|
143 |
+
<td align="center">Implementación local</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">✅</td>
|
146 |
+
<td align="center">✅</td>
|
147 |
+
<td align="center">❌</td>
|
148 |
+
</tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
## Usando Dify
|
152 |
+
|
153 |
+
- **Nube </br>**
|
154 |
+
Hospedamos un servicio [Dify Cloud](https://dify.ai) para que cualquiera lo pruebe sin configuración. Proporciona todas las capacidades de la versión autoimplementada e incluye 200 llamadas gratuitas a GPT-4 en el plan sandbox.
|
155 |
+
|
156 |
+
- **Auto-alojamiento de Dify Community Edition</br>**
|
157 |
+
Pon rápidamente Dify en funcionamiento en tu entorno con esta [guía de inicio rápido](#quick-start).
|
158 |
+
Usa nuestra [documentación](https://docs.dify.ai) para más referencias e instrucciones más detalladas.
|
159 |
+
|
160 |
+
- **Dify para Empresas / Organizaciones</br>**
|
161 |
+
Proporcionamos características adicionales centradas en la empresa. [Envíanos un correo electrónico](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) para discutir las necesidades empresariales. </br>
|
162 |
+
> Para startups y pequeñas empresas que utilizan AWS, echa un vistazo a [Dify Premium en AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) e impleméntalo en tu propio VPC de AWS con un clic. Es una AMI asequible que ofrece la opción de crear aplicaciones con logotipo y marca personalizados.
|
163 |
+
|
164 |
+
|
165 |
+
## Manteniéndote al tanto
|
166 |
+
|
167 |
+
Dale estrella a Dify en GitHub y serás notificado instantáneamente de las nuevas versiones.
|
168 |
+
|
169 |
+
![danos estrella](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
170 |
+
|
171 |
+
|
172 |
+
|
173 |
+
## Inicio Rápido
|
174 |
+
> Antes de instalar Dify, asegúrate de que tu máquina cumpla con los siguientes requisitos mínimos del sistema:
|
175 |
+
>
|
176 |
+
>- CPU >= 2 núcleos
|
177 |
+
>- RAM >= 4GB
|
178 |
+
|
179 |
+
</br>
|
180 |
+
|
181 |
+
La forma más fácil de iniciar el servidor de Dify es ejecutar nuestro archivo [docker-compose.yml](docker/docker-compose.yaml). Antes de ejecutar el comando de instalación, asegúrate de que [Docker](https://docs.docker.com/get-docker/) y [Docker Compose](https://docs.docker.com/compose/install/) estén instalados en tu máquina:
|
182 |
+
|
183 |
+
```bash
|
184 |
+
cd docker
|
185 |
+
cp .env.example .env
|
186 |
+
docker compose up -d
|
187 |
+
```
|
188 |
+
|
189 |
+
Después de ejecutarlo, puedes acceder al panel de control de Dify en tu navegador en [http://localhost/install](http://localhost/install) y comenzar el proceso de inicialización.
|
190 |
+
|
191 |
+
> Si deseas contribuir a Dify o realizar desarrollo adicional, consulta nuestra [guía para implementar desde el código fuente](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)
|
192 |
+
|
193 |
+
## Próximos pasos
|
194 |
+
|
195 |
+
Si necesita personalizar la configuración, consulte los comentarios en nuestro archivo [.env.example](docker/.env.example) y actualice los valores correspondientes en su archivo `.env`. Además, es posible que deba realizar ajustes en el propio archivo `docker-compose.yaml`, como cambiar las versiones de las imágenes, las asignaciones de puertos o los montajes de volúmenes, según su entorno de implementación y requisitos específicos. Después de realizar cualquier cambio, vuelva a ejecutar `docker-compose up -d`. Puede encontrar la lista completa de variables de entorno disponibles [aquí](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
196 |
+
|
197 |
+
. Después de realizar los cambios, ejecuta `docker-compose up -d` nuevamente. Puedes ver la lista completa de variables de entorno [aquí](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
198 |
+
|
199 |
+
Si desea configurar una configuración de alta disponibilidad, la comunidad proporciona [Gráficos Helm](https://helm.sh/) y archivos YAML, a través de los cuales puede desplegar Dify en Kubernetes.
|
200 |
+
|
201 |
+
- [Gráfico Helm por @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
202 |
+
- [Gráfico Helm por @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
203 |
+
- [Ficheros YAML por @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
204 |
+
|
205 |
+
#### Uso de Terraform para el despliegue
|
206 |
+
|
207 |
+
Despliega Dify en una plataforma en la nube con un solo clic utilizando [terraform](https://www.terraform.io/)
|
208 |
+
|
209 |
+
##### Azure Global
|
210 |
+
- [Azure Terraform por @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
211 |
+
|
212 |
+
##### Google Cloud
|
213 |
+
- [Google Cloud Terraform por @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
214 |
+
|
215 |
+
## Contribuir
|
216 |
+
|
217 |
+
Para aquellos que deseen contribuir con código, consulten nuestra [Guía de contribución](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
218 |
+
Al mismo tiempo, considera apoyar a Dify compartiéndolo en redes sociales y en eventos y conferencias.
|
219 |
+
|
220 |
+
|
221 |
+
> Estamos buscando colaboradores para ayudar con la traducción de Dify a idiomas que no sean el mandarín o el inglés. Si estás interesado en ayudar, consulta el [README de i18n](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) para obtener más información y déjanos un comentario en el canal `global-users` de nuestro [Servidor de Comunidad en Discord](https://discord.gg/8Tpq4AcN9c).
|
222 |
+
|
223 |
+
**Contribuidores**
|
224 |
+
|
225 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
226 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
227 |
+
</a>
|
228 |
+
|
229 |
+
## Comunidad y Contacto
|
230 |
+
|
231 |
+
* [Discusión en GitHub](https://github.com/langgenius/dify/discussions). Lo mejor para: compartir comentarios y hacer preguntas.
|
232 |
+
* [Reporte de problemas en GitHub](https://github.com/langgenius/dify/issues). Lo mejor para: errores que encuentres usando Dify.AI y propuestas de características. Consulta nuestra [Guía de contribución](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
233 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Lo mejor para: compartir tus aplicaciones y pasar el rato con la comunidad.
|
234 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Lo mejor para: compartir tus aplicaciones y pasar el rato con la comunidad.
|
235 |
+
|
236 |
+
## Historial de Estrellas
|
237 |
+
|
238 |
+
[![Gráfico de Historial de Estrellas](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
239 |
+
|
240 |
+
|
241 |
+
## Divulgación de Seguridad
|
242 |
+
|
243 |
+
Para proteger tu privacidad, evita publicar problemas de seguridad en GitHub. En su lugar, envía tus preguntas a [email protected] y te proporcionaremos una respuesta más detallada.
|
244 |
+
|
245 |
+
## Licencia
|
246 |
+
|
247 |
+
Este repositorio está disponible bajo la [Licencia de Código Abierto de Dify](LICENSE), que es esencialmente Apache 2.0 con algunas restricciones adicionales.
|
README_FR.md
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Auto-hébergement</a> ·
|
6 |
+
<a href="https://docs.dify.ai">Documentation</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Demande d’entreprise (en anglais seulement)</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Badge statique" src="https://img.shields.io/badge/Produit-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Badge statique" src="https://img.shields.io/badge/gratuit-Tarification?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat sur Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="suivre sur X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Tirages Docker" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits le mois dernier" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Problèmes fermés" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Messages de discussion" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
#
|
45 |
+
|
46 |
+
<p align="center">
|
47 |
+
<a href="https://trendshift.io/repositories/2152" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2152" alt="langgenius%2Fdify | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
48 |
+
</p>
|
49 |
+
Dify est une plateforme de développement d'applications LLM open source. Son interface intuitive combine un flux de travail d'IA, un pipeline RAG, des capacités d'agent, une gestion de modèles, des fonctionnalités d'observabilité, et plus encore, vous permettant de passer rapidement du prototype à la production. Voici une liste des fonctionnalités principales:
|
50 |
+
</br> </br>
|
51 |
+
|
52 |
+
**1. Flux de travail**:
|
53 |
+
Construisez et testez des flux de travail d'IA puissants sur un canevas visuel, en utilisant toutes les fonctionnalités suivantes et plus encore.
|
54 |
+
|
55 |
+
|
56 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
**2. Prise en charge complète des modèles**:
|
61 |
+
Intégration transparente avec des centaines de LLM propriétaires / open source provenant de dizaines de fournisseurs d'inférence et de solutions auto-hébergées, couvrant GPT, Mistral, Llama3, et tous les modèles compatibles avec l'API OpenAI. Une liste complète des fournisseurs de modèles pris en charge se trouve [ici](https://docs.dify.ai/getting-started/readme/model-providers).
|
62 |
+
|
63 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
64 |
+
|
65 |
+
|
66 |
+
**3. IDE de prompt**:
|
67 |
+
Interface intuitive pour créer des prompts, comparer les performances des modèles et ajouter des fonctionnalités supplémentaires telles que la synthèse vocale à une application basée sur des chats.
|
68 |
+
|
69 |
+
**4. Pipeline RAG**:
|
70 |
+
Des capacités RAG étendues qui couvrent tout, de l'ingestion de documents à la récupération, avec un support prêt à l'emploi pour l'extraction de texte à partir de PDF, PPT et autres formats de document courants.
|
71 |
+
|
72 |
+
**5. Capac
|
73 |
+
|
74 |
+
ités d'agent**:
|
75 |
+
Vous pouvez définir des agents basés sur l'appel de fonction LLM ou ReAct, et ajouter des outils pré-construits ou personnalisés pour l'agent. Dify fournit plus de 50 outils intégrés pour les agents d'IA, tels que la recherche Google, DALL·E, Stable Diffusion et WolframAlpha.
|
76 |
+
|
77 |
+
**6. LLMOps**:
|
78 |
+
Surveillez et analysez les journaux d'application et les performances au fil du temps. Vous pouvez continuellement améliorer les prompts, les ensembles de données et les modèles en fonction des données de production et des annotations.
|
79 |
+
|
80 |
+
**7. Backend-as-a-Service**:
|
81 |
+
Toutes les offres de Dify sont accompagnées d'API correspondantes, vous permettant d'intégrer facilement Dify dans votre propre logique métier.
|
82 |
+
|
83 |
+
|
84 |
+
## Comparaison des fonctionnalités
|
85 |
+
<table style="width: 100%;">
|
86 |
+
<tr>
|
87 |
+
<th align="center">Fonctionnalité</th>
|
88 |
+
<th align="center">Dify.AI</th>
|
89 |
+
<th align="center">LangChain</th>
|
90 |
+
<th align="center">Flowise</th>
|
91 |
+
<th align="center">OpenAI Assistants API</th>
|
92 |
+
</tr>
|
93 |
+
<tr>
|
94 |
+
<td align="center">Approche de programmation</td>
|
95 |
+
<td align="center">API + Application</td>
|
96 |
+
<td align="center">Code Python</td>
|
97 |
+
<td align="center">Application</td>
|
98 |
+
<td align="center">API</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td align="center">LLMs pris en charge</td>
|
102 |
+
<td align="center">Grande variété</td>
|
103 |
+
<td align="center">Grande variété</td>
|
104 |
+
<td align="center">Grande variété</td>
|
105 |
+
<td align="center">Uniquement OpenAI</td>
|
106 |
+
</tr>
|
107 |
+
<tr>
|
108 |
+
<td align="center">Moteur RAG</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td align="center">Agent</td>
|
116 |
+
<td align="center">✅</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td align="center">Flux de travail</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
<td align="center">✅</td>
|
126 |
+
<td align="center">❌</td>
|
127 |
+
</tr>
|
128 |
+
<tr>
|
129 |
+
<td align="center">Observabilité</td>
|
130 |
+
<td align="center">✅</td>
|
131 |
+
<td align="center">✅</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
<td align="center">❌</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td align="center">Fonctionnalité d'entreprise (SSO/Contrôle d'accès)</td>
|
137 |
+
<td align="center">✅</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
<td align="center">❌</td>
|
141 |
+
</tr>
|
142 |
+
<tr>
|
143 |
+
<td align="center">Déploiement local</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">✅</td>
|
146 |
+
<td align="center">✅</td>
|
147 |
+
<td align="center">❌</td>
|
148 |
+
</tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
## Utiliser Dify
|
152 |
+
|
153 |
+
- **Cloud </br>**
|
154 |
+
Nous hébergeons un service [Dify Cloud](https://dify.ai) pour que tout le monde puisse l'essayer sans aucune configuration. Il fournit toutes les capacités de la version auto-hébergée et comprend 200 appels GPT-4 gratuits dans le plan bac à sable.
|
155 |
+
|
156 |
+
- **Auto-hébergement Dify Community Edition</br>**
|
157 |
+
Lancez rapidement Dify dans votre environnement avec ce [guide de démarrage](#quick-start).
|
158 |
+
Utilisez notre [documentation](https://docs.dify.ai) pour plus de références et des instructions plus détaillées.
|
159 |
+
|
160 |
+
- **Dify pour les entreprises / organisations</br>**
|
161 |
+
Nous proposons des fonctionnalités supplémentaires adaptées aux entreprises. [Envoyez-nous un e-mail](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) pour discuter des besoins de l'entreprise. </br>
|
162 |
+
> Pour les startups et les petites entreprises utilisant AWS, consultez [Dify Premium sur AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) et déployez-le dans votre propre VPC AWS en un clic. C'est une offre AMI abordable avec la possibilité de créer des applications avec un logo et une marque personnalisés.
|
163 |
+
|
164 |
+
|
165 |
+
## Rester en avance
|
166 |
+
|
167 |
+
Mettez une étoile à Dify sur GitHub et soyez instantanément informé des nouvelles versions.
|
168 |
+
|
169 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
170 |
+
|
171 |
+
|
172 |
+
|
173 |
+
## Démarrage rapide
|
174 |
+
> Avant d'installer Dify, assurez-vous que votre machine répond aux exigences système minimales suivantes:
|
175 |
+
>
|
176 |
+
>- CPU >= 2 cœurs
|
177 |
+
>- RAM >= 4 Go
|
178 |
+
|
179 |
+
</br>
|
180 |
+
|
181 |
+
La manière la plus simple de démarrer le serveur Dify est d'exécuter notre fichier [docker-compose.yml](docker/docker-compose.yaml). Avant d'exécuter la commande d'installation, assurez-vous que [Docker](https://docs.docker.com/get-docker/) et [Docker Compose](https://docs.docker.com/compose/install/) sont installés sur votre machine:
|
182 |
+
|
183 |
+
```bash
|
184 |
+
cd docker
|
185 |
+
cp .env.example .env
|
186 |
+
docker compose up -d
|
187 |
+
```
|
188 |
+
|
189 |
+
Après l'exécution, vous pouvez accéder au tableau de bord Dify dans votre navigateur à [http://localhost/install](http://localhost/install) et commencer le processus d'initialisation.
|
190 |
+
|
191 |
+
> Si vous souhaitez contribuer à Dify ou effectuer un développement supplémentaire, consultez notre [guide de déploiement à partir du code source](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)
|
192 |
+
|
193 |
+
## Prochaines étapes
|
194 |
+
|
195 |
+
Si vous devez personnaliser la configuration, veuillez vous référer aux commentaires dans notre fichier [.env.example](docker/.env.example) et mettre à jour les valeurs correspondantes dans votre fichier `.env`. De plus, vous devrez peut-être apporter des modifications au fichier `docker-compose.yaml` lui-même, comme changer les versions d'image, les mappages de ports ou les montages de volumes, en fonction de votre environnement de déploiement et de vos exigences spécifiques. Après avoir effectué des modifications, veuillez réexécuter `docker-compose up -d`. Vous pouvez trouver la liste complète des variables d'environnement disponibles [ici](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
196 |
+
|
197 |
+
Si vous souhaitez configurer une configuration haute disponibilité, la communauté fournit des [Helm Charts](https://helm.sh/) et des fichiers YAML, à travers lesquels vous pouvez déployer Dify sur Kubernetes.
|
198 |
+
|
199 |
+
- [Helm Chart par @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
200 |
+
- [Helm Chart par @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
201 |
+
- [Fichier YAML par @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
202 |
+
|
203 |
+
#### Utilisation de Terraform pour le déploiement
|
204 |
+
|
205 |
+
Déployez Dify sur une plateforme cloud en un clic en utilisant [terraform](https://www.terraform.io/)
|
206 |
+
|
207 |
+
##### Azure Global
|
208 |
+
- [Azure Terraform par @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
209 |
+
|
210 |
+
##### Google Cloud
|
211 |
+
- [Google Cloud Terraform par @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
212 |
+
|
213 |
+
## Contribuer
|
214 |
+
|
215 |
+
Pour ceux qui souhaitent contribuer du code, consultez notre [Guide de contribution](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
216 |
+
Dans le même temps, veuillez envisager de soutenir Dify en le partageant sur les réseaux sociaux et lors d'événements et de conférences.
|
217 |
+
|
218 |
+
|
219 |
+
> Nous recherchons des contributeurs pour aider à traduire Dify dans des langues autres que le mandarin ou l'anglais. Si vous êtes intéressé à aider, veuillez consulter le [README i18n](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) pour plus d'informations, et laissez-nous un commentaire dans le canal `global-users` de notre [Serveur communautaire Discord](https://discord.gg/8Tpq4AcN9c).
|
220 |
+
|
221 |
+
**Contributeurs**
|
222 |
+
|
223 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
224 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
225 |
+
</a>
|
226 |
+
|
227 |
+
## Communauté & Contact
|
228 |
+
|
229 |
+
* [Discussion GitHub](https://github.com/langgenius/dify/discussions). Meilleur pour: partager des commentaires et poser des questions.
|
230 |
+
* [Problèmes GitHub](https://github.com/langgenius/dify/issues). Meilleur pour: les bogues que vous rencontrez en utilisant Dify.AI et les propositions de fonctionnalités. Consultez notre [Guide de contribution](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
231 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Meilleur pour: partager vos applications et passer du temps avec la communauté.
|
232 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Meilleur pour: partager vos applications et passer du temps avec la communauté.
|
233 |
+
|
234 |
+
## Historique des étoiles
|
235 |
+
|
236 |
+
[![Graphique de l'historique des étoiles](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
237 |
+
|
238 |
+
|
239 |
+
## Divulgation de sécurité
|
240 |
+
|
241 |
+
Pour protéger votre vie privée, veuillez éviter de publier des problèmes de sécurité sur GitHub. Au lieu de cela, envoyez vos questions à [email protected] et nous vous fournirons une réponse plus détaillée.
|
242 |
+
|
243 |
+
## Licence
|
244 |
+
|
245 |
+
Ce référentiel est disponible sous la [Licence open source Dify](LICENSE), qui est essentiellement l'Apache 2.0 avec quelques restrictions supplémentaires.
|
README_JA.md
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">セルフホスティング</a> ·
|
6 |
+
<a href="https://docs.dify.ai">ドキュメント</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">企業のお問い合わせ(英語のみ)</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="Discordでチャット"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="X(Twitter)でフォロー"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="先月のコミット" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="クローズされた問題" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="ディスカッション投稿" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
#
|
45 |
+
|
46 |
+
<p align="center">
|
47 |
+
<a href="https://trendshift.io/repositories/2152" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2152" alt="langgenius%2Fdify | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
48 |
+
</p>
|
49 |
+
|
50 |
+
DifyはオープンソースのLLMアプリケーション開発プラットフォームです。直感的なインターフェイスには、AIワークフロー、RAGパイプライン、エージェント機能、モデル管理、観測機能などが組み合わさっており、プロトタイプから生産まで迅速に進めることができます。以下の機能が含まれます:
|
51 |
+
</br> </br>
|
52 |
+
|
53 |
+
**1. ワークフロー**:
|
54 |
+
強力なAIワークフローをビジュアルキャンバス上で構築し、テストできます。すべての機能、および以下の機能を使用できます。
|
55 |
+
|
56 |
+
|
57 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
**2. 総合的なモデルサポート**:
|
62 |
+
数百ものプロプライエタリ/オープンソースのLLMと、数十もの推論プロバイダーおよびセルフホスティングソリューションとのシームレスな統合を提供します。GPT、Mistral、Llama3、OpenAI APIと互換性のあるすべてのモデルを統合されています。サポートされているモデルプロバイダーの完全なリストは[こちら](https://docs.dify.ai/getting-started/readme/model-providers)をご覧ください。
|
63 |
+
|
64 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
65 |
+
|
66 |
+
|
67 |
+
**3. プロンプトIDE**:
|
68 |
+
プロンプトの作成、モデルパフォーマンスの比較が行え、チャットベースのアプリに音声合成などの機能も追加できます。
|
69 |
+
|
70 |
+
**4. RAGパイプライン**:
|
71 |
+
ドキュメントの取り込みから検索までをカバーする広範なRAG機能ができます。ほかにもPDF、PPT、その他の一般的なドキュメントフォーマットからのテキスト抽出のサポートも提供します。
|
72 |
+
|
73 |
+
**5. エージェント機能**:
|
74 |
+
LLM Function CallingやReActに基づくエージェントの定義が可能で、AIエージェント用のプリビルトまたはカスタムツールを追加できます。Difyには、Google検索、DALL·E、Stable Diffusion、WolframAlphaなどのAIエージェント用の50以上の組み込みツールが提供します。
|
75 |
+
|
76 |
+
**6. LLMOps**:
|
77 |
+
アプリケーションのログやパフォーマンスを監視と分析し、生産のデータと注釈に基づいて、プロンプト、データセット、モデルを継続的に改善できます。
|
78 |
+
|
79 |
+
**7. Backend-as-a-Service**:
|
80 |
+
すべての機能はAPIを提供されており、Difyを自分のビジネスロジックに簡単に統合できます。
|
81 |
+
|
82 |
+
|
83 |
+
## 機能比較
|
84 |
+
<table style="width: 100%;">
|
85 |
+
<tr>
|
86 |
+
<th align="center">機能</th>
|
87 |
+
<th align="center">Dify.AI</th>
|
88 |
+
<th align="center">LangChain</th>
|
89 |
+
<th align="center">Flowise</th>
|
90 |
+
<th align="center">OpenAI Assistants API</th>
|
91 |
+
</tr>
|
92 |
+
<tr>
|
93 |
+
<td align="center">プログラミングアプローチ</td>
|
94 |
+
<td align="center">API + アプリ指向</td>
|
95 |
+
<td align="center">Pythonコード</td>
|
96 |
+
<td align="center">アプリ指向</td>
|
97 |
+
<td align="center">API指向</td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<td align="center">サポートされているLLM</td>
|
101 |
+
<td align="center">バラエティ豊か</td>
|
102 |
+
<td align="center">バラエティ豊か</td>
|
103 |
+
<td align="center">バラエティ豊か</td>
|
104 |
+
<td align="center">OpenAIのみ</td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td align="center">RAGエンジン</td>
|
108 |
+
<td align="center">✅</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
</tr>
|
113 |
+
<tr>
|
114 |
+
<td align="center">エージェント</td>
|
115 |
+
<td align="center">✅</td>
|
116 |
+
<td align="center">✅</td>
|
117 |
+
<td align="center">❌</td>
|
118 |
+
<td align="center">✅</td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<td align="center">ワークフロー</td>
|
122 |
+
<td align="center">✅</td>
|
123 |
+
<td align="center">❌</td>
|
124 |
+
<td align="center">✅</td>
|
125 |
+
<td align="center">❌</td>
|
126 |
+
</tr>
|
127 |
+
<tr>
|
128 |
+
<td align="center">観測性</td>
|
129 |
+
<td align="center">✅</td>
|
130 |
+
<td align="center">✅</td>
|
131 |
+
<td align="center">❌</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td align="center">エンタープライズ機能(SSO/アクセス制御)</td>
|
136 |
+
<td align="center">✅</td>
|
137 |
+
<td align="center">❌</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
</tr>
|
141 |
+
<tr>
|
142 |
+
<td align="center">ローカル展開</td>
|
143 |
+
<td align="center">✅</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">✅</td>
|
146 |
+
<td align="center">❌</td>
|
147 |
+
</tr>
|
148 |
+
</table>
|
149 |
+
|
150 |
+
## Difyの使用方法
|
151 |
+
|
152 |
+
- **クラウド </br>**
|
153 |
+
[こちら](https://dify.ai)のDify Cloudサービスを利用して、セットアップ不要で試すことができます。サンドボックスプランには、200回のGPT-4呼び出しが無料で含まれています。
|
154 |
+
|
155 |
+
- **Dify Community Editionのセルフホスティング</br>**
|
156 |
+
この[スタートガイド](#quick-start)を使用して、ローカル環境でDifyを簡単に実行できます。
|
157 |
+
詳しくは[ドキュメント](https://docs.dify.ai)をご覧ください。
|
158 |
+
|
159 |
+
- **企業/組織向けのDify</br>**
|
160 |
+
企業中心の機能を提供しています。[メールを送信](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry)して企業のニーズについて相談してください。 </br>
|
161 |
+
> AWSを使用しているスタートアップ企業や中小企業の場合は、[AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6)のDify Premiumをチェックして、ワンクリックで自分のAWS VPCにデプロイできます。さらに、手頃な価格のAMIオファリングどして、ロゴやブランディングをカスタマイズしてアプリケーションを作成するオプションがあります。
|
162 |
+
|
163 |
+
|
164 |
+
## 最新の情報を入手
|
165 |
+
|
166 |
+
GitHub上でDifyにスターを付けることで、Difyに関する新しいニュースを受け取れます。
|
167 |
+
|
168 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
## クイックスタート
|
173 |
+
> Difyをインストールする前に、お使いのマシンが以下の最小システム要件を満たしていることを確認してください:
|
174 |
+
>
|
175 |
+
>- CPU >= 2コア
|
176 |
+
>- RAM >= 4GB
|
177 |
+
|
178 |
+
</br>
|
179 |
+
|
180 |
+
Difyサーバー��起動する最も簡単な方法は、[docker-compose.yml](docker/docker-compose.yaml)ファイルを実行することです。インストールコマンドを実行する前に、マシンに[Docker](https://docs.docker.com/get-docker/)と[Docker Compose](https://docs.docker.com/compose/install/)がインストールされていることを確認してください。
|
181 |
+
|
182 |
+
```bash
|
183 |
+
cd docker
|
184 |
+
cp .env.example .env
|
185 |
+
docker compose up -d
|
186 |
+
```
|
187 |
+
|
188 |
+
実行後、ブラウザで[http://localhost/install](http://localhost/install)にアクセスし、初期化プロセスを開始できます。
|
189 |
+
|
190 |
+
> Difyに貢献したり、追加の開発を行う場合は、[ソースコードからのデプロイガイド](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)を参照してください。
|
191 |
+
|
192 |
+
## 次のステップ
|
193 |
+
|
194 |
+
設定をカスタマイズする必要がある場合は、[.env.example](docker/.env.example) ファイルのコメントを参照し、`.env` ファイルの対応する値を更新してください。さらに、デプロイ環境や要件に応じて、`docker-compose.yaml` ファイル自体を調整する必要がある場合があります。たとえば、イメージのバージョン、ポートのマッピング、ボリュームのマウントなどを変更します。変更を加えた後は、`docker-compose up -d` を再実行してください。利用可能な環境変数の全一覧は、[こちら](https://docs.dify.ai/getting-started/install-self-hosted/environments)で確認できます。
|
195 |
+
|
196 |
+
高可用性設定を設定する必要がある場合、コミュニティは[Helm Charts](https://helm.sh/)とYAMLファイルにより、DifyをKubernetesにデプロイすることができます。
|
197 |
+
|
198 |
+
- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
199 |
+
- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
200 |
+
- [YAML file by @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
201 |
+
|
202 |
+
#### Terraformを使用したデプロイ
|
203 |
+
|
204 |
+
[terraform](https://www.terraform.io/) を使用して、ワンクリックでDifyをクラウドプラットフォームにデプロイします
|
205 |
+
|
206 |
+
##### Azure Global
|
207 |
+
- [@nikawangによるAzure Terraform](https://github.com/nikawang/dify-azure-terraform)
|
208 |
+
|
209 |
+
##### Google Cloud
|
210 |
+
- [@sotazumによるGoogle Cloud Terraform](https://github.com/DeNA/dify-google-cloud-terraform)
|
211 |
+
|
212 |
+
## 貢献
|
213 |
+
|
214 |
+
コードに貢献したい方は、[Contribution Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md)を参照してください。
|
215 |
+
同時に、DifyをSNSやイベント、カンファレンスで共有してサポートしていただけると幸いです。
|
216 |
+
|
217 |
+
|
218 |
+
> Difyを英語または中国語以外の言語に翻訳してくれる貢献者を募集しています。興味がある場合は、詳細については[i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md)を参照してください。また、[Discordコミュニティサーバー](https://discord.gg/8Tpq4AcN9c)の`global-users`チャンネルにコメントを残してください。
|
219 |
+
|
220 |
+
**貢献者**
|
221 |
+
|
222 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
223 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
224 |
+
</a>
|
225 |
+
|
226 |
+
## コミュニティ & お問い合わせ
|
227 |
+
|
228 |
+
* [Github Discussion](https://github.com/langgenius/dify/discussions). 主に: フィードバックの共有や質問。
|
229 |
+
* [GitHub Issues](https://github.com/langgenius/dify/issues). 主に: Dify.AIを使用する際に発生するエラーや問題については、[貢献ガイド](CONTRIBUTING_JA.md)を参照してください
|
230 |
+
* [Discord](https://discord.gg/FngNHpbcY7). 主に: アプリケーションの共有やコミュニティとの交流。
|
231 |
+
* [X(Twitter)](https://twitter.com/dify_ai). 主に: アプリケーションの共有やコミュニティとの交流。
|
232 |
+
|
233 |
+
|
234 |
+
|
235 |
+
## ライセンス
|
236 |
+
|
237 |
+
このリポジトリは、Dify Open Source License にいくつかの追加制限を加えた[Difyオープンソースライセンス](LICENSE)の下で利用可能です。
|
README_KL.md
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Self-hosting</a> ·
|
6 |
+
<a href="https://docs.dify.ai">Documentation</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Commercial enquiries</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat on Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="follow on X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
#
|
45 |
+
|
46 |
+
<p align="center">
|
47 |
+
<a href="https://trendshift.io/repositories/2152" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2152" alt="langgenius%2Fdify | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
48 |
+
</p>
|
49 |
+
Dify is an open-source LLM app development platform. Its intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production. Here's a list of the core features:
|
50 |
+
</br> </br>
|
51 |
+
|
52 |
+
**1. Workflow**:
|
53 |
+
Build and test powerful AI workflows on a visual canvas, leveraging all the following features and beyond.
|
54 |
+
|
55 |
+
|
56 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
**2. Comprehensive model support**:
|
61 |
+
Seamless integration with hundreds of proprietary / open-source LLMs from dozens of inference providers and self-hosted solutions, covering GPT, Mistral, Llama3, and any OpenAI API-compatible models. A full list of supported model providers can be found [here](https://docs.dify.ai/getting-started/readme/model-providers).
|
62 |
+
|
63 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
64 |
+
|
65 |
+
|
66 |
+
**3. Prompt IDE**:
|
67 |
+
Intuitive interface for crafting prompts, comparing model performance, and adding additional features such as text-to-speech to a chat-based app.
|
68 |
+
|
69 |
+
**4. RAG Pipeline**:
|
70 |
+
Extensive RAG capabilities that cover everything from document ingestion to retrieval, with out-of-box support for text extraction from PDFs, PPTs, and other common document formats.
|
71 |
+
|
72 |
+
**5. Agent capabilities**:
|
73 |
+
You can define agents based on LLM Function Calling or ReAct, and add pre-built or custom tools for the agent. Dify provides 50+ built-in tools for AI agents, such as Google Search, DALL·E, Stable Diffusion and WolframAlpha.
|
74 |
+
|
75 |
+
**6. LLMOps**:
|
76 |
+
Monitor and analyze application logs and performance over time. You could continuously improve prompts, datasets, and models based on production data and annotations.
|
77 |
+
|
78 |
+
**7. Backend-as-a-Service**:
|
79 |
+
All of Dify's offerings come with corresponding APIs, so you could effortlessly integrate Dify into your own business logic.
|
80 |
+
|
81 |
+
|
82 |
+
## Feature Comparison
|
83 |
+
<table style="width: 100%;">
|
84 |
+
<tr
|
85 |
+
|
86 |
+
>
|
87 |
+
<th align="center">Feature</th>
|
88 |
+
<th align="center">Dify.AI</th>
|
89 |
+
<th align="center">LangChain</th>
|
90 |
+
<th align="center">Flowise</th>
|
91 |
+
<th align="center">OpenAI Assistants API</th>
|
92 |
+
</tr>
|
93 |
+
<tr>
|
94 |
+
<td align="center">Programming Approach</td>
|
95 |
+
<td align="center">API + App-oriented</td>
|
96 |
+
<td align="center">Python Code</td>
|
97 |
+
<td align="center">App-oriented</td>
|
98 |
+
<td align="center">API-oriented</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td align="center">Supported LLMs</td>
|
102 |
+
<td align="center">Rich Variety</td>
|
103 |
+
<td align="center">Rich Variety</td>
|
104 |
+
<td align="center">Rich Variety</td>
|
105 |
+
<td align="center">OpenAI-only</td>
|
106 |
+
</tr>
|
107 |
+
<tr>
|
108 |
+
<td align="center">RAG Engine</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td align="center">Agent</td>
|
116 |
+
<td align="center">✅</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td align="center">Workflow</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
<td align="center">✅</td>
|
126 |
+
<td align="center">❌</td>
|
127 |
+
</tr>
|
128 |
+
<tr>
|
129 |
+
<td align="center">Observability</td>
|
130 |
+
<td align="center">✅</td>
|
131 |
+
<td align="center">✅</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
<td align="center">❌</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td align="center">Enterprise Feature (SSO/Access control)</td>
|
137 |
+
<td align="center">✅</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
<td align="center">❌</td>
|
141 |
+
</tr>
|
142 |
+
<tr>
|
143 |
+
<td align="center">Local Deployment</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">✅</td>
|
146 |
+
<td align="center">✅</td>
|
147 |
+
<td align="center">❌</td>
|
148 |
+
</tr>
|
149 |
+
</table>
|
150 |
+
|
151 |
+
## Using Dify
|
152 |
+
|
153 |
+
- **Cloud </br>**
|
154 |
+
We host a [Dify Cloud](https://dify.ai) service for anyone to try with zero setup. It provides all the capabilities of the self-deployed version, and includes 200 free GPT-4 calls in the sandbox plan.
|
155 |
+
|
156 |
+
- **Self-hosting Dify Community Edition</br>**
|
157 |
+
Quickly get Dify running in your environment with this [starter guide](#quick-start).
|
158 |
+
Use our [documentation](https://docs.dify.ai) for further references and more in-depth instructions.
|
159 |
+
|
160 |
+
- **Dify for Enterprise / Organizations</br>**
|
161 |
+
We provide additional enterprise-centric features. [Send us an email](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) to discuss enterprise needs. </br>
|
162 |
+
> For startups and small businesses using AWS, check out [Dify Premium on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) and deploy it to your own AWS VPC with one-click. It's an affordable AMI offering with the option to create apps with custom logo and branding.
|
163 |
+
|
164 |
+
|
165 |
+
## Staying ahead
|
166 |
+
|
167 |
+
Star Dify on GitHub and be instantly notified of new releases.
|
168 |
+
|
169 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
170 |
+
|
171 |
+
|
172 |
+
|
173 |
+
## Quick Start
|
174 |
+
> Before installing Dify, make sure your machine meets the following minimum system requirements:
|
175 |
+
>
|
176 |
+
>- CPU >= 2 Core
|
177 |
+
>- RAM >= 4GB
|
178 |
+
|
179 |
+
</br>
|
180 |
+
|
181 |
+
The easiest way to start the Dify server is to run our [docker-compose.yml](docker/docker-compose.yaml) file. Before running the installation command, make sure that [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed on your machine:
|
182 |
+
|
183 |
+
```bash
|
184 |
+
cd docker
|
185 |
+
cp .env.example .env
|
186 |
+
docker compose up -d
|
187 |
+
```
|
188 |
+
|
189 |
+
After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization process.
|
190 |
+
|
191 |
+
> If you'd like to contribute to Dify or do additional development, refer to our [guide to deploying from source code](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)
|
192 |
+
|
193 |
+
## Next steps
|
194 |
+
|
195 |
+
If you need to customize the configuration, please refer to the comments in our [.env.example](docker/.env.example) file and update the corresponding values in your `.env` file. Additionally, you might need to make adjustments to the `docker-compose.yaml` file itself, such as changing image versions, port mappings, or volume mounts, based on your specific deployment environment and requirements. After making any changes, please re-run `docker-compose up -d`. You can find the full list of available environment variables [here](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
196 |
+
|
197 |
+
If you'd like to configure a highly-available setup, there are community-contributed [Helm Charts](https://helm.sh/) and YAML files which allow Dify to be deployed on Kubernetes.
|
198 |
+
|
199 |
+
- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
200 |
+
- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
201 |
+
- [YAML file by @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
202 |
+
|
203 |
+
#### Terraform atorlugu pilersitsineq
|
204 |
+
|
205 |
+
wa'logh nIqHom neH ghun deployment toy'wI' [terraform](https://www.terraform.io/) lo'laH.
|
206 |
+
|
207 |
+
##### Azure Global
|
208 |
+
- [Azure Terraform mung @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
209 |
+
|
210 |
+
##### Google Cloud
|
211 |
+
- [Google Cloud Terraform qachlot @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
212 |
+
|
213 |
+
## Contributing
|
214 |
+
|
215 |
+
For those who'd like to contribute code, see our [Contribution Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
216 |
+
At the same time, please consider supporting Dify by sharing it on social media and at events and conferences.
|
217 |
+
|
218 |
+
|
219 |
+
> We are looking for contributors to help with translating Dify to languages other than Mandarin or English. If you are interested in helping, please see the [i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) for more information, and leave us a comment in the `global-users` channel of our [Discord Community Server](https://discord.gg/8Tpq4AcN9c).
|
220 |
+
|
221 |
+
**Contributors**
|
222 |
+
|
223 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
224 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
225 |
+
</a>
|
226 |
+
|
227 |
+
## Community & Contact
|
228 |
+
|
229 |
+
* [Github Discussion](https://github.com/langgenius/dify/discussions
|
230 |
+
|
231 |
+
). Best for: sharing feedback and asking questions.
|
232 |
+
* [GitHub Issues](https://github.com/langgenius/dify/issues). Best for: bugs you encounter using Dify.AI, and feature proposals. See our [Contribution Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
233 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Best for: sharing your applications and hanging out with the community.
|
234 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Best for: sharing your applications and hanging out with the community.
|
235 |
+
|
236 |
+
## Star History
|
237 |
+
|
238 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
239 |
+
|
240 |
+
|
241 |
+
## Security Disclosure
|
242 |
+
|
243 |
+
To protect your privacy, please avoid posting security issues on GitHub. Instead, send your questions to [email protected] and we will provide you with a more detailed answer.
|
244 |
+
|
245 |
+
## License
|
246 |
+
|
247 |
+
This repository is available under the [Dify Open Source License](LICENSE), which is essentially Apache 2.0 with a few additional restrictions.
|
README_KR.md
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify 클라우드</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">셀프-호스팅</a> ·
|
6 |
+
<a href="https://docs.dify.ai">문서</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">기업 문의 (영어만 가능)</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat on Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="follow on X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
|
45 |
+
Dify는 오픈 소스 LLM 앱 개발 플랫폼입니다. 직관적인 인터페이스를 통해 AI 워크플로우, RAG 파이프라인, 에이전트 기능, 모델 관리, 관찰 기능 등을 결합하여 프로토타입에서 프로덕션까지 빠르게 전환할 수 있습니다. 주요 기능 목록은 다음과 같습니다:</br> </br>
|
46 |
+
|
47 |
+
**1. 워크플로우**:
|
48 |
+
다음 기능들을 비롯한 다양한 기능을 활용하여 시각적 캔버스에서 강력한 AI 워크플로우를 구축하고 테스트하세요.
|
49 |
+
|
50 |
+
|
51 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
**2. 포괄적인 모델 지원:**:
|
56 |
+
|
57 |
+
수십 개의 추론 제공업체와 자체 호스팅 솔루션에서 제공하는 수백 개의 독점 및 오픈 소스 LLM과 원활하게 통합되며, GPT, Mistral, Llama3 및 모든 OpenAI API 호환 모델을 포함합니다. 지원되는 모델 제공업체의 전체 목록은 [여기](https://docs.dify.ai/getting-started/readme/model-providers)에서 확인할 수 있습니다.
|
58 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
59 |
+
|
60 |
+
|
61 |
+
**3. 통합 개발환경**:
|
62 |
+
프롬프트를 작성하고, 모델 성능을 비교하며, 텍스트-음성 변환과 같은 추가 기능을 채팅 기반 앱에 추가할 수 있는 직관적인 인터페이스를 제공합니다.
|
63 |
+
|
64 |
+
**4. RAG 파이프라인**:
|
65 |
+
문서 수집부터 검색까지 모든 것을 다루며, PDF, PPT 및 기타 일반적인 문서 형식에서 텍스트 추출을 위한 기본 지원이 포함되어 있는 광범위한 RAG 기능을 제공합니다.
|
66 |
+
|
67 |
+
**5. 에이전트 기능**:
|
68 |
+
LLM 함수 호출 또는 ReAct를 기반으로 에이전트를 정의하고 에이전트에 대해 사전 구축된 도구나 사용자 정의 도구를 추가할 수 있습니다. Dify는 Google Search, DALL·E, Stable Diffusion, WolframAlpha 등 AI 에이전트를 위한 50개 이상의 내장 도구를 제공합니다.
|
69 |
+
|
70 |
+
**6. LLMOps**:
|
71 |
+
시간 경과에 따른 애플리케이션 로그와 성능을 모니터링하고 분석합니다. 생산 데이터와 주석을 기반으로 프롬프트, 데이터세트, 모델을 지속적으로 개선할 수 있습니다.
|
72 |
+
|
73 |
+
**7. Backend-as-a-Service**:
|
74 |
+
Dify의 모든 제품에는 해당 API가 함께 제공되므로 Dify를 자신의 비즈니스 로직에 쉽게 통합할 수 있습니다.
|
75 |
+
|
76 |
+
## 기능 비교
|
77 |
+
<table style="width: 100%;">
|
78 |
+
<tr>
|
79 |
+
<th align="center">기능</th>
|
80 |
+
<th align="center">Dify.AI</th>
|
81 |
+
<th align="center">LangChain</th>
|
82 |
+
<th align="center">Flowise</th>
|
83 |
+
<th align="center">OpenAI Assistants API</th>
|
84 |
+
</tr>
|
85 |
+
<tr>
|
86 |
+
<td align="center">프로그래밍 접근 방식</td>
|
87 |
+
<td align="center">API + 앱 중심</td>
|
88 |
+
<td align="center">Python 코드</td>
|
89 |
+
<td align="center">앱 중심</td>
|
90 |
+
<td align="center">API 중심</td>
|
91 |
+
</tr>
|
92 |
+
<tr>
|
93 |
+
<td align="center">지원되는 LLMs</td>
|
94 |
+
<td align="center">다양한 종류</td>
|
95 |
+
<td align="center">다양한 종류</td>
|
96 |
+
<td align="center">다양한 종류</td>
|
97 |
+
<td align="center">OpenAI 전용</td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<td align="center">RAG 엔진</td>
|
101 |
+
<td align="center">✅</td>
|
102 |
+
<td align="center">✅</td>
|
103 |
+
<td align="center">✅</td>
|
104 |
+
<td align="center">✅</td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td align="center">에이전트</td>
|
108 |
+
<td align="center">✅</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">❌</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
</tr>
|
113 |
+
<tr>
|
114 |
+
<td align="center">워크플로우</td>
|
115 |
+
<td align="center">✅</td>
|
116 |
+
<td align="center">❌</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<td align="center">가시성</td>
|
122 |
+
<td align="center">✅</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
<td align="center">❌</td>
|
126 |
+
</tr>
|
127 |
+
<tr>
|
128 |
+
<td align="center">기업용 기능 (SSO/접근 제어)</td>
|
129 |
+
<td align="center">✅</td>
|
130 |
+
<td align="center">❌</td>
|
131 |
+
<td align="center">❌</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td align="center">로컬 배포</td>
|
136 |
+
<td align="center">✅</td>
|
137 |
+
<td align="center">✅</td>
|
138 |
+
<td align="center">✅</td>
|
139 |
+
<td align="center">❌</td>
|
140 |
+
</tr>
|
141 |
+
</table>
|
142 |
+
|
143 |
+
## Dify 사용하기
|
144 |
+
|
145 |
+
- **클라우드 </br>**
|
146 |
+
우리는 누구나 설정이 필요 없이 사용해 볼 수 있도록 [Dify 클라우드](https://dify.ai) 서비스를 호스팅합니다. 이는 자체 배포 버전의 모든 기능을 제공하며, 샌드박스 플랜에서 무료로 200회의 GPT-4 호출을 포함합니다.
|
147 |
+
|
148 |
+
- **셀프-호스팅 Dify 커뮤니티 에디션</br>**
|
149 |
+
환경에서 Dify를 빠르게 실행하려면 이 [스타터 가이드를](#quick-start) 참조하세요.
|
150 |
+
추가 참조 및 더 심층적인 지침은 [문서](https://docs.dify.ai)를 사용하세요.
|
151 |
+
|
152 |
+
- **기업 / 조직을 위한 Dify</br>**
|
153 |
+
우리는 추가적인 기업 중심 기능을 제공합니다. 잡거나 [이메일 보내기](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry)를 통해 기업 요구 사항을 논의하십시오. </br>
|
154 |
+
> AWS를 사용하는 스타트업 및 중소기업의 경우 [AWS Marketplace에서 Dify Premium](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6)을 확인하고 한 번의 클릭으로 자체 AWS VPC에 배포하십시오. 맞춤형 로고와 브랜딩이 포함된 앱을 생성할 수 있는 옵션이 포함된 저렴한 AMI 제품입니다.
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
## 앞서가기
|
159 |
+
|
160 |
+
GitHub에서 Dify에 별표를 찍어 새로운 릴리스를 즉시 알림 받으세요.
|
161 |
+
|
162 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
## 빠른 시작
|
167 |
+
>Dify를 설치하기 전에 컴퓨터가 다음과 같은 최소 시스템 요구 사항을 충족하는지 확인하세요 :
|
168 |
+
>- CPU >= 2 Core
|
169 |
+
>- RAM >= 4GB
|
170 |
+
|
171 |
+
</br>
|
172 |
+
|
173 |
+
Dify 서버를 시작하는 가장 쉬운 방법은 [docker-compose.yml](docker/docker-compose.yaml) 파일을 실행하는 것입니다. 설치 명령을 실행하기 전에 [Docker](https://docs.docker.com/get-docker/) 및 [Docker Compose](https://docs.docker.com/compose/install/)가 머신에 설치되어 있는지 확인하세요.
|
174 |
+
|
175 |
+
```bash
|
176 |
+
cd docker
|
177 |
+
cp .env.example .env
|
178 |
+
docker compose up -d
|
179 |
+
```
|
180 |
+
|
181 |
+
실행 후 브라우저의 [http://localhost/install](http://localhost/install) 에서 Dify 대시보드에 액세스하고 초기화 프로세스를 시작할 수 있습니다.
|
182 |
+
|
183 |
+
> Dify에 기여하거나 추가 개발을 하고 싶다면 소스 코드에서 [배포에 대한 가이드](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code)를 참조하세요.
|
184 |
+
|
185 |
+
## 다음 단계
|
186 |
+
|
187 |
+
구성을 사용자 정의해야 하는 경우 [.env.example](docker/.env.example) 파일의 주석을 참조하고 `.env` 파일에서 해당 값을 업데이트하십시오. 또한 특정 배포 환경 및 요구 사항에 따라 `docker-compose.yaml` 파일 자체를 조정해야 할 수도 있습니다. 예를 들어 이미지 버전, 포트 매핑 또는 볼륨 마운트를 변경합니다. 변경 한 후 `docker-compose up -d`를 다시 실행하십시오. 사용 가능한 환경 변수의 전체 목록은 [여기](https://docs.dify.ai/getting-started/install-self-hosted/environments)에서 찾을 수 있습니다.
|
188 |
+
|
189 |
+
Dify를 Kubernetes에 배포하고 프리미엄 스케일링 설정을 구성했다는 커뮤니티가 제공하는 [Helm Charts](https://helm.sh/)와 YAML 파일이 존재합니다.
|
190 |
+
|
191 |
+
- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
192 |
+
- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
193 |
+
- [YAML file by @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
194 |
+
|
195 |
+
#### Terraform을 사용한 배포
|
196 |
+
|
197 |
+
[terraform](https://www.terraform.io/)을 사용하여 단 한 번의 클릭으로 Dify를 클라우드 플랫폼에 배포하십시오
|
198 |
+
|
199 |
+
##### Azure Global
|
200 |
+
- [nikawang의 Azure Terraform](https://github.com/nikawang/dify-azure-terraform)
|
201 |
+
|
202 |
+
##### Google Cloud
|
203 |
+
- [sotazum의 Google Cloud Terraform](https://github.com/DeNA/dify-google-cloud-terraform)
|
204 |
+
|
205 |
+
## 기여
|
206 |
+
|
207 |
+
코드에 기여하고 싶은 분들은 [기여 가이드](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md)를 참조하세요.
|
208 |
+
동시에 Dify를 소셜 미디어와 행사 및 컨퍼런스에 공유하여 지원하는 것을 고려해 주시기 바랍니다.
|
209 |
+
|
210 |
+
|
211 |
+
> 우리는 Dify를 중국어나 영어 이외의 언어로 번역하는 데 도움을 줄 수 있는 기여자를 찾고 있습니다. 도움을 주고 싶으시다면 [i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md)에서 더 많은 정보를 확인하시고 [Discord 커뮤니티 서버](https://discord.gg/8Tpq4AcN9c)의 `global-users` 채널에 댓글을 남겨주세요.
|
212 |
+
|
213 |
+
**기여자**
|
214 |
+
|
215 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
216 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
217 |
+
</a>
|
218 |
+
|
219 |
+
## 커뮤니티 & 연락처
|
220 |
+
|
221 |
+
* [Github 토론](https://github.com/langgenius/dify/discussions). 피드백 공유 및 질문하기에 적합합니다.
|
222 |
+
* [GitHub 이슈](https://github.com/langgenius/dify/issues). Dify.AI 사용 중 발견한 버그와 기능 제안에 적합합니다. [기여 가이드](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md)를 참조하세요.
|
223 |
+
* [디스코드](https://discord.gg/FngNHpbcY7). 애플리케이션 공유 및 커뮤니티와 소통하기에 적합합니다.
|
224 |
+
* [트위터](https://twitter.com/dify_ai). 애플리케이션 공유 및 커뮤니티와 소통하기에 적합합니다.
|
225 |
+
|
226 |
+
|
227 |
+
## Star 히스토리
|
228 |
+
|
229 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
230 |
+
|
231 |
+
|
232 |
+
## 보안 공개
|
233 |
+
|
234 |
+
개인정보 보호를 위해 보안 문제를 GitHub에 게시하지 마십시오. 대신 [email protected]로 질문을 보내주시면 더 자세한 답변을 드리겠습니다.
|
235 |
+
|
236 |
+
## 라이선스
|
237 |
+
|
238 |
+
이 저장소는 기본적으로 몇 가지 추가 제한 사항이 있는 Apache 2.0인 [Dify 오픈 소스 라이선스](LICENSE)에 따라 사용할 수 있습니다.
|
README_PT.md
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
📌 <a href="https://dify.ai/blog/introducing-dify-workflow-file-upload-a-demo-on-ai-podcast">Introduzindo o Dify Workflow com Upload de Arquivo: Recrie o Podcast Google NotebookLM</a>
|
5 |
+
</p>
|
6 |
+
|
7 |
+
<p align="center">
|
8 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
9 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Auto-hospedagem</a> ·
|
10 |
+
<a href="https://docs.dify.ai">Documentação</a> ·
|
11 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Consultas empresariais</a>
|
12 |
+
</p>
|
13 |
+
|
14 |
+
<p align="center">
|
15 |
+
<a href="https://dify.ai" target="_blank">
|
16 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
17 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
18 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
19 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
20 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
21 |
+
alt="chat on Discord"></a>
|
22 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
23 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
24 |
+
alt="follow on X(Twitter)"></a>
|
25 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
26 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
28 |
+
<img alt="Commits last month" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
29 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
30 |
+
<img alt="Issues closed" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
31 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
32 |
+
<img alt="Discussion posts" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
33 |
+
</p>
|
34 |
+
|
35 |
+
<p align="center">
|
36 |
+
<a href="./README.md"><img alt="README em Inglês" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
37 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
38 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
39 |
+
<a href="./README_ES.md"><img alt="README em Espanhol" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
40 |
+
<a href="./README_FR.md"><img alt="README em Francês" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
41 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
42 |
+
<a href="./README_KR.md"><img alt="README em Coreano" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
43 |
+
<a href="./README_AR.md"><img alt="README em Árabe" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
44 |
+
<a href="./README_TR.md"><img alt="README em Turco" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
45 |
+
<a href="./README_VI.md"><img alt="README em Vietnamita" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
46 |
+
<a href="./README_PT.md"><img alt="README em Português - BR" src="https://img.shields.io/badge/Portugu%C3%AAs-BR?style=flat&label=BR&color=d9d9d9"></a>
|
47 |
+
</p>
|
48 |
+
|
49 |
+
Dify é uma plataforma de desenvolvimento de aplicativos LLM de código aberto. Sua interface intuitiva combina workflow de IA, pipeline RAG, capacidades de agente, gerenciamento de modelos, recursos de observabilidade e muito mais, permitindo que você vá rapidamente do protótipo à produção. Aqui está uma lista das principais funcionalidades:
|
50 |
+
</br> </br>
|
51 |
+
|
52 |
+
**1. Workflow**:
|
53 |
+
Construa e teste workflows poderosos de IA em uma interface visual, aproveitando todos os recursos a seguir e muito mais.
|
54 |
+
|
55 |
+
|
56 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
**2. Suporte abrangente a modelos**:
|
61 |
+
Integração perfeita com centenas de LLMs proprietários e de código aberto de diversas provedoras e soluções auto-hospedadas, abrangendo GPT, Mistral, Llama3 e qualquer modelo compatível com a API da OpenAI. A lista completa de provedores suportados pode ser encontrada [aqui](https://docs.dify.ai/getting-started/readme/model-providers).
|
62 |
+
|
63 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
64 |
+
|
65 |
+
|
66 |
+
**3. IDE de Prompt**:
|
67 |
+
Interface intuitiva para criação de prompts, comparação de desempenho de modelos e adição de recursos como conversão de texto para fala em um aplicativo baseado em chat.
|
68 |
+
|
69 |
+
**4. Pipeline RAG**:
|
70 |
+
Extensas capacidades de RAG que cobrem desde a ingestão de documentos até a recuperação, com suporte nativo para extração de texto de PDFs, PPTs e outros formatos de documentos comuns.
|
71 |
+
|
72 |
+
**5. Capacidades de agente**:
|
73 |
+
Você pode definir agentes com base em LLM Function Calling ou ReAct e adicionar ferramentas pré-construídas ou personalizadas para o agente. O Dify oferece mais de 50 ferramentas integradas para agentes de IA, como Google Search, DALL·E, Stable Diffusion e WolframAlpha.
|
74 |
+
|
75 |
+
**6. LLMOps**:
|
76 |
+
Monitore e analise os registros e o desempenho do aplicativo ao longo do tempo. É possível melhorar continuamente prompts, conjuntos de dados e modelos com base nos dados de produção e anotações.
|
77 |
+
|
78 |
+
**7. Backend como Serviço**:
|
79 |
+
Todas os recursos do Dify vêm com APIs correspondentes, permitindo que você integre o Dify sem esforço na lógica de negócios da sua empresa.
|
80 |
+
|
81 |
+
|
82 |
+
## Comparação de recursos
|
83 |
+
<table style="width: 100%;">
|
84 |
+
<tr>
|
85 |
+
<th align="center">Recurso</th>
|
86 |
+
<th align="center">Dify.AI</th>
|
87 |
+
<th align="center">LangChain</th>
|
88 |
+
<th align="center">Flowise</th>
|
89 |
+
<th align="center">OpenAI Assistants API</th>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<td align="center">Abordagem de Programação</td>
|
93 |
+
<td align="center">Orientada a API + Aplicativo</td>
|
94 |
+
<td align="center">Código Python</td>
|
95 |
+
<td align="center">Orientada a Aplicativo</td>
|
96 |
+
<td align="center">Orientada a API</td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
99 |
+
<td align="center">LLMs Suportados</td>
|
100 |
+
<td align="center">Variedade Rica</td>
|
101 |
+
<td align="center">Variedade Rica</td>
|
102 |
+
<td align="center">Variedade Rica</td>
|
103 |
+
<td align="center">Apenas OpenAI</td>
|
104 |
+
</tr>
|
105 |
+
<tr>
|
106 |
+
<td align="center">RAG Engine</td>
|
107 |
+
<td align="center">✅</td>
|
108 |
+
<td align="center">✅</td>
|
109 |
+
<td align="center">✅</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td align="center">Agente</td>
|
114 |
+
<td align="center">✅</td>
|
115 |
+
<td align="center">✅</td>
|
116 |
+
<td align="center">❌</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
</tr>
|
119 |
+
<tr>
|
120 |
+
<td align="center">Workflow</td>
|
121 |
+
<td align="center">✅</td>
|
122 |
+
<td align="center">❌</td>
|
123 |
+
<td align="center">✅</td>
|
124 |
+
<td align="center">❌</td>
|
125 |
+
</tr>
|
126 |
+
<tr>
|
127 |
+
<td align="center">Observabilidade</td>
|
128 |
+
<td align="center">✅</td>
|
129 |
+
<td align="center">✅</td>
|
130 |
+
<td align="center">❌</td>
|
131 |
+
<td align="center">❌</td>
|
132 |
+
</tr>
|
133 |
+
<tr>
|
134 |
+
<td align="center">Recursos Empresariais (SSO/Controle de Acesso)</td>
|
135 |
+
<td align="center">✅</td>
|
136 |
+
<td align="center">❌</td>
|
137 |
+
<td align="center">❌</td>
|
138 |
+
<td align="center">❌</td>
|
139 |
+
</tr>
|
140 |
+
<tr>
|
141 |
+
<td align="center">Implantação Local</td>
|
142 |
+
<td align="center">✅</td>
|
143 |
+
<td align="center">✅</td>
|
144 |
+
<td align="center">✅</td>
|
145 |
+
<td align="center">❌</td>
|
146 |
+
</tr>
|
147 |
+
</table>
|
148 |
+
|
149 |
+
## Usando o Dify
|
150 |
+
|
151 |
+
- **Nuvem </br>**
|
152 |
+
Oferecemos o serviço [Dify Cloud](https://dify.ai) para qualquer pessoa experimentar sem nenhuma configuração. Ele fornece todas as funcionalidades da versão auto-hospedada, incluindo 200 chamadas GPT-4 gratuitas no plano sandbox.
|
153 |
+
|
154 |
+
- **Auto-hospedagem do Dify Community Edition</br>**
|
155 |
+
Configure rapidamente o Dify no seu ambiente com este [guia inicial](#quick-start).
|
156 |
+
Use nossa [documentação](https://docs.dify.ai) para referências adicionais e instruções mais detalhadas.
|
157 |
+
|
158 |
+
- **Dify para empresas/organizações</br>**
|
159 |
+
Oferecemos recursos adicionais voltados para empresas. [Envie suas perguntas através deste chatbot](https://udify.app/chat/22L1zSxg6yW1cWQg) ou [envie-nos um e-mail](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) para discutir necessidades empresariais. </br>
|
160 |
+
> Para startups e pequenas empresas que utilizam AWS, confira o [Dify Premium no AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) e implemente no seu próprio AWS VPC com um clique. É uma oferta AMI acessível com a opção de criar aplicativos com logotipo e marca personalizados.
|
161 |
+
|
162 |
+
|
163 |
+
## Mantendo-se atualizado
|
164 |
+
|
165 |
+
Dê uma estrela no Dify no GitHub e seja notificado imediatamente sobre novos lançamentos.
|
166 |
+
|
167 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
168 |
+
|
169 |
+
|
170 |
+
|
171 |
+
## Início rápido
|
172 |
+
> Antes de instalar o Dify, certifique-se de que sua máquina atenda aos seguintes requisitos mínimos de sistema:
|
173 |
+
>
|
174 |
+
>- CPU >= 2 Núcleos
|
175 |
+
>- RAM >= 4 GiB
|
176 |
+
|
177 |
+
</br>
|
178 |
+
|
179 |
+
A maneira mais fácil de iniciar o servidor Dify é executar nosso arquivo [docker-compose.yml](docker/docker-compose.yaml). Antes de rodar o comando de instalação, certifique-se de que o [Docker](https://docs.docker.com/get-docker/) e o [Docker Compose](https://docs.docker.com/compose/install/) estão instalados na sua máquina:
|
180 |
+
|
181 |
+
```bash
|
182 |
+
cd docker
|
183 |
+
cp .env.example .env
|
184 |
+
docker compose up -d
|
185 |
+
```
|
186 |
+
|
187 |
+
Após a execução, você pode acessar o painel do Dify no navegador em [http://localhost/install](http://localhost/install) e iniciar o processo de inicialização.
|
188 |
+
|
189 |
+
> Se você deseja contribuir com o Dify ou fazer desenvolvimento adicional, consulte nosso [guia para implantar a partir do código fonte](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code).
|
190 |
+
|
191 |
+
## Próximos passos
|
192 |
+
|
193 |
+
Se precisar personalizar a configuração, consulte os comentários no nosso arquivo [.env.example](docker/.env.example) e atualize os valores correspondentes no seu arquivo `.env`. Além disso, talvez seja necessário fazer ajustes no próprio arquivo `docker-compose.yaml`, como alterar versões de imagem, mapeamentos de portas ou montagens de volumes, com base no seu ambiente de implantação específico e nas suas necessidades. Após fazer quaisquer alterações, execute novamente `docker-compose up -d`. Você pode encontrar a lista completa de variáveis de ambiente disponíveis [aqui](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
194 |
+
|
195 |
+
Se deseja configurar uma instalação de alta disponibilidade, há [Helm Charts](https://helm.sh/) e arquivos YAML contribuídos pela comunidade que permitem a implantação do Dify no Kubernetes.
|
196 |
+
|
197 |
+
- [Helm Chart de @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
198 |
+
- [Helm Chart de @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
199 |
+
- [Arquivo YAML de @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
200 |
+
|
201 |
+
#### Usando o Terraform para Implantação
|
202 |
+
|
203 |
+
Implante o Dify na Plataforma Cloud com um único clique usando [terraform](https://www.terraform.io/)
|
204 |
+
|
205 |
+
##### Azure Global
|
206 |
+
- [Azure Terraform por @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
207 |
+
|
208 |
+
##### Google Cloud
|
209 |
+
- [Google Cloud Terraform por @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
210 |
+
|
211 |
+
## Contribuindo
|
212 |
+
|
213 |
+
Para aqueles que desejam contribuir com código, veja nosso [Guia de Contribuição](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
214 |
+
Ao mesmo tempo, considere apoiar o Dify compartilhando-o nas redes sociais e em eventos e conferências.
|
215 |
+
|
216 |
+
> Estamos buscando contribuidores para ajudar na tradução do Dify para idiomas além de Mandarim e Inglês. Se você tiver interesse em ajudar, consulte o [README i18n](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) para mais informações e deixe-nos um comentário no canal `global-users` em nosso [Servidor da Comunidade no Discord](https://discord.gg/8Tpq4AcN9c).
|
217 |
+
|
218 |
+
**Contribuidores**
|
219 |
+
|
220 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
221 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
222 |
+
</a>
|
223 |
+
|
224 |
+
## Comunidade e contato
|
225 |
+
|
226 |
+
* [Discussões no GitHub](https://github.com/langgenius/dify/discussions). Melhor para: compartilhar feedback e fazer perguntas.
|
227 |
+
* [Problemas no GitHub](https://github.com/langgenius/dify/issues). Melhor para: relatar bugs encontrados no Dify.AI e propor novos recursos. Veja nosso [Guia de Contribuição](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md).
|
228 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Melhor para: compartilhar suas aplicações e interagir com a comunidade.
|
229 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Melhor para: compartilhar suas aplicações e interagir com a comunidade.
|
230 |
+
|
231 |
+
## Histórico de estrelas
|
232 |
+
|
233 |
+
[![Gráfico de Histórico de Estrelas](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
234 |
+
|
235 |
+
## Divulgação de segurança
|
236 |
+
|
237 |
+
Para proteger sua privacidade, evite postar problemas de segurança no GitHub. Em vez disso, envie suas perguntas para [email protected] e forneceremos uma resposta mais detalhada.
|
238 |
+
|
239 |
+
## Licença
|
240 |
+
|
241 |
+
Este repositório está disponível sob a [Licença de Código Aberto Dify](LICENSE), que é essencialmente Apache 2.0 com algumas restrições adicionais.
|
README_TR.md
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Bulut</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Kendi Sunucunuzda Barındırma</a> ·
|
6 |
+
<a href="https://docs.dify.ai">Dokümantasyon</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Yalnızca İngilizce: Kurumsal Sorgulama</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Statik Rozet" src="https://img.shields.io/badge/Ürün-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Statik Rozet" src="https://img.shields.io/badge/ücretsiz-fiyatlandırma?logo=free&color=%20%23155EEF&label=fiyatlandirma&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="Discord'da sohbet et"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="X(Twitter)'da takip et"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Çekmeleri" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Geçen ay yapılan commitler" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Kapatılan sorunlar" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=kapatilan%20sorunlar&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Tartışma gönderileri" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
|
45 |
+
Dify, açık kaynaklı bir LLM uygulama geliştirme platformudur. Sezgisel arayüzü, AI iş akışı, RAG pipeline'ı, ajan yetenekleri, model yönetimi, gözlemlenebilirlik özellikleri ve daha fazlasını birleştirerek, prototipten üretime hızlıca geçmenizi sağlar. İşte temel özelliklerin bir listesi:
|
46 |
+
</br> </br>
|
47 |
+
|
48 |
+
**1. Workflow**:
|
49 |
+
Görsel bir arayüz üzerinde güçlü AI iş akışları oluşturun ve test edin, aşağıdaki tüm özellikleri ve daha fazlasını kullanarak.
|
50 |
+
|
51 |
+
|
52 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
**2. Kapsamlı model desteği**:
|
57 |
+
Çok sayıda çıkarım sağlayıcısı ve kendi kendine barındırılan çözümlerden yüzlerce özel / açık kaynaklı LLM ile sorunsuz entegrasyon sağlar. GPT, Mistral, Llama3 ve OpenAI API uyumlu tüm modelleri kapsar. Desteklenen model sağlayıcılarının tam listesine [buradan](https://docs.dify.ai/getting-started/readme/model-providers) ulaşabilirsiniz.
|
58 |
+
|
59 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
60 |
+
|
61 |
+
|
62 |
+
Özür dilerim, haklısınız. Daha anlamlı ve akıcı bir çeviri yapmaya çalışayım. İşte güncellenmiş çeviri:
|
63 |
+
|
64 |
+
**3. Prompt IDE**:
|
65 |
+
Komut istemlerini oluşturmak, model performansını karşılaştırmak ve sohbet tabanlı uygulamalara metin-konuşma gibi ek özellikler eklemek için kullanıcı dostu bir arayüz.
|
66 |
+
|
67 |
+
**4. RAG Pipeline**:
|
68 |
+
Belge alımından bilgi çekmeye kadar geniş kapsamlı RAG yetenekleri. PDF'ler, PPT'ler ve diğer yaygın belge formatlarından metin çıkarma için hazır destek sunar.
|
69 |
+
|
70 |
+
**5. Ajan yetenekleri**:
|
71 |
+
LLM Fonksiyon Çağırma veya ReAct'a dayalı ajanlar tanımlayabilir ve bu ajanlara önceden hazırlanmış veya özel araçlar ekleyebilirsiniz. Dify, AI ajanları için Google Arama, DALL·E, Stable Diffusion ve WolframAlpha gibi 50'den fazla yerleşik araç sağlar.
|
72 |
+
|
73 |
+
**6. LLMOps**:
|
74 |
+
Uygulama loglarını ve performans metriklerini zaman içinde izleme ve analiz etme imkanı. Üretim ortamından elde edilen verilere ve kullanıcı geri bildirimlerine dayanarak, prompt'ları, veri setlerini ve modelleri sürekli olarak optimize edebilirsiniz. Bu sayede, AI uygulamanızın performansını ve doğruluğunu sürekli olarak artırabilirsiniz.
|
75 |
+
|
76 |
+
**7. Hizmet Olarak Backend**:
|
77 |
+
Dify'ın tüm özellikleri ilgili API'lerle birlikte gelir, böylece Dify'ı kendi iş mantığınıza kolayca entegre edebilirsiniz.
|
78 |
+
|
79 |
+
|
80 |
+
## Özellik karşılaştırması
|
81 |
+
<table style="width: 100%;">
|
82 |
+
<tr>
|
83 |
+
<th align="center">Özellik</th>
|
84 |
+
<th align="center">Dify.AI</th>
|
85 |
+
<th align="center">LangChain</th>
|
86 |
+
<th align="center">Flowise</th>
|
87 |
+
<th align="center">OpenAI Assistants API</th>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td align="center">Programlama Yaklaşımı</td>
|
91 |
+
<td align="center">API + Uygulama odaklı</td>
|
92 |
+
<td align="center">Python Kodu</td>
|
93 |
+
<td align="center">Uygulama odaklı</td>
|
94 |
+
<td align="center">API odaklı</td>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<td align="center">Desteklenen LLM'ler</td>
|
98 |
+
<td align="center">Zengin Çeşitlilik</td>
|
99 |
+
<td align="center">Zengin Çeşitlilik</td>
|
100 |
+
<td align="center">Zengin Çeşitlilik</td>
|
101 |
+
<td align="center">Yalnızca OpenAI</td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<td align="center">RAG Motoru</td>
|
105 |
+
<td align="center">✅</td>
|
106 |
+
<td align="center">✅</td>
|
107 |
+
<td align="center">✅</td>
|
108 |
+
<td align="center">✅</td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<td align="center">Ajan</td>
|
112 |
+
<td align="center">✅</td>
|
113 |
+
<td align="center">✅</td>
|
114 |
+
<td align="center">❌</td>
|
115 |
+
<td align="center">✅</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td align="center">İş Akışı</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
<td align="center">❌</td>
|
121 |
+
<td align="center">✅</td>
|
122 |
+
<td align="center">❌</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td align="center">Gözlemlenebilirlik</td>
|
126 |
+
<td align="center">✅</td>
|
127 |
+
<td align="center">✅</td>
|
128 |
+
<td align="center">❌</td>
|
129 |
+
<td align="center">❌</td>
|
130 |
+
</tr>
|
131 |
+
<tr>
|
132 |
+
<td align="center">Kurumsal Özellikler (SSO/Erişim kontrolü)</td>
|
133 |
+
<td align="center">✅</td>
|
134 |
+
<td align="center">❌</td>
|
135 |
+
<td align="center">❌</td>
|
136 |
+
<td align="center">❌</td>
|
137 |
+
</tr>
|
138 |
+
<tr>
|
139 |
+
<td align="center">Yerel Dağıtım</td>
|
140 |
+
<td align="center">✅</td>
|
141 |
+
<td align="center">✅</td>
|
142 |
+
<td align="center">✅</td>
|
143 |
+
<td align="center">❌</td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
|
147 |
+
## Dify'ı Kullanma
|
148 |
+
|
149 |
+
- **Cloud </br>**
|
150 |
+
İşte verdiğiniz metnin Türkçe çevirisi, kod bloğu içinde:
|
151 |
+
-
|
152 |
+
Herkesin sıfır kurulumla denemesi için bir [Dify Cloud](https://dify.ai) hizmeti sunuyoruz. Bu hizmet, kendi kendine dağıtılan versiyonun tüm yeteneklerini sağlar ve sandbox planında 200 ücretsiz GPT-4 çağrısı içerir.
|
153 |
+
|
154 |
+
- **Dify Topluluk Sürümünü Kendi Sunucunuzda Barındırma</br>**
|
155 |
+
Bu [başlangıç kılavuzu](#quick-start) ile Dify'ı kendi ortamınızda hızlıca çalıştırın.
|
156 |
+
Daha fazla referans ve detaylı talimatlar için [dokümantasyonumuzu](https://docs.dify.ai) kullanın.
|
157 |
+
|
158 |
+
- **Kurumlar / organizasyonlar için Dify</br>**
|
159 |
+
Ek kurumsal odaklı özellikler sunuyoruz. Kurumsal ihtiyaçları görüşmek için [bize bir e-posta gönderin](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry). </br>
|
160 |
+
> AWS kullanan startuplar ve küçük işletmeler için, [AWS Marketplace'deki Dify Premium'a](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) göz atın ve tek tıklamayla kendi AWS VPC'nize dağıtın. Bu, özel logo ve marka ile uygulamalar oluşturma seçeneğine sahip uygun fiyatlı bir AMI teklifdir.
|
161 |
+
|
162 |
+
## Güncel Kalma
|
163 |
+
|
164 |
+
GitHub'da Dify'a yıldız verin ve yeni sürümlerden anında haberdar olun.
|
165 |
+
|
166 |
+
![bizi-yıldızlayın](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
167 |
+
|
168 |
+
|
169 |
+
|
170 |
+
## Hızlı başlangıç
|
171 |
+
> Dify'ı kurmadan önce, makinenizin aşağıdaki minimum sistem gereksinimlerini karşıladığından emin olun:
|
172 |
+
>
|
173 |
+
>- CPU >= 2 Çekirdek
|
174 |
+
>- RAM >= 4GB
|
175 |
+
|
176 |
+
</br>
|
177 |
+
İşte verdiğiniz metnin Türkçe çevirisi, kod bloğu içinde:
|
178 |
+
|
179 |
+
Dify sunucusunu başlatmanın en kolay yolu, [docker-compose.yml](docker/docker-compose.yaml) dosyamızı çalıştırmaktır. Kurulum komutunu çalıştırmadan önce, makinenizde [Docker](https://docs.docker.com/get-docker/) ve [Docker Compose](https://docs.docker.com/compose/install/)'un kurulu olduğundan emin olun:
|
180 |
+
|
181 |
+
```bash
|
182 |
+
cd docker
|
183 |
+
cp .env.example .env
|
184 |
+
docker compose up -d
|
185 |
+
```
|
186 |
+
|
187 |
+
Çalıştırdıktan sonra, tarayıcınızda [http://localhost/install](http://localhost/install) adresinden Dify kontrol paneline erişebilir ve başlangıç ayarları sürecini başlatabilirsiniz.
|
188 |
+
|
189 |
+
> Eğer Dify'a katkıda bulunmak veya ek geliştirmeler yapmak isterseniz, [kaynak koddan dağıtım kılavuzumuza](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code) başvurun.
|
190 |
+
|
191 |
+
## Sonraki adımlar
|
192 |
+
|
193 |
+
Yapılandırmayı özelleştirmeniz gerekiyorsa, lütfen [.env.example](docker/.env.example) dosyamızdaki yorumlara bakın ve `.env` dosyanızdaki ilgili değerleri güncelleyin. Ayrıca, spesifik dağıtım ortamınıza ve gereksinimlerinize bağlı olarak `docker-compose.yaml` dosyasının kendisinde de, imaj sürümlerini, port eşlemelerini veya hacim bağlantılarını değiştirmek gibi ayarlamalar yapmanız gerekebilir. Herhangi bir değişiklik yaptıktan sonra, lütfen `docker-compose up -d` komutunu tekrar çalıştırın. Kullanılabilir tüm ortam değişkenlerinin tam listesini [burada](https://docs.dify.ai/getting-started/install-self-hosted/environments) bulabilirsiniz.
|
194 |
+
|
195 |
+
Yüksek kullanılabilirliğe sahip bir kurulum yapılandırmak isterseniz, Dify'ın Kubernetes üzerine dağıtılmasına olanak tanıyan topluluk katkılı [Helm Charts](https://helm.sh/) ve YAML dosyaları mevcuttur.
|
196 |
+
|
197 |
+
- [@LeoQuote tarafından Helm Chart](https://github.com/douban/charts/tree/master/charts/dify)
|
198 |
+
- [@BorisPolonsky tarafından Helm Chart](https://github.com/BorisPolonsky/dify-helm)
|
199 |
+
- [@Winson-030 tarafından YAML dosyası](https://github.com/Winson-030/dify-kubernetes)
|
200 |
+
|
201 |
+
#### Dağıtım için Terraform Kullanımı
|
202 |
+
|
203 |
+
Dify'ı bulut platformuna tek tıklamayla dağıtın [terraform](https://www.terraform.io/) kullanarak
|
204 |
+
|
205 |
+
##### Azure Global
|
206 |
+
- [Azure Terraform tarafından @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
207 |
+
|
208 |
+
##### Google Cloud
|
209 |
+
- [Google Cloud Terraform tarafından @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
210 |
+
|
211 |
+
## Katkıda Bulunma
|
212 |
+
|
213 |
+
Kod katkısında bulunmak isteyenler için [Katkı Kılavuzumuza](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) bakabilirsiniz.
|
214 |
+
Aynı zamanda, lütfen Dify'ı sosyal medyada, etkinliklerde ve konferanslarda paylaşarak desteklemeyi düşünün.
|
215 |
+
|
216 |
+
> Dify'ı Mandarin veya İngilizce dışındaki dillere çevirmemize yardımcı olacak katkıda bulunanlara ihtiyacımız var. Yardımcı olmakla ilgileniyorsanız, lütfen daha fazla bilgi için [i18n README](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) dosyasına bakın ve [Discord Topluluk Sunucumuzdaki](https://discord.gg/8Tpq4AcN9c) `global-users` kanalında bize bir yorum bırakın.
|
217 |
+
|
218 |
+
**Katkıda Bulunanlar**
|
219 |
+
|
220 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
221 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
222 |
+
</a>
|
223 |
+
|
224 |
+
## Topluluk & iletişim
|
225 |
+
|
226 |
+
* [Github Tartışmaları](https://github.com/langgenius/dify/discussions). En uygun: geri bildirim paylaşmak ve soru sormak için.
|
227 |
+
* [GitHub Sorunları](https://github.com/langgenius/dify/issues). En uygun: Dify.AI kullanırken karşılaştığınız hatalar ve özellik önerileri için. [Katkı Kılavuzumuza](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) bakın.
|
228 |
+
* [Discord](https://discord.gg/FngNHpbcY7). En uygun: uygulamalarınızı paylaşmak ve toplulukla vakit geçirmek için.
|
229 |
+
* [X(Twitter)](https://twitter.com/dify_ai). En uygun: uygulamalarınızı paylaşmak ve toplulukla vakit geçirmek için.
|
230 |
+
|
231 |
+
## Star history
|
232 |
+
|
233 |
+
[![Star History Chart](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
234 |
+
|
235 |
+
## Güvenlik açıklaması
|
236 |
+
|
237 |
+
Gizliliğinizi korumak için, lütfen güvenlik sorunlarını GitHub'da paylaşmaktan kaçının. Bunun yerine, sorularınızı [email protected] adresine gönderin ve size daha detaylı bir cevap vereceğiz.
|
238 |
+
|
239 |
+
## Lisans
|
240 |
+
|
241 |
+
Bu depo, temel olarak Apache 2.0 lisansı ve birkaç ek kısıtlama içeren [Dify Açık Kaynak Lisansı](LICENSE) altında kullanıma sunulmuştur.
|
README_VI.md
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
![cover-v5-optimized](https://github.com/langgenius/dify/assets/13230914/f9e19af5-61ba-4119-b926-d10c4c06ebab)
|
2 |
+
|
3 |
+
<p align="center">
|
4 |
+
<a href="https://cloud.dify.ai">Dify Cloud</a> ·
|
5 |
+
<a href="https://docs.dify.ai/getting-started/install-self-hosted">Tự triển khai</a> ·
|
6 |
+
<a href="https://docs.dify.ai">Tài liệu</a> ·
|
7 |
+
<a href="https://udify.app/chat/22L1zSxg6yW1cWQg">Yêu cầu doanh nghiệp</a>
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p align="center">
|
11 |
+
<a href="https://dify.ai" target="_blank">
|
12 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Product-F04438"></a>
|
13 |
+
<a href="https://dify.ai/pricing" target="_blank">
|
14 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/free-pricing?logo=free&color=%20%23155EEF&label=pricing&labelColor=%20%23528bff"></a>
|
15 |
+
<a href="https://discord.gg/FngNHpbcY7" target="_blank">
|
16 |
+
<img src="https://img.shields.io/discord/1082486657678311454?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb"
|
17 |
+
alt="chat trên Discord"></a>
|
18 |
+
<a href="https://twitter.com/intent/follow?screen_name=dify_ai" target="_blank">
|
19 |
+
<img src="https://img.shields.io/twitter/follow/dify_ai?logo=X&color=%20%23f5f5f5"
|
20 |
+
alt="theo dõi trên X(Twitter)"></a>
|
21 |
+
<a href="https://hub.docker.com/u/langgenius" target="_blank">
|
22 |
+
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/langgenius/dify-web?labelColor=%20%23FDB062&color=%20%23f79009"></a>
|
23 |
+
<a href="https://github.com/langgenius/dify/graphs/commit-activity" target="_blank">
|
24 |
+
<img alt="Commits tháng trước" src="https://img.shields.io/github/commit-activity/m/langgenius/dify?labelColor=%20%2332b583&color=%20%2312b76a"></a>
|
25 |
+
<a href="https://github.com/langgenius/dify/" target="_blank">
|
26 |
+
<img alt="Vấn đề đã đóng" src="https://img.shields.io/github/issues-search?query=repo%3Alanggenius%2Fdify%20is%3Aclosed&label=issues%20closed&labelColor=%20%237d89b0&color=%20%235d6b98"></a>
|
27 |
+
<a href="https://github.com/langgenius/dify/discussions/" target="_blank">
|
28 |
+
<img alt="Bài thảo luận" src="https://img.shields.io/github/discussions/langgenius/dify?labelColor=%20%239b8afb&color=%20%237a5af8"></a>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<p align="center">
|
32 |
+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
33 |
+
<a href="./README_CN.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
34 |
+
<a href="./README_JA.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
|
35 |
+
<a href="./README_ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
|
36 |
+
<a href="./README_FR.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
|
37 |
+
<a href="./README_KL.md"><img alt="README tlhIngan Hol" src="https://img.shields.io/badge/Klingon-d9d9d9"></a>
|
38 |
+
<a href="./README_KR.md"><img alt="README in Korean" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
|
39 |
+
<a href="./README_AR.md"><img alt="README بالعربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
|
40 |
+
<a href="./README_TR.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-d9d9d9"></a>
|
41 |
+
<a href="./README_VI.md"><img alt="README Tiếng Việt" src="https://img.shields.io/badge/Ti%E1%BA%BFng%20Vi%E1%BB%87t-d9d9d9"></a>
|
42 |
+
</p>
|
43 |
+
|
44 |
+
|
45 |
+
Dify là một nền tảng phát triển ứng dụng LLM mã nguồn mở. Giao diện trực quan kết hợp quy trình làm việc AI, mô hình RAG, khả năng tác nhân, quản lý mô hình, tính năng quan sát và hơn thế nữa, cho phép bạn nhanh chóng chuyển từ nguyên mẫu sang sản phẩm. Đây là danh sách các tính năng cốt lõi:
|
46 |
+
</br> </br>
|
47 |
+
|
48 |
+
**1. Quy trình làm việc**:
|
49 |
+
Xây dựng và kiểm tra các quy trình làm việc AI mạnh mẽ trên một canvas trực quan, tận dụng tất cả các tính năng sau đây và hơn thế nữa.
|
50 |
+
|
51 |
+
|
52 |
+
https://github.com/langgenius/dify/assets/13230914/356df23e-1604-483d-80a6-9517ece318aa
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
**2. Hỗ trợ mô hình toàn diện**:
|
57 |
+
Tích hợp liền mạch với hàng trăm mô hình LLM độc quyền / mã nguồn mở từ hàng chục nhà cung cấp suy luận và giải pháp tự lưu trữ, bao gồm GPT, Mistral, Llama3, và bất kỳ mô hình tương thích API OpenAI nào. Danh sách đầy đủ các nhà cung cấp mô hình được hỗ trợ có thể được tìm thấy [tại đây](https://docs.dify.ai/getting-started/readme/model-providers).
|
58 |
+
|
59 |
+
![providers-v5](https://github.com/langgenius/dify/assets/13230914/5a17bdbe-097a-4100-8363-40255b70f6e3)
|
60 |
+
|
61 |
+
|
62 |
+
**3. IDE Prompt**:
|
63 |
+
Giao diện trực quan để tạo prompt, so sánh hiệu suất mô hình và thêm các tính năng bổ sung như chuyển văn bản thành giọng nói cho một ứng dụng dựa trên trò chuyện.
|
64 |
+
|
65 |
+
**4. Mô hình RAG**:
|
66 |
+
Khả năng RAG mở rộng bao gồm mọi thứ từ nhập tài liệu đến truy xuất, với hỗ trợ sẵn có cho việc trích xuất văn bản từ PDF, PPT và các định dạng tài liệu phổ biến khác.
|
67 |
+
|
68 |
+
**5. Khả năng tác nhân**:
|
69 |
+
Bạn có thể định nghĩa các tác nhân dựa trên LLM Function Calling hoặc ReAct, và thêm các công cụ được xây dựng sẵn hoặc tùy chỉnh cho tác nhân. Dify cung cấp hơn 50 công cụ tích hợp sẵn cho các tác nhân AI, như Google Search, DALL·E, Stable Diffusion và WolframAlpha.
|
70 |
+
|
71 |
+
**6. LLMOps**:
|
72 |
+
Giám sát và phân tích nhật ký và hiệu suất ứng dụng theo thời gian. Bạn có thể liên tục cải thiện prompt, bộ dữ liệu và mô hình dựa trên dữ liệu sản xuất và chú thích.
|
73 |
+
|
74 |
+
**7. Backend-as-a-Service**:
|
75 |
+
Tất cả các dịch vụ của Dify đều đi kèm với các API tương ứng, vì vậy bạn có thể dễ dàng tích hợp Dify vào logic kinh doanh của riêng mình.
|
76 |
+
|
77 |
+
|
78 |
+
## So sánh tính năng
|
79 |
+
<table style="width: 100%;">
|
80 |
+
<tr>
|
81 |
+
<th align="center">Tính năng</th>
|
82 |
+
<th align="center">Dify.AI</th>
|
83 |
+
<th align="center">LangChain</th>
|
84 |
+
<th align="center">Flowise</th>
|
85 |
+
<th align="center">OpenAI Assistants API</th>
|
86 |
+
</tr>
|
87 |
+
<tr>
|
88 |
+
<td align="center">Phương pháp lập trình</td>
|
89 |
+
<td align="center">Hướng API + Ứng dụng</td>
|
90 |
+
<td align="center">Mã Python</td>
|
91 |
+
<td align="center">Hướng ứng dụng</td>
|
92 |
+
<td align="center">Hướng API</td>
|
93 |
+
</tr>
|
94 |
+
<tr>
|
95 |
+
<td align="center">LLMs được hỗ trợ</td>
|
96 |
+
<td align="center">Đa dạng phong phú</td>
|
97 |
+
<td align="center">Đa dạng phong phú</td>
|
98 |
+
<td align="center">Đa dạng phong phú</td>
|
99 |
+
<td align="center">Chỉ OpenAI</td>
|
100 |
+
</tr>
|
101 |
+
<tr>
|
102 |
+
<td align="center">RAG Engine</td>
|
103 |
+
<td align="center">✅</td>
|
104 |
+
<td align="center">✅</td>
|
105 |
+
<td align="center">✅</td>
|
106 |
+
<td align="center">✅</td>
|
107 |
+
</tr>
|
108 |
+
<tr>
|
109 |
+
<td align="center">Agent</td>
|
110 |
+
<td align="center">✅</td>
|
111 |
+
<td align="center">✅</td>
|
112 |
+
<td align="center">❌</td>
|
113 |
+
<td align="center">✅</td>
|
114 |
+
</tr>
|
115 |
+
<tr>
|
116 |
+
<td align="center">Quy trình làm việc</td>
|
117 |
+
<td align="center">✅</td>
|
118 |
+
<td align="center">❌</td>
|
119 |
+
<td align="center">✅</td>
|
120 |
+
<td align="center">❌</td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td align="center">Khả năng quan sát</td>
|
124 |
+
<td align="center">✅</td>
|
125 |
+
<td align="center">✅</td>
|
126 |
+
<td align="center">❌</td>
|
127 |
+
<td align="center">❌</td>
|
128 |
+
</tr>
|
129 |
+
<tr>
|
130 |
+
<td align="center">Tính năng doanh nghiệp (SSO/Kiểm soát truy cập)</td>
|
131 |
+
<td align="center">✅</td>
|
132 |
+
<td align="center">❌</td>
|
133 |
+
<td align="center">❌</td>
|
134 |
+
<td align="center">❌</td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
<td align="center">Triển khai cục bộ</td>
|
138 |
+
<td align="center">✅</td>
|
139 |
+
<td align="center">✅</td>
|
140 |
+
<td align="center">✅</td>
|
141 |
+
<td align="center">❌</td>
|
142 |
+
</tr>
|
143 |
+
</table>
|
144 |
+
|
145 |
+
## Sử dụng Dify
|
146 |
+
|
147 |
+
- **Cloud </br>**
|
148 |
+
Chúng tôi lưu trữ dịch vụ [Dify Cloud](https://dify.ai) cho bất kỳ ai muốn thử mà không cần cài đặt. Nó cung cấp tất cả các khả năng của phiên bản tự triển khai và bao gồm 200 lượt gọi GPT-4 miễn phí trong gói sandbox.
|
149 |
+
|
150 |
+
- **Tự triển khai Dify Community Edition</br>**
|
151 |
+
Nhanh chóng chạy Dify trong môi trường của bạn với [hướng dẫn bắt đầu](#quick-start) này.
|
152 |
+
Sử dụng [tài liệu](https://docs.dify.ai) của chúng tôi để tham khảo thêm và nhận hướng dẫn chi tiết hơn.
|
153 |
+
|
154 |
+
- **Dify cho doanh nghiệp / tổ chức</br>**
|
155 |
+
Chúng tôi cung cấp các tính năng bổ sung tập trung vào doanh nghiệp. [Ghi lại câu hỏi của bạn cho chúng tôi thông qua chatbot này](https://udify.app/chat/22L1zSxg6yW1cWQg) hoặc [gửi email cho chúng tôi](mailto:[email protected]?subject=[GitHub]Business%20License%20Inquiry) để thảo luận về nhu cầu doanh nghiệp. </br>
|
156 |
+
> Đối với các công ty khởi nghiệp và doanh nghiệp nhỏ sử dụng AWS, hãy xem [Dify Premium trên AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) và triển khai nó vào AWS VPC của riêng bạn chỉ với một cú nhấp chuột. Đây là một AMI giá cả phải chăng với tùy chọn tạo ứng dụng với logo và thương hiệu tùy chỉnh.
|
157 |
+
|
158 |
+
|
159 |
+
## Luôn cập nhật
|
160 |
+
|
161 |
+
Yêu thích Dify trên GitHub và được thông báo ngay lập tức về các bản phát hành mới.
|
162 |
+
|
163 |
+
![star-us](https://github.com/langgenius/dify/assets/13230914/b823edc1-6388-4e25-ad45-2f6b187adbb4)
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
## Bắt đầu nhanh
|
168 |
+
> Trước khi cài đặt Dify, hãy đảm bảo máy của bạn đáp ứng các yêu cầu hệ thống tối thiểu sau:
|
169 |
+
>
|
170 |
+
>- CPU >= 2 Core
|
171 |
+
>- RAM >= 4GB
|
172 |
+
|
173 |
+
</br>
|
174 |
+
|
175 |
+
Cách dễ nhất để khởi động máy chủ Dify là chạy tệp [docker-compose.yml](docker/docker-compose.yaml) của chúng tôi. Trước khi chạy lệnh cài đặt, hãy đảm bảo rằng [Docker](https://docs.docker.com/get-docker/) và [Docker Compose](https://docs.docker.com/compose/install/) đã được cài đặt trên máy của bạn:
|
176 |
+
|
177 |
+
```bash
|
178 |
+
cd docker
|
179 |
+
cp .env.example .env
|
180 |
+
docker compose up -d
|
181 |
+
```
|
182 |
+
|
183 |
+
Sau khi chạy, bạn có thể truy cập bảng điều khiển Dify trong trình duyệt của bạn tại [http://localhost/install](http://localhost/install) và bắt đầu quá trình khởi tạo.
|
184 |
+
|
185 |
+
> Nếu bạn muốn đóng góp cho Dify hoặc phát triển thêm, hãy tham khảo [hướng dẫn triển khai từ mã nguồn](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code) của chúng tôi
|
186 |
+
|
187 |
+
## Các bước tiếp theo
|
188 |
+
|
189 |
+
Nếu bạn cần tùy chỉnh cấu hình, vui lòng tham khảo các nhận xét trong tệp [.env.example](docker/.env.example) của chúng tôi và cập nhật các giá trị tương ứng trong tệp `.env` của bạn. Ngoài ra, bạn có thể cần điều chỉnh tệp `docker-compose.yaml`, chẳng hạn như thay đổi phiên bản hình ảnh, ánh xạ cổng hoặc gắn kết khối lượng, dựa trên môi trường triển khai cụ thể và yêu cầu của bạn. Sau khi thực hiện bất kỳ thay đổi nào, vui lòng chạy lại `docker-compose up -d`. Bạn có thể tìm thấy danh sách đầy đủ các biến môi trường có sẵn [tại đây](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
190 |
+
|
191 |
+
Nếu bạn muốn cấu hình một cài đặt có độ sẵn sàng cao, có các [Helm Charts](https://helm.sh/) và tệp YAML do cộng đồng đóng góp cho phép Dify được triển khai trên Kubernetes.
|
192 |
+
|
193 |
+
- [Helm Chart bởi @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify)
|
194 |
+
- [Helm Chart bởi @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm)
|
195 |
+
- [Tệp YAML bởi @Winson-030](https://github.com/Winson-030/dify-kubernetes)
|
196 |
+
|
197 |
+
#### Sử dụng Terraform để Triển khai
|
198 |
+
|
199 |
+
Triển khai Dify lên nền tảng đám mây với một cú nhấp chuột bằng cách sử dụng [terraform](https://www.terraform.io/)
|
200 |
+
|
201 |
+
##### Azure Global
|
202 |
+
- [Azure Terraform bởi @nikawang](https://github.com/nikawang/dify-azure-terraform)
|
203 |
+
|
204 |
+
##### Google Cloud
|
205 |
+
- [Google Cloud Terraform bởi @sotazum](https://github.com/DeNA/dify-google-cloud-terraform)
|
206 |
+
|
207 |
+
## Đóng góp
|
208 |
+
|
209 |
+
Đối với những người muốn đóng góp mã, xem [Hướng dẫn Đóng góp](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) của chúng tôi.
|
210 |
+
Đồng thời, vui lòng xem xét hỗ trợ Dify bằng cách chia sẻ nó trên mạng xã hội và tại các sự kiện và hội nghị.
|
211 |
+
|
212 |
+
|
213 |
+
> Chúng tôi đang tìm kiếm người đóng góp để giúp dịch Dify sang các ngôn ngữ khác ngoài tiếng Trung hoặc tiếng Anh. Nếu bạn quan tâm đến việc giúp đỡ, vui lòng xem [README i18n](https://github.com/langgenius/dify/blob/main/web/i18n/README.md) để biết thêm thông tin và để lại bình luận cho chúng tôi trong kênh `global-users` của [Máy chủ Cộng đồng Discord](https://discord.gg/8Tpq4AcN9c) của chúng tôi.
|
214 |
+
|
215 |
+
**Người đóng góp**
|
216 |
+
|
217 |
+
<a href="https://github.com/langgenius/dify/graphs/contributors">
|
218 |
+
<img src="https://contrib.rocks/image?repo=langgenius/dify" />
|
219 |
+
</a>
|
220 |
+
|
221 |
+
## Cộng đồng & liên hệ
|
222 |
+
|
223 |
+
* [Thảo luận GitHub](https://github.com/langgenius/dify/discussions). Tốt nhất cho: chia sẻ phản hồi và đặt câu hỏi.
|
224 |
+
* [Vấn đề GitHub](https://github.com/langgenius/dify/issues). Tốt nhất cho: lỗi bạn gặp phải khi sử dụng Dify.AI và đề xuất tính năng. Xem [Hướng dẫn Đóng góp](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) của chúng tôi.
|
225 |
+
* [Discord](https://discord.gg/FngNHpbcY7). Tốt nhất cho: chia sẻ ứng dụng của bạn và giao lưu với cộng đồng.
|
226 |
+
* [X(Twitter)](https://twitter.com/dify_ai). Tốt nhất cho: chia sẻ ứng dụng của bạn và giao lưu với cộng đồng.
|
227 |
+
|
228 |
+
## Lịch sử Yêu thích
|
229 |
+
|
230 |
+
[![Biểu đồ Lịch sử Yêu thích](https://api.star-history.com/svg?repos=langgenius/dify&type=Date)](https://star-history.com/#langgenius/dify&Date)
|
231 |
+
|
232 |
+
## Tiết lộ bảo mật
|
233 |
+
|
234 |
+
Để bảo vệ quyền riêng tư của bạn, vui lòng tránh đăng các vấn đề bảo mật trên GitHub. Thay vào đó, hãy gửi câu hỏi của bạn đến [email protected] và chúng tôi sẽ cung cấp cho bạn câu trả lời chi tiết hơn.
|
235 |
+
|
236 |
+
## Giấy phép
|
237 |
+
|
238 |
+
Kho lưu trữ này có sẵn theo [Giấy phép Mã nguồn Mở Dify](LICENSE), về cơ bản là Apache 2.0 với một vài hạn chế bổ sung.
|
api/.dockerignore
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.env
|
2 |
+
*.env.*
|
3 |
+
|
4 |
+
storage/privkeys/*
|
5 |
+
|
6 |
+
# Logs
|
7 |
+
logs
|
8 |
+
*.log*
|
9 |
+
|
10 |
+
# jetbrains
|
11 |
+
.idea
|
12 |
+
|
13 |
+
# venv
|
14 |
+
.venv
|
api/.env.example
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Your App secret key will be used for securely signing the session cookie
|
2 |
+
# Make sure you are changing this key for your deployment with a strong key.
|
3 |
+
# You can generate a strong key using `openssl rand -base64 42`.
|
4 |
+
# Alternatively you can set it with `SECRET_KEY` environment variable.
|
5 |
+
SECRET_KEY=
|
6 |
+
|
7 |
+
# Console API base URL
|
8 |
+
CONSOLE_API_URL=http://127.0.0.1:5001
|
9 |
+
CONSOLE_WEB_URL=http://127.0.0.1:3000
|
10 |
+
|
11 |
+
# Service API base URL
|
12 |
+
SERVICE_API_URL=http://127.0.0.1:5001
|
13 |
+
|
14 |
+
# Web APP base URL
|
15 |
+
APP_WEB_URL=http://127.0.0.1:3000
|
16 |
+
|
17 |
+
# Files URL
|
18 |
+
FILES_URL=http://127.0.0.1:5001
|
19 |
+
|
20 |
+
# The time in seconds after the signature is rejected
|
21 |
+
FILES_ACCESS_TIMEOUT=300
|
22 |
+
|
23 |
+
# Access token expiration time in minutes
|
24 |
+
ACCESS_TOKEN_EXPIRE_MINUTES=60
|
25 |
+
|
26 |
+
# celery configuration
|
27 |
+
CELERY_BROKER_URL=redis://:difyai123456@localhost:6379/1
|
28 |
+
|
29 |
+
# redis configuration
|
30 |
+
REDIS_HOST=localhost
|
31 |
+
REDIS_PORT=6379
|
32 |
+
REDIS_USERNAME=
|
33 |
+
REDIS_PASSWORD=difyai123456
|
34 |
+
REDIS_USE_SSL=false
|
35 |
+
REDIS_DB=0
|
36 |
+
|
37 |
+
# redis Sentinel configuration.
|
38 |
+
REDIS_USE_SENTINEL=false
|
39 |
+
REDIS_SENTINELS=
|
40 |
+
REDIS_SENTINEL_SERVICE_NAME=
|
41 |
+
REDIS_SENTINEL_USERNAME=
|
42 |
+
REDIS_SENTINEL_PASSWORD=
|
43 |
+
REDIS_SENTINEL_SOCKET_TIMEOUT=0.1
|
44 |
+
|
45 |
+
# PostgreSQL database configuration
|
46 |
+
DB_USERNAME=postgres
|
47 |
+
DB_PASSWORD=difyai123456
|
48 |
+
DB_HOST=localhost
|
49 |
+
DB_PORT=5432
|
50 |
+
DB_DATABASE=dify
|
51 |
+
|
52 |
+
# Storage configuration
|
53 |
+
# use for store upload files, private keys...
|
54 |
+
# storage type: local, s3, aliyun-oss, azure-blob, baidu-obs, google-storage, huawei-obs, oci-storage, tencent-cos, volcengine-tos, supabase
|
55 |
+
STORAGE_TYPE=local
|
56 |
+
STORAGE_LOCAL_PATH=storage
|
57 |
+
S3_USE_AWS_MANAGED_IAM=false
|
58 |
+
S3_ENDPOINT=https://your-bucket-name.storage.s3.clooudflare.com
|
59 |
+
S3_BUCKET_NAME=your-bucket-name
|
60 |
+
S3_ACCESS_KEY=your-access-key
|
61 |
+
S3_SECRET_KEY=your-secret-key
|
62 |
+
S3_REGION=your-region
|
63 |
+
# Azure Blob Storage configuration
|
64 |
+
AZURE_BLOB_ACCOUNT_NAME=your-account-name
|
65 |
+
AZURE_BLOB_ACCOUNT_KEY=your-account-key
|
66 |
+
AZURE_BLOB_CONTAINER_NAME=yout-container-name
|
67 |
+
AZURE_BLOB_ACCOUNT_URL=https://<your_account_name>.blob.core.windows.net
|
68 |
+
# Aliyun oss Storage configuration
|
69 |
+
ALIYUN_OSS_BUCKET_NAME=your-bucket-name
|
70 |
+
ALIYUN_OSS_ACCESS_KEY=your-access-key
|
71 |
+
ALIYUN_OSS_SECRET_KEY=your-secret-key
|
72 |
+
ALIYUN_OSS_ENDPOINT=your-endpoint
|
73 |
+
ALIYUN_OSS_AUTH_VERSION=v1
|
74 |
+
ALIYUN_OSS_REGION=your-region
|
75 |
+
# Don't start with '/'. OSS doesn't support leading slash in object names.
|
76 |
+
ALIYUN_OSS_PATH=your-path
|
77 |
+
# Google Storage configuration
|
78 |
+
GOOGLE_STORAGE_BUCKET_NAME=yout-bucket-name
|
79 |
+
GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64=your-google-service-account-json-base64-string
|
80 |
+
|
81 |
+
# Tencent COS Storage configuration
|
82 |
+
TENCENT_COS_BUCKET_NAME=your-bucket-name
|
83 |
+
TENCENT_COS_SECRET_KEY=your-secret-key
|
84 |
+
TENCENT_COS_SECRET_ID=your-secret-id
|
85 |
+
TENCENT_COS_REGION=your-region
|
86 |
+
TENCENT_COS_SCHEME=your-scheme
|
87 |
+
|
88 |
+
# Huawei OBS Storage Configuration
|
89 |
+
HUAWEI_OBS_BUCKET_NAME=your-bucket-name
|
90 |
+
HUAWEI_OBS_SECRET_KEY=your-secret-key
|
91 |
+
HUAWEI_OBS_ACCESS_KEY=your-access-key
|
92 |
+
HUAWEI_OBS_SERVER=your-server-url
|
93 |
+
|
94 |
+
# Baidu OBS Storage Configuration
|
95 |
+
BAIDU_OBS_BUCKET_NAME=your-bucket-name
|
96 |
+
BAIDU_OBS_SECRET_KEY=your-secret-key
|
97 |
+
BAIDU_OBS_ACCESS_KEY=your-access-key
|
98 |
+
BAIDU_OBS_ENDPOINT=your-server-url
|
99 |
+
|
100 |
+
# OCI Storage configuration
|
101 |
+
OCI_ENDPOINT=your-endpoint
|
102 |
+
OCI_BUCKET_NAME=your-bucket-name
|
103 |
+
OCI_ACCESS_KEY=your-access-key
|
104 |
+
OCI_SECRET_KEY=your-secret-key
|
105 |
+
OCI_REGION=your-region
|
106 |
+
|
107 |
+
# Volcengine tos Storage configuration
|
108 |
+
VOLCENGINE_TOS_ENDPOINT=your-endpoint
|
109 |
+
VOLCENGINE_TOS_BUCKET_NAME=your-bucket-name
|
110 |
+
VOLCENGINE_TOS_ACCESS_KEY=your-access-key
|
111 |
+
VOLCENGINE_TOS_SECRET_KEY=your-secret-key
|
112 |
+
VOLCENGINE_TOS_REGION=your-region
|
113 |
+
|
114 |
+
# Supabase Storage Configuration
|
115 |
+
SUPABASE_BUCKET_NAME=your-bucket-name
|
116 |
+
SUPABASE_API_KEY=your-access-key
|
117 |
+
SUPABASE_URL=your-server-url
|
118 |
+
|
119 |
+
# CORS configuration
|
120 |
+
WEB_API_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
|
121 |
+
CONSOLE_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
|
122 |
+
|
123 |
+
|
124 |
+
# Vector database configuration, support: weaviate, qdrant, milvus, myscale, relyt, pgvecto_rs, pgvector, pgvector, chroma, opensearch, tidb_vector, couchbase, vikingdb, upstash, lindorm
|
125 |
+
VECTOR_STORE=weaviate
|
126 |
+
|
127 |
+
# Weaviate configuration
|
128 |
+
WEAVIATE_ENDPOINT=http://localhost:8080
|
129 |
+
WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
|
130 |
+
WEAVIATE_GRPC_ENABLED=false
|
131 |
+
WEAVIATE_BATCH_SIZE=100
|
132 |
+
|
133 |
+
# Qdrant configuration, use `http://localhost:6333` for local mode or `https://your-qdrant-cluster-url.qdrant.io` for remote mode
|
134 |
+
QDRANT_URL=http://localhost:6333
|
135 |
+
QDRANT_API_KEY=difyai123456
|
136 |
+
QDRANT_CLIENT_TIMEOUT=20
|
137 |
+
QDRANT_GRPC_ENABLED=false
|
138 |
+
QDRANT_GRPC_PORT=6334
|
139 |
+
|
140 |
+
#Couchbase configuration
|
141 |
+
COUCHBASE_CONNECTION_STRING=127.0.0.1
|
142 |
+
COUCHBASE_USER=Administrator
|
143 |
+
COUCHBASE_PASSWORD=password
|
144 |
+
COUCHBASE_BUCKET_NAME=Embeddings
|
145 |
+
COUCHBASE_SCOPE_NAME=_default
|
146 |
+
|
147 |
+
# Milvus configuration
|
148 |
+
MILVUS_URI=http://127.0.0.1:19530
|
149 |
+
MILVUS_TOKEN=
|
150 |
+
MILVUS_USER=root
|
151 |
+
MILVUS_PASSWORD=Milvus
|
152 |
+
|
153 |
+
# MyScale configuration
|
154 |
+
MYSCALE_HOST=127.0.0.1
|
155 |
+
MYSCALE_PORT=8123
|
156 |
+
MYSCALE_USER=default
|
157 |
+
MYSCALE_PASSWORD=
|
158 |
+
MYSCALE_DATABASE=default
|
159 |
+
MYSCALE_FTS_PARAMS=
|
160 |
+
|
161 |
+
# Relyt configuration
|
162 |
+
RELYT_HOST=127.0.0.1
|
163 |
+
RELYT_PORT=5432
|
164 |
+
RELYT_USER=postgres
|
165 |
+
RELYT_PASSWORD=postgres
|
166 |
+
RELYT_DATABASE=postgres
|
167 |
+
|
168 |
+
# Tencent configuration
|
169 |
+
TENCENT_VECTOR_DB_URL=http://127.0.0.1
|
170 |
+
TENCENT_VECTOR_DB_API_KEY=dify
|
171 |
+
TENCENT_VECTOR_DB_TIMEOUT=30
|
172 |
+
TENCENT_VECTOR_DB_USERNAME=dify
|
173 |
+
TENCENT_VECTOR_DB_DATABASE=dify
|
174 |
+
TENCENT_VECTOR_DB_SHARD=1
|
175 |
+
TENCENT_VECTOR_DB_REPLICAS=2
|
176 |
+
|
177 |
+
# ElasticSearch configuration
|
178 |
+
ELASTICSEARCH_HOST=127.0.0.1
|
179 |
+
ELASTICSEARCH_PORT=9200
|
180 |
+
ELASTICSEARCH_USERNAME=elastic
|
181 |
+
ELASTICSEARCH_PASSWORD=elastic
|
182 |
+
|
183 |
+
# PGVECTO_RS configuration
|
184 |
+
PGVECTO_RS_HOST=localhost
|
185 |
+
PGVECTO_RS_PORT=5431
|
186 |
+
PGVECTO_RS_USER=postgres
|
187 |
+
PGVECTO_RS_PASSWORD=difyai123456
|
188 |
+
PGVECTO_RS_DATABASE=postgres
|
189 |
+
|
190 |
+
# PGVector configuration
|
191 |
+
PGVECTOR_HOST=127.0.0.1
|
192 |
+
PGVECTOR_PORT=5433
|
193 |
+
PGVECTOR_USER=postgres
|
194 |
+
PGVECTOR_PASSWORD=postgres
|
195 |
+
PGVECTOR_DATABASE=postgres
|
196 |
+
PGVECTOR_MIN_CONNECTION=1
|
197 |
+
PGVECTOR_MAX_CONNECTION=5
|
198 |
+
|
199 |
+
# Tidb Vector configuration
|
200 |
+
TIDB_VECTOR_HOST=xxx.eu-central-1.xxx.aws.tidbcloud.com
|
201 |
+
TIDB_VECTOR_PORT=4000
|
202 |
+
TIDB_VECTOR_USER=xxx.root
|
203 |
+
TIDB_VECTOR_PASSWORD=xxxxxx
|
204 |
+
TIDB_VECTOR_DATABASE=dify
|
205 |
+
|
206 |
+
# Tidb on qdrant configuration
|
207 |
+
TIDB_ON_QDRANT_URL=http://127.0.0.1
|
208 |
+
TIDB_ON_QDRANT_API_KEY=dify
|
209 |
+
TIDB_ON_QDRANT_CLIENT_TIMEOUT=20
|
210 |
+
TIDB_ON_QDRANT_GRPC_ENABLED=false
|
211 |
+
TIDB_ON_QDRANT_GRPC_PORT=6334
|
212 |
+
TIDB_PUBLIC_KEY=dify
|
213 |
+
TIDB_PRIVATE_KEY=dify
|
214 |
+
TIDB_API_URL=http://127.0.0.1
|
215 |
+
TIDB_IAM_API_URL=http://127.0.0.1
|
216 |
+
TIDB_REGION=regions/aws-us-east-1
|
217 |
+
TIDB_PROJECT_ID=dify
|
218 |
+
TIDB_SPEND_LIMIT=100
|
219 |
+
|
220 |
+
# Chroma configuration
|
221 |
+
CHROMA_HOST=127.0.0.1
|
222 |
+
CHROMA_PORT=8000
|
223 |
+
CHROMA_TENANT=default_tenant
|
224 |
+
CHROMA_DATABASE=default_database
|
225 |
+
CHROMA_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider
|
226 |
+
CHROMA_AUTH_CREDENTIALS=difyai123456
|
227 |
+
|
228 |
+
# AnalyticDB configuration
|
229 |
+
ANALYTICDB_KEY_ID=your-ak
|
230 |
+
ANALYTICDB_KEY_SECRET=your-sk
|
231 |
+
ANALYTICDB_REGION_ID=cn-hangzhou
|
232 |
+
ANALYTICDB_INSTANCE_ID=gp-ab123456
|
233 |
+
ANALYTICDB_ACCOUNT=testaccount
|
234 |
+
ANALYTICDB_PASSWORD=testpassword
|
235 |
+
ANALYTICDB_NAMESPACE=dify
|
236 |
+
ANALYTICDB_NAMESPACE_PASSWORD=difypassword
|
237 |
+
|
238 |
+
# OpenSearch configuration
|
239 |
+
OPENSEARCH_HOST=127.0.0.1
|
240 |
+
OPENSEARCH_PORT=9200
|
241 |
+
OPENSEARCH_USER=admin
|
242 |
+
OPENSEARCH_PASSWORD=admin
|
243 |
+
OPENSEARCH_SECURE=true
|
244 |
+
|
245 |
+
# Baidu configuration
|
246 |
+
BAIDU_VECTOR_DB_ENDPOINT=http://127.0.0.1:5287
|
247 |
+
BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS=30000
|
248 |
+
BAIDU_VECTOR_DB_ACCOUNT=root
|
249 |
+
BAIDU_VECTOR_DB_API_KEY=dify
|
250 |
+
BAIDU_VECTOR_DB_DATABASE=dify
|
251 |
+
BAIDU_VECTOR_DB_SHARD=1
|
252 |
+
BAIDU_VECTOR_DB_REPLICAS=3
|
253 |
+
|
254 |
+
# Upstash configuration
|
255 |
+
UPSTASH_VECTOR_URL=your-server-url
|
256 |
+
UPSTASH_VECTOR_TOKEN=your-access-token
|
257 |
+
|
258 |
+
# ViKingDB configuration
|
259 |
+
VIKINGDB_ACCESS_KEY=your-ak
|
260 |
+
VIKINGDB_SECRET_KEY=your-sk
|
261 |
+
VIKINGDB_REGION=cn-shanghai
|
262 |
+
VIKINGDB_HOST=api-vikingdb.xxx.volces.com
|
263 |
+
VIKINGDB_SCHEMA=http
|
264 |
+
VIKINGDB_CONNECTION_TIMEOUT=30
|
265 |
+
VIKINGDB_SOCKET_TIMEOUT=30
|
266 |
+
|
267 |
+
# Lindorm configuration
|
268 |
+
LINDORM_URL=http://ld-*******************-proxy-search-pub.lindorm.aliyuncs.com:30070
|
269 |
+
LINDORM_USERNAME=admin
|
270 |
+
LINDORM_PASSWORD=admin
|
271 |
+
|
272 |
+
# OceanBase Vector configuration
|
273 |
+
OCEANBASE_VECTOR_HOST=127.0.0.1
|
274 |
+
OCEANBASE_VECTOR_PORT=2881
|
275 |
+
OCEANBASE_VECTOR_USER=root@test
|
276 |
+
OCEANBASE_VECTOR_PASSWORD=
|
277 |
+
OCEANBASE_VECTOR_DATABASE=test
|
278 |
+
OCEANBASE_MEMORY_LIMIT=6G
|
279 |
+
|
280 |
+
|
281 |
+
# Upload configuration
|
282 |
+
UPLOAD_FILE_SIZE_LIMIT=15
|
283 |
+
UPLOAD_FILE_BATCH_LIMIT=5
|
284 |
+
UPLOAD_IMAGE_FILE_SIZE_LIMIT=10
|
285 |
+
UPLOAD_VIDEO_FILE_SIZE_LIMIT=100
|
286 |
+
UPLOAD_AUDIO_FILE_SIZE_LIMIT=50
|
287 |
+
|
288 |
+
# Model Configuration
|
289 |
+
MULTIMODAL_SEND_IMAGE_FORMAT=base64
|
290 |
+
PROMPT_GENERATION_MAX_TOKENS=512
|
291 |
+
CODE_GENERATION_MAX_TOKENS=1024
|
292 |
+
|
293 |
+
# Mail configuration, support: resend, smtp
|
294 |
+
MAIL_TYPE=
|
295 |
+
MAIL_DEFAULT_SEND_FROM=no-reply <[email protected]>
|
296 |
+
RESEND_API_KEY=
|
297 |
+
RESEND_API_URL=https://api.resend.com
|
298 |
+
# smtp configuration
|
299 |
+
SMTP_SERVER=smtp.gmail.com
|
300 |
+
SMTP_PORT=465
|
301 |
+
SMTP_USERNAME=123
|
302 |
+
SMTP_PASSWORD=abc
|
303 |
+
SMTP_USE_TLS=true
|
304 |
+
SMTP_OPPORTUNISTIC_TLS=false
|
305 |
+
|
306 |
+
# Sentry configuration
|
307 |
+
SENTRY_DSN=
|
308 |
+
|
309 |
+
# DEBUG
|
310 |
+
DEBUG=false
|
311 |
+
SQLALCHEMY_ECHO=false
|
312 |
+
|
313 |
+
# Notion import configuration, support public and internal
|
314 |
+
NOTION_INTEGRATION_TYPE=public
|
315 |
+
NOTION_CLIENT_SECRET=you-client-secret
|
316 |
+
NOTION_CLIENT_ID=you-client-id
|
317 |
+
NOTION_INTERNAL_SECRET=you-internal-secret
|
318 |
+
|
319 |
+
ETL_TYPE=dify
|
320 |
+
UNSTRUCTURED_API_URL=
|
321 |
+
UNSTRUCTURED_API_KEY=
|
322 |
+
|
323 |
+
#ssrf
|
324 |
+
SSRF_PROXY_HTTP_URL=
|
325 |
+
SSRF_PROXY_HTTPS_URL=
|
326 |
+
SSRF_DEFAULT_MAX_RETRIES=3
|
327 |
+
SSRF_DEFAULT_TIME_OUT=
|
328 |
+
SSRF_DEFAULT_CONNECT_TIME_OUT=
|
329 |
+
SSRF_DEFAULT_READ_TIME_OUT=
|
330 |
+
SSRF_DEFAULT_WRITE_TIME_OUT=
|
331 |
+
|
332 |
+
BATCH_UPLOAD_LIMIT=10
|
333 |
+
KEYWORD_DATA_SOURCE_TYPE=database
|
334 |
+
|
335 |
+
# Workflow file upload limit
|
336 |
+
WORKFLOW_FILE_UPLOAD_LIMIT=10
|
337 |
+
|
338 |
+
# CODE EXECUTION CONFIGURATION
|
339 |
+
CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194
|
340 |
+
CODE_EXECUTION_API_KEY=dify-sandbox
|
341 |
+
CODE_MAX_NUMBER=9223372036854775807
|
342 |
+
CODE_MIN_NUMBER=-9223372036854775808
|
343 |
+
CODE_MAX_STRING_LENGTH=80000
|
344 |
+
TEMPLATE_TRANSFORM_MAX_LENGTH=80000
|
345 |
+
CODE_MAX_STRING_ARRAY_LENGTH=30
|
346 |
+
CODE_MAX_OBJECT_ARRAY_LENGTH=30
|
347 |
+
CODE_MAX_NUMBER_ARRAY_LENGTH=1000
|
348 |
+
|
349 |
+
# API Tool configuration
|
350 |
+
API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
|
351 |
+
API_TOOL_DEFAULT_READ_TIMEOUT=60
|
352 |
+
|
353 |
+
# HTTP Node configuration
|
354 |
+
HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
|
355 |
+
HTTP_REQUEST_MAX_READ_TIMEOUT=600
|
356 |
+
HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
|
357 |
+
HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760
|
358 |
+
HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576
|
359 |
+
|
360 |
+
# Respect X-* headers to redirect clients
|
361 |
+
RESPECT_XFORWARD_HEADERS_ENABLED=false
|
362 |
+
|
363 |
+
# Log file path
|
364 |
+
LOG_FILE=
|
365 |
+
# Log file max size, the unit is MB
|
366 |
+
LOG_FILE_MAX_SIZE=20
|
367 |
+
# Log file max backup count
|
368 |
+
LOG_FILE_BACKUP_COUNT=5
|
369 |
+
|
370 |
+
# Indexing configuration
|
371 |
+
INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=1000
|
372 |
+
|
373 |
+
# Workflow runtime configuration
|
374 |
+
WORKFLOW_MAX_EXECUTION_STEPS=500
|
375 |
+
WORKFLOW_MAX_EXECUTION_TIME=1200
|
376 |
+
WORKFLOW_CALL_MAX_DEPTH=5
|
377 |
+
MAX_VARIABLE_SIZE=204800
|
378 |
+
|
379 |
+
# App configuration
|
380 |
+
APP_MAX_EXECUTION_TIME=1200
|
381 |
+
APP_MAX_ACTIVE_REQUESTS=0
|
382 |
+
|
383 |
+
|
384 |
+
# Celery beat configuration
|
385 |
+
CELERY_BEAT_SCHEDULER_TIME=1
|
386 |
+
|
387 |
+
# Position configuration
|
388 |
+
POSITION_TOOL_PINS=
|
389 |
+
POSITION_TOOL_INCLUDES=
|
390 |
+
POSITION_TOOL_EXCLUDES=
|
391 |
+
|
392 |
+
POSITION_PROVIDER_PINS=
|
393 |
+
POSITION_PROVIDER_INCLUDES=
|
394 |
+
POSITION_PROVIDER_EXCLUDES=
|
395 |
+
|
396 |
+
# Reset password token expiry minutes
|
397 |
+
RESET_PASSWORD_TOKEN_EXPIRY_MINUTES=5
|
api/Dockerfile
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# base image
|
2 |
+
FROM python:3.10-slim-bookworm AS base
|
3 |
+
|
4 |
+
WORKDIR /app/api
|
5 |
+
|
6 |
+
# Install Poetry
|
7 |
+
ENV POETRY_VERSION=1.8.3
|
8 |
+
|
9 |
+
# if you located in China, you can use aliyun mirror to speed up
|
10 |
+
# RUN pip install --no-cache-dir poetry==${POETRY_VERSION} -i https://mirrors.aliyun.com/pypi/simple/
|
11 |
+
|
12 |
+
RUN pip install --no-cache-dir poetry==${POETRY_VERSION}
|
13 |
+
|
14 |
+
# Configure Poetry
|
15 |
+
ENV POETRY_CACHE_DIR=/tmp/poetry_cache
|
16 |
+
ENV POETRY_NO_INTERACTION=1
|
17 |
+
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
|
18 |
+
ENV POETRY_VIRTUALENVS_CREATE=true
|
19 |
+
ENV POETRY_REQUESTS_TIMEOUT=15
|
20 |
+
|
21 |
+
FROM base AS packages
|
22 |
+
|
23 |
+
# if you located in China, you can use aliyun mirror to speed up
|
24 |
+
# RUN sed -i '[email protected]@mirrors.aliyun.com@g' /etc/apt/sources.list.d/debian.sources
|
25 |
+
|
26 |
+
RUN apt-get update \
|
27 |
+
&& apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev
|
28 |
+
|
29 |
+
# Install Python dependencies
|
30 |
+
COPY pyproject.toml poetry.lock ./
|
31 |
+
RUN poetry install --sync --no-cache --no-root
|
32 |
+
|
33 |
+
# production stage
|
34 |
+
FROM base AS production
|
35 |
+
|
36 |
+
ENV FLASK_APP=app.py
|
37 |
+
ENV EDITION=SELF_HOSTED
|
38 |
+
ENV DEPLOY_ENV=PRODUCTION
|
39 |
+
ENV CONSOLE_API_URL=http://127.0.0.1:5001
|
40 |
+
ENV CONSOLE_WEB_URL=http://127.0.0.1:3000
|
41 |
+
ENV SERVICE_API_URL=http://127.0.0.1:5001
|
42 |
+
ENV APP_WEB_URL=http://127.0.0.1:3000
|
43 |
+
|
44 |
+
EXPOSE 5001
|
45 |
+
|
46 |
+
# set timezone
|
47 |
+
ENV TZ=UTC
|
48 |
+
|
49 |
+
WORKDIR /app/api
|
50 |
+
|
51 |
+
RUN apt-get update \
|
52 |
+
&& apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \
|
53 |
+
# if you located in China, you can use aliyun mirror to speed up
|
54 |
+
# && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list \
|
55 |
+
&& echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
|
56 |
+
&& apt-get update \
|
57 |
+
# For Security
|
58 |
+
&& apt-get install -y --no-install-recommends expat=2.6.3-2 libldap-2.5-0=2.5.18+dfsg-3+b1 perl=5.40.0-6 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1 \
|
59 |
+
# install a chinese font to support the use of tools like matplotlib
|
60 |
+
&& apt-get install -y fonts-noto-cjk \
|
61 |
+
&& apt-get autoremove -y \
|
62 |
+
&& rm -rf /var/lib/apt/lists/*
|
63 |
+
|
64 |
+
# Copy Python environment and packages
|
65 |
+
ENV VIRTUAL_ENV=/app/api/.venv
|
66 |
+
COPY --from=packages ${VIRTUAL_ENV} ${VIRTUAL_ENV}
|
67 |
+
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
68 |
+
|
69 |
+
# Download nltk data
|
70 |
+
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')"
|
71 |
+
|
72 |
+
# Copy source code
|
73 |
+
COPY . /app/api/
|
74 |
+
|
75 |
+
# Copy entrypoint
|
76 |
+
COPY docker/entrypoint.sh /entrypoint.sh
|
77 |
+
RUN chmod +x /entrypoint.sh
|
78 |
+
|
79 |
+
|
80 |
+
ARG COMMIT_SHA
|
81 |
+
ENV COMMIT_SHA=${COMMIT_SHA}
|
82 |
+
|
83 |
+
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
api/README.md
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Dify Backend API
|
2 |
+
|
3 |
+
## Usage
|
4 |
+
|
5 |
+
> [!IMPORTANT]
|
6 |
+
> In the v0.6.12 release, we deprecated `pip` as the package management tool for Dify API Backend service and replaced it with `poetry`.
|
7 |
+
|
8 |
+
1. Start the docker-compose stack
|
9 |
+
|
10 |
+
The backend require some middleware, including PostgreSQL, Redis, and Weaviate, which can be started together using `docker-compose`.
|
11 |
+
|
12 |
+
```bash
|
13 |
+
cd ../docker
|
14 |
+
cp middleware.env.example middleware.env
|
15 |
+
# change the profile to other vector database if you are not using weaviate
|
16 |
+
docker compose -f docker-compose.middleware.yaml --profile weaviate -p dify up -d
|
17 |
+
cd ../api
|
18 |
+
```
|
19 |
+
|
20 |
+
2. Copy `.env.example` to `.env`
|
21 |
+
3. Generate a `SECRET_KEY` in the `.env` file.
|
22 |
+
|
23 |
+
```bash for Linux
|
24 |
+
sed -i "/^SECRET_KEY=/c\SECRET_KEY=$(openssl rand -base64 42)" .env
|
25 |
+
```
|
26 |
+
|
27 |
+
```bash for Mac
|
28 |
+
secret_key=$(openssl rand -base64 42)
|
29 |
+
sed -i '' "/^SECRET_KEY=/c\\
|
30 |
+
SECRET_KEY=${secret_key}" .env
|
31 |
+
```
|
32 |
+
|
33 |
+
4. Create environment.
|
34 |
+
|
35 |
+
Dify API service uses [Poetry](https://python-poetry.org/docs/) to manage dependencies. You can execute `poetry shell` to activate the environment.
|
36 |
+
|
37 |
+
5. Install dependencies
|
38 |
+
|
39 |
+
```bash
|
40 |
+
poetry env use 3.10
|
41 |
+
poetry install
|
42 |
+
```
|
43 |
+
|
44 |
+
In case of contributors missing to update dependencies for `pyproject.toml`, you can perform the following shell instead.
|
45 |
+
|
46 |
+
```bash
|
47 |
+
poetry shell # activate current environment
|
48 |
+
poetry add $(cat requirements.txt) # install dependencies of production and update pyproject.toml
|
49 |
+
poetry add $(cat requirements-dev.txt) --group dev # install dependencies of development and update pyproject.toml
|
50 |
+
```
|
51 |
+
|
52 |
+
6. Run migrate
|
53 |
+
|
54 |
+
Before the first launch, migrate the database to the latest version.
|
55 |
+
|
56 |
+
```bash
|
57 |
+
poetry run python -m flask db upgrade
|
58 |
+
```
|
59 |
+
|
60 |
+
7. Start backend
|
61 |
+
|
62 |
+
```bash
|
63 |
+
poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug
|
64 |
+
```
|
65 |
+
|
66 |
+
8. Start Dify [web](../web) service.
|
67 |
+
9. Setup your application by visiting `http://localhost:3000`...
|
68 |
+
10. If you need to handle and debug the async tasks (e.g. dataset importing and documents indexing), please start the worker service.
|
69 |
+
|
70 |
+
```bash
|
71 |
+
poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion
|
72 |
+
```
|
73 |
+
|
74 |
+
## Testing
|
75 |
+
|
76 |
+
1. Install dependencies for both the backend and the test environment
|
77 |
+
|
78 |
+
```bash
|
79 |
+
poetry install -C api --with dev
|
80 |
+
```
|
81 |
+
|
82 |
+
2. Run the tests locally with mocked system environment variables in `tool.pytest_env` section in `pyproject.toml`
|
83 |
+
|
84 |
+
```bash
|
85 |
+
poetry run -C api bash dev/pytest/pytest_all_tests.sh
|
86 |
+
```
|
87 |
+
|
88 |
+
|
api/app.py
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
from configs import dify_config
|
4 |
+
|
5 |
+
if os.environ.get("DEBUG", "false").lower() != "true":
|
6 |
+
from gevent import monkey
|
7 |
+
|
8 |
+
monkey.patch_all()
|
9 |
+
|
10 |
+
import grpc.experimental.gevent
|
11 |
+
|
12 |
+
grpc.experimental.gevent.init_gevent()
|
13 |
+
|
14 |
+
import json
|
15 |
+
import threading
|
16 |
+
import time
|
17 |
+
import warnings
|
18 |
+
|
19 |
+
from flask import Response
|
20 |
+
|
21 |
+
from app_factory import create_app
|
22 |
+
|
23 |
+
# DO NOT REMOVE BELOW
|
24 |
+
from events import event_handlers # noqa: F401
|
25 |
+
from extensions.ext_database import db
|
26 |
+
|
27 |
+
# TODO: Find a way to avoid importing models here
|
28 |
+
from models import account, dataset, model, source, task, tool, tools, web # noqa: F401
|
29 |
+
|
30 |
+
# DO NOT REMOVE ABOVE
|
31 |
+
|
32 |
+
|
33 |
+
warnings.simplefilter("ignore", ResourceWarning)
|
34 |
+
|
35 |
+
os.environ["TZ"] = "UTC"
|
36 |
+
# windows platform not support tzset
|
37 |
+
if hasattr(time, "tzset"):
|
38 |
+
time.tzset()
|
39 |
+
|
40 |
+
|
41 |
+
# create app
|
42 |
+
app = create_app()
|
43 |
+
celery = app.extensions["celery"]
|
44 |
+
|
45 |
+
if dify_config.TESTING:
|
46 |
+
print("App is running in TESTING mode")
|
47 |
+
|
48 |
+
|
49 |
+
@app.after_request
|
50 |
+
def after_request(response):
|
51 |
+
"""Add Version headers to the response."""
|
52 |
+
response.set_cookie("remember_token", "", expires=0)
|
53 |
+
response.headers.add("X-Version", dify_config.CURRENT_VERSION)
|
54 |
+
response.headers.add("X-Env", dify_config.DEPLOY_ENV)
|
55 |
+
return response
|
56 |
+
|
57 |
+
|
58 |
+
@app.route("/health")
|
59 |
+
def health():
|
60 |
+
return Response(
|
61 |
+
json.dumps({"pid": os.getpid(), "status": "ok", "version": dify_config.CURRENT_VERSION}),
|
62 |
+
status=200,
|
63 |
+
content_type="application/json",
|
64 |
+
)
|
65 |
+
|
66 |
+
|
67 |
+
@app.route("/threads")
|
68 |
+
def threads():
|
69 |
+
num_threads = threading.active_count()
|
70 |
+
threads = threading.enumerate()
|
71 |
+
|
72 |
+
thread_list = []
|
73 |
+
for thread in threads:
|
74 |
+
thread_name = thread.name
|
75 |
+
thread_id = thread.ident
|
76 |
+
is_alive = thread.is_alive()
|
77 |
+
|
78 |
+
thread_list.append(
|
79 |
+
{
|
80 |
+
"name": thread_name,
|
81 |
+
"id": thread_id,
|
82 |
+
"is_alive": is_alive,
|
83 |
+
}
|
84 |
+
)
|
85 |
+
|
86 |
+
return {
|
87 |
+
"pid": os.getpid(),
|
88 |
+
"thread_num": num_threads,
|
89 |
+
"threads": thread_list,
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
@app.route("/db-pool-stat")
|
94 |
+
def pool_stat():
|
95 |
+
engine = db.engine
|
96 |
+
return {
|
97 |
+
"pid": os.getpid(),
|
98 |
+
"pool_size": engine.pool.size(),
|
99 |
+
"checked_in_connections": engine.pool.checkedin(),
|
100 |
+
"checked_out_connections": engine.pool.checkedout(),
|
101 |
+
"overflow_connections": engine.pool.overflow(),
|
102 |
+
"connection_timeout": engine.pool.timeout(),
|
103 |
+
"recycle_time": db.engine.pool._recycle,
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
if __name__ == "__main__":
|
108 |
+
app.run(host="0.0.0.0", port=5001)
|
api/app_factory.py
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
if os.environ.get("DEBUG", "false").lower() != "true":
|
4 |
+
from gevent import monkey
|
5 |
+
|
6 |
+
monkey.patch_all()
|
7 |
+
|
8 |
+
import grpc.experimental.gevent
|
9 |
+
|
10 |
+
grpc.experimental.gevent.init_gevent()
|
11 |
+
|
12 |
+
import json
|
13 |
+
|
14 |
+
from flask import Flask, Response, request
|
15 |
+
from flask_cors import CORS
|
16 |
+
from werkzeug.exceptions import Unauthorized
|
17 |
+
|
18 |
+
import contexts
|
19 |
+
from commands import register_commands
|
20 |
+
from configs import dify_config
|
21 |
+
from extensions import (
|
22 |
+
ext_celery,
|
23 |
+
ext_code_based_extension,
|
24 |
+
ext_compress,
|
25 |
+
ext_database,
|
26 |
+
ext_hosting_provider,
|
27 |
+
ext_logging,
|
28 |
+
ext_login,
|
29 |
+
ext_mail,
|
30 |
+
ext_migrate,
|
31 |
+
ext_proxy_fix,
|
32 |
+
ext_redis,
|
33 |
+
ext_sentry,
|
34 |
+
ext_storage,
|
35 |
+
)
|
36 |
+
from extensions.ext_database import db
|
37 |
+
from extensions.ext_login import login_manager
|
38 |
+
from libs.passport import PassportService
|
39 |
+
from services.account_service import AccountService
|
40 |
+
|
41 |
+
|
42 |
+
class DifyApp(Flask):
|
43 |
+
pass
|
44 |
+
|
45 |
+
|
46 |
+
# ----------------------------
|
47 |
+
# Application Factory Function
|
48 |
+
# ----------------------------
|
49 |
+
def create_flask_app_with_configs() -> Flask:
|
50 |
+
"""
|
51 |
+
create a raw flask app
|
52 |
+
with configs loaded from .env file
|
53 |
+
"""
|
54 |
+
dify_app = DifyApp(__name__)
|
55 |
+
dify_app.config.from_mapping(dify_config.model_dump())
|
56 |
+
|
57 |
+
# populate configs into system environment variables
|
58 |
+
for key, value in dify_app.config.items():
|
59 |
+
if isinstance(value, str):
|
60 |
+
os.environ[key] = value
|
61 |
+
elif isinstance(value, int | float | bool):
|
62 |
+
os.environ[key] = str(value)
|
63 |
+
elif value is None:
|
64 |
+
os.environ[key] = ""
|
65 |
+
|
66 |
+
return dify_app
|
67 |
+
|
68 |
+
|
69 |
+
def create_app() -> Flask:
|
70 |
+
app = create_flask_app_with_configs()
|
71 |
+
app.secret_key = dify_config.SECRET_KEY
|
72 |
+
initialize_extensions(app)
|
73 |
+
register_blueprints(app)
|
74 |
+
register_commands(app)
|
75 |
+
|
76 |
+
return app
|
77 |
+
|
78 |
+
|
79 |
+
def initialize_extensions(app):
|
80 |
+
# Since the application instance is now created, pass it to each Flask
|
81 |
+
# extension instance to bind it to the Flask application instance (app)
|
82 |
+
ext_logging.init_app(app)
|
83 |
+
ext_compress.init_app(app)
|
84 |
+
ext_code_based_extension.init()
|
85 |
+
ext_database.init_app(app)
|
86 |
+
ext_migrate.init(app, db)
|
87 |
+
ext_redis.init_app(app)
|
88 |
+
ext_storage.init_app(app)
|
89 |
+
ext_celery.init_app(app)
|
90 |
+
ext_login.init_app(app)
|
91 |
+
ext_mail.init_app(app)
|
92 |
+
ext_hosting_provider.init_app(app)
|
93 |
+
ext_sentry.init_app(app)
|
94 |
+
ext_proxy_fix.init_app(app)
|
95 |
+
|
96 |
+
|
97 |
+
# Flask-Login configuration
|
98 |
+
@login_manager.request_loader
|
99 |
+
def load_user_from_request(request_from_flask_login):
|
100 |
+
"""Load user based on the request."""
|
101 |
+
if request.blueprint not in {"console", "inner_api"}:
|
102 |
+
return None
|
103 |
+
# Check if the user_id contains a dot, indicating the old format
|
104 |
+
auth_header = request.headers.get("Authorization", "")
|
105 |
+
if not auth_header:
|
106 |
+
auth_token = request.args.get("_token")
|
107 |
+
if not auth_token:
|
108 |
+
raise Unauthorized("Invalid Authorization token.")
|
109 |
+
else:
|
110 |
+
if " " not in auth_header:
|
111 |
+
raise Unauthorized("Invalid Authorization header format. Expected 'Bearer <api-key>' format.")
|
112 |
+
auth_scheme, auth_token = auth_header.split(None, 1)
|
113 |
+
auth_scheme = auth_scheme.lower()
|
114 |
+
if auth_scheme != "bearer":
|
115 |
+
raise Unauthorized("Invalid Authorization header format. Expected 'Bearer <api-key>' format.")
|
116 |
+
|
117 |
+
decoded = PassportService().verify(auth_token)
|
118 |
+
user_id = decoded.get("user_id")
|
119 |
+
|
120 |
+
logged_in_account = AccountService.load_logged_in_account(account_id=user_id)
|
121 |
+
if logged_in_account:
|
122 |
+
contexts.tenant_id.set(logged_in_account.current_tenant_id)
|
123 |
+
return logged_in_account
|
124 |
+
|
125 |
+
|
126 |
+
@login_manager.unauthorized_handler
|
127 |
+
def unauthorized_handler():
|
128 |
+
"""Handle unauthorized requests."""
|
129 |
+
return Response(
|
130 |
+
json.dumps({"code": "unauthorized", "message": "Unauthorized."}),
|
131 |
+
status=401,
|
132 |
+
content_type="application/json",
|
133 |
+
)
|
134 |
+
|
135 |
+
|
136 |
+
# register blueprint routers
|
137 |
+
def register_blueprints(app):
|
138 |
+
from controllers.console import bp as console_app_bp
|
139 |
+
from controllers.files import bp as files_bp
|
140 |
+
from controllers.inner_api import bp as inner_api_bp
|
141 |
+
from controllers.service_api import bp as service_api_bp
|
142 |
+
from controllers.web import bp as web_bp
|
143 |
+
|
144 |
+
CORS(
|
145 |
+
service_api_bp,
|
146 |
+
allow_headers=["Content-Type", "Authorization", "X-App-Code"],
|
147 |
+
methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
|
148 |
+
)
|
149 |
+
app.register_blueprint(service_api_bp)
|
150 |
+
|
151 |
+
CORS(
|
152 |
+
web_bp,
|
153 |
+
resources={r"/*": {"origins": dify_config.WEB_API_CORS_ALLOW_ORIGINS}},
|
154 |
+
supports_credentials=True,
|
155 |
+
allow_headers=["Content-Type", "Authorization", "X-App-Code"],
|
156 |
+
methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
|
157 |
+
expose_headers=["X-Version", "X-Env"],
|
158 |
+
)
|
159 |
+
|
160 |
+
app.register_blueprint(web_bp)
|
161 |
+
|
162 |
+
CORS(
|
163 |
+
console_app_bp,
|
164 |
+
resources={r"/*": {"origins": dify_config.CONSOLE_CORS_ALLOW_ORIGINS}},
|
165 |
+
supports_credentials=True,
|
166 |
+
allow_headers=["Content-Type", "Authorization"],
|
167 |
+
methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
|
168 |
+
expose_headers=["X-Version", "X-Env"],
|
169 |
+
)
|
170 |
+
|
171 |
+
app.register_blueprint(console_app_bp)
|
172 |
+
|
173 |
+
CORS(files_bp, allow_headers=["Content-Type"], methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"])
|
174 |
+
app.register_blueprint(files_bp)
|
175 |
+
|
176 |
+
app.register_blueprint(inner_api_bp)
|