mirror of
https://github.com/langgenius/dify.git
synced 2026-10-16 15:35:32 +08:00
docs: refresh project guides and fix generated API tables (#43239)
This commit is contained in:
@@ -1,93 +1,15 @@
|
||||
# Rule Catalog — Architecture
|
||||
# Architecture review
|
||||
|
||||
## Scope
|
||||
- Covers: controller/service/core-domain/libs/model layering, dependency direction, responsibility placement, observability-friendly flow.
|
||||
The [API agent guide](../../../../api/AGENTS.md) owns package boundaries. In particular, `api/core/` is migration-only: do not propose new files or extracted implementations there.
|
||||
|
||||
## Rules
|
||||
## Transport and domain boundaries
|
||||
|
||||
### Keep business logic out of controllers
|
||||
- Category: maintainability
|
||||
- Description: Controllers should parse input, call services, and return serialized responses. Business decisions inside controllers make behavior hard to reuse and test.
|
||||
- Suggested fix: Move domain/business logic into the service or core/domain layer. Keep controller handlers thin and orchestration-focused.
|
||||
- Example:
|
||||
- Bad:
|
||||
```python
|
||||
@bp.post("/apps/<app_id>/publish")
|
||||
def publish_app(app_id: str):
|
||||
payload = request.get_json() or {}
|
||||
if payload.get("force") and current_user.role != "admin":
|
||||
raise ValueError("only admin can force publish")
|
||||
app = App.query.get(app_id)
|
||||
app.status = "published"
|
||||
db.session.commit()
|
||||
return {"result": "ok"}
|
||||
```
|
||||
- Good:
|
||||
```python
|
||||
@bp.post("/apps/<app_id>/publish")
|
||||
def publish_app(app_id: str):
|
||||
payload = PublishRequest.model_validate(request.get_json() or {})
|
||||
app_service.publish_app(app_id=app_id, force=payload.force, actor_id=current_user.id)
|
||||
return {"result": "ok"}
|
||||
```
|
||||
Controllers own request parsing, service calls, and response serialization. Trace business decisions to their service or domain owner; flag controller policy when it duplicates or bypasses that owner. Move extracted behavior to an appropriate owner outside `core/`.
|
||||
|
||||
### Preserve layer dependency direction
|
||||
- Category: best practices
|
||||
- Description: Controllers may depend on services, and services may depend on core/domain abstractions. Reversing this direction (for example, core importing controller/web modules) creates cycles and leaks transport concerns into domain code.
|
||||
- Suggested fix: Extract shared contracts into core/domain or service-level modules and make upper layers depend on lower, not the reverse.
|
||||
- Example:
|
||||
- Bad:
|
||||
```python
|
||||
# core/policy/publish_policy.py
|
||||
from controllers.console.app import request_context
|
||||
## Dependency direction
|
||||
|
||||
Transport layers may depend on services and domain contracts. Domain code must not import controller or request context. Pass validated actor, tenant, and resource data explicitly instead of reaching upward for it. Check existing owners and import-linter contracts before proposing a shared abstraction.
|
||||
|
||||
def can_publish() -> bool:
|
||||
return request_context.current_user.is_admin
|
||||
```
|
||||
- Good:
|
||||
```python
|
||||
# core/policy/publish_policy.py
|
||||
def can_publish(role: str) -> bool:
|
||||
return role == "admin"
|
||||
## Business-agnostic libraries
|
||||
|
||||
|
||||
# service layer adapts web/user context to domain input
|
||||
allowed = can_publish(role=current_user.role)
|
||||
```
|
||||
|
||||
### Keep libs business-agnostic
|
||||
- Category: maintainability
|
||||
- Description: Modules under `api/libs/` should remain reusable, business-agnostic building blocks. They must not encode product/domain-specific rules, workflow orchestration, or business decisions.
|
||||
- Suggested fix:
|
||||
- If business logic appears in `api/libs/`, extract it into the appropriate `services/` or `core/` module and keep `libs` focused on generic, cross-cutting helpers.
|
||||
- Keep `libs` dependencies clean: avoid importing service/controller/domain-specific modules into `api/libs/`.
|
||||
- Example:
|
||||
- Bad:
|
||||
```python
|
||||
# api/libs/conversation_filter.py
|
||||
from services.conversation_service import ConversationService
|
||||
|
||||
|
||||
def should_archive_conversation(conversation, tenant_id: str) -> bool:
|
||||
# Domain policy and service dependency are leaking into libs.
|
||||
service = ConversationService()
|
||||
if service.has_paid_plan(tenant_id):
|
||||
return conversation.idle_days > 90
|
||||
return conversation.idle_days > 30
|
||||
```
|
||||
- Good:
|
||||
```python
|
||||
# api/libs/datetime_utils.py (business-agnostic helper)
|
||||
def older_than_days(idle_days: int, threshold_days: int) -> bool:
|
||||
return idle_days > threshold_days
|
||||
|
||||
|
||||
# services/conversation_service.py (business logic stays in service/core)
|
||||
from libs.datetime_utils import older_than_days
|
||||
|
||||
|
||||
def should_archive_conversation(conversation, tenant_id: str) -> bool:
|
||||
threshold_days = 90 if has_paid_plan(tenant_id) else 30
|
||||
return older_than_days(conversation.idle_days, threshold_days)
|
||||
```
|
||||
`api/libs/` must not own product policy or orchestration. Flag service/controller dependencies and domain-specific decisions in library helpers. Move that behavior to its existing service or domain owner outside `core/`; retain only reusable infrastructure in `libs/`.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
- Description: If a table/model already has a repository abstraction, all reads/writes/queries for that table should use the existing repository. If no repository exists, introduce one only when complexity justifies it, such as large/high-volume tables, repeated complex query logic, or likely storage-strategy variation.
|
||||
- Suggested fix:
|
||||
- First check `api/repositories`, `api/core/repositories`, and `api/extensions/*/repositories/` to verify whether the table/model already has a repository abstraction. If it exists, route all operations through it and add missing repository methods instead of bypassing it with ad-hoc SQLAlchemy access.
|
||||
- If no repository exists, add one only when complexity warrants it (for example, repeated complex queries, large data domains, or multiple storage strategies), while preserving dependency direction (service/core depends on abstraction; infra provides implementation).
|
||||
- If no repository exists, add one only when complexity warrants it (for example, repeated complex queries, large data domains, or multiple storage strategies). Follow `api/AGENTS.md`: put new abstractions and implementations outside migration-only `api/core/`, with services/domain code depending on abstractions and infrastructure providing implementations.
|
||||
- Example:
|
||||
- Bad:
|
||||
```python
|
||||
|
||||
+1
-15
@@ -1,7 +1,7 @@
|
||||
# Development with devcontainer
|
||||
|
||||
This project includes a devcontainer configuration that allows you to open the project in a container with a fully configured development environment.
|
||||
Both frontend and backend environments are initialized when the container is started.
|
||||
The create hook installs workspace JavaScript dependencies and `uv`; the start hook synchronizes backend dependencies. Follow the [backend setup](../api/README.md) and [frontend guide](../web/README.md) to configure environment files and start services.
|
||||
|
||||
## GitHub Codespaces
|
||||
|
||||
@@ -19,20 +19,6 @@ if you have VS Code installed, you can click the button above to open this proje
|
||||
|
||||
You can learn more in the [Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers).
|
||||
|
||||
## Pros of Devcontainer
|
||||
|
||||
Unified Development Environment: By using devcontainers, you can ensure that all developers are developing in the same environment, reducing the occurrence of "it works on my machine" type of issues.
|
||||
|
||||
Quick Start: New developers can set up their development environment in a few simple steps, without spending a lot of time on environment configuration.
|
||||
|
||||
Isolation: Devcontainers isolate your project from your host operating system, reducing the chance of OS updates or other application installations impacting the development environment.
|
||||
|
||||
## Cons of Devcontainer
|
||||
|
||||
Learning Curve: For developers unfamiliar with Docker and VS Code, using devcontainers may be somewhat complex.
|
||||
|
||||
Performance Impact: While usually minimal, programs running inside a devcontainer may be slightly slower than those running directly on the host.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
if you see such error message when you open this project in codespaces:
|
||||
|
||||
Vendored
+3
-6
@@ -1,14 +1,11 @@
|
||||
# Debugging with VS Code
|
||||
|
||||
This `launch.json.template` file provides various debug configurations for the Dify project within VS Code / Cursor. To use these configurations, you should copy the contents of this file into a new file named `launch.json` in the same `.vscode` directory.
|
||||
[`launch.json.template`](launch.json.template) provides API and Celery worker debug configurations for VS Code / Cursor. Both use `api/.venv/bin/python`; complete the [backend setup](../api/README.md) first.
|
||||
|
||||
## How to Use
|
||||
|
||||
1. **Create `launch.json`**: If you don't have one, create a file named `launch.json` inside the `.vscode` directory.
|
||||
1. **Copy Content**: Copy the entire content from `launch.json.template` into your newly created `launch.json` file.
|
||||
1. Copy `.vscode/launch.json.template` to `.vscode/launch.json`, or merge the configurations into an existing file.
|
||||
1. **Select Debug Configuration**: Go to the Run and Debug view in VS Code / Cursor (Ctrl+Shift+D or Cmd+Shift+D).
|
||||
1. **Start Debugging**: Select the desired configuration from the dropdown menu and click the green play button.
|
||||
|
||||
## Tips
|
||||
|
||||
- If you need to debug with Edge browser instead of Chrome, modify the `serverReadyAction` configuration in the "Next.js: debug full stack" section, change `"debugWithChrome"` to `"debugWithEdge"` to use Microsoft Edge for debugging.
|
||||
Start the frontend separately using the [frontend guide](../web/README.md).
|
||||
|
||||
+3
-14
@@ -81,24 +81,13 @@ AI tools are welcome, but you are responsible for understanding and verifying ev
|
||||
|
||||
#### Frontend
|
||||
|
||||
For setting up the frontend service, please refer to our comprehensive [guide](https://github.com/langgenius/dify/blob/main/web/README.md) in the `web/README.md` file. This document provides detailed instructions to help you set up the frontend environment properly.
|
||||
For setting up the frontend service, please refer to our comprehensive [guide](web/README.md) in the `web/README.md` file. This document provides detailed instructions to help you set up the frontend environment properly.
|
||||
|
||||
**Testing**: Add focused tests when a change affects observable behavior or carries meaningful regression risk. See [web/docs/test.md](https://github.com/langgenius/dify/blob/main/web/docs/test.md) for the canonical frontend testing guidelines.
|
||||
**Testing**: Add focused tests when a change affects observable behavior or carries meaningful regression risk. See [web/docs/test.md](web/docs/test.md) for the canonical frontend testing guidelines.
|
||||
|
||||
#### Backend
|
||||
|
||||
For setting up the backend service, kindly refer to our detailed [instructions](https://github.com/langgenius/dify/blob/main/api/README.md) in the `api/README.md` file. This document contains step-by-step guidance to help you get the backend up and running smoothly.
|
||||
|
||||
#### Other things to note
|
||||
|
||||
We recommend reviewing this document carefully before proceeding with the setup, as it contains essential information about:
|
||||
|
||||
- Prerequisites and dependencies
|
||||
- Installation steps
|
||||
- Configuration details
|
||||
- Common troubleshooting tips
|
||||
|
||||
Feel free to reach out if you encounter any issues during the setup process.
|
||||
For setting up the backend service, kindly refer to our detailed [instructions](api/README.md) in the `api/README.md` file. This document contains step-by-step guidance to help you get the backend up and running smoothly.
|
||||
|
||||
## Getting Help
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ docker compose up -d
|
||||
|
||||
After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization process.
|
||||
|
||||
#### Seeking help
|
||||
### Seeking help
|
||||
|
||||
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.
|
||||
|
||||
@@ -116,7 +116,7 @@ All of Dify's offerings come with corresponding APIs, so you could effortlessly
|
||||
## Using Dify
|
||||
|
||||
- **Cloud <br/>**
|
||||
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. If you run into issues with Dify Cloud, [contact our Cloud support team](mailto:cloud@dify.ai?subject=%5BGitHub%5DDify%20Cloud%20Support).
|
||||
We host [Dify Cloud](https://cloud.dify.ai) so you can try Dify without managing a server. See the [pricing page](https://dify.ai/pricing) for current plans and usage allowances. If you run into issues, [contact our Cloud support team](mailto:cloud@dify.ai?subject=%5BGitHub%5DDify%20Cloud%20Support).
|
||||
|
||||
- **Self-hosting Dify Community Edition<br/>**
|
||||
Quickly get Dify running in your environment with this [starter guide](#quick-start).
|
||||
@@ -171,7 +171,7 @@ Choose the channel that best fits your question:
|
||||
|
||||
## Security disclosure
|
||||
|
||||
To protect your privacy, please avoid posting security issues on GitHub. Instead, report issues to security@dify.ai, and our team will respond with detailed answer.
|
||||
Report vulnerabilities privately through GitHub Security Advisories, following our [security policy](SECURITY.md). Do not disclose them in public issues, discussions, or pull requests.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+29
-53
@@ -2,19 +2,11 @@
|
||||
|
||||
## Setup and Run
|
||||
|
||||
> [!IMPORTANT]
|
||||
>
|
||||
> In the v1.3.0 release, `poetry` has been replaced with
|
||||
> [`uv`](https://docs.astral.sh/uv/) as the package manager
|
||||
> for Dify API backend service.
|
||||
|
||||
`uv` and `pnpm` are required to run the setup and development commands below.
|
||||
[`uv`](https://docs.astral.sh/uv/), Docker Compose, and the Node.js and pnpm versions pinned in the root `package.json` are required. Run the commands below from the repository root, with each long-running service in its own terminal.
|
||||
|
||||
### Using scripts (recommended)
|
||||
|
||||
The scripts resolve paths relative to their location, so you can run them from anywhere.
|
||||
|
||||
1. Run setup (copies env files and installs dependencies).
|
||||
1. Run setup for a new checkout (copies env files and installs dependencies). This overwrites `api/.env`, `web/.env.local`, and `docker/middleware.env`; preserve existing configuration before rerunning it.
|
||||
|
||||
```bash
|
||||
./dev/setup
|
||||
@@ -44,7 +36,7 @@ The scripts resolve paths relative to their location, so you can run them from a
|
||||
|
||||
1. Set up your application by visiting `http://localhost:3000`.
|
||||
|
||||
1. Start the worker service (async and scheduler tasks, runs from `api`).
|
||||
1. Start the worker service (executes queued async tasks).
|
||||
|
||||
```bash
|
||||
./dev/start-worker
|
||||
@@ -62,51 +54,35 @@ The scripts resolve paths relative to their location, so you can run them from a
|
||||
>
|
||||
> When the frontend and backend run on different subdomains, set COOKIE_DOMAIN to the site’s top-level domain (e.g., `example.com`). The frontend and backend must be under the same top-level domain in order to share authentication cookies.
|
||||
|
||||
- Generate a `SECRET_KEY` in the `.env` file.
|
||||
|
||||
bash for Linux
|
||||
|
||||
```bash
|
||||
sed -i "/^SECRET_KEY=/c\\SECRET_KEY=$(openssl rand -base64 42)" .env
|
||||
```
|
||||
|
||||
bash for Mac
|
||||
|
||||
```bash
|
||||
secret_key=$(openssl rand -base64 42)
|
||||
sed -i '' "/^SECRET_KEY=/c\\
|
||||
SECRET_KEY=${secret_key}" .env
|
||||
```
|
||||
Leave `SECRET_KEY` empty to let Dify generate a persistent key in the storage directory. To manage it explicitly, generate a value with `openssl rand -base64 42` and set `SECRET_KEY` in `api/.env`.
|
||||
|
||||
## Testing
|
||||
|
||||
1. Install dependencies for both the backend and the test environment
|
||||
Run from the repository root:
|
||||
|
||||
```bash
|
||||
cd api
|
||||
uv sync --group dev
|
||||
```
|
||||
|
||||
1. Run the tests locally with mocked system environment variables in `tool.pytest_env` section in `pyproject.toml`, more can check [AGENTS.md](../AGENTS.md)
|
||||
|
||||
Continue in the `api` directory from the previous step.
|
||||
|
||||
```bash
|
||||
uv run pytest # Run all tests
|
||||
uv run pytest tests/unit_tests/ # Unit tests only
|
||||
uv run pytest tests/integration_tests/ # Integration tests
|
||||
|
||||
# Code quality
|
||||
../dev/reformat # Run all formatters and linters
|
||||
uv run ruff check --fix ./ # Fix linting issues
|
||||
uv run ruff format ./ # Format code
|
||||
uv run pyrefly check # Type checking
|
||||
```
|
||||
|
||||
## Generate TS stub
|
||||
|
||||
```
|
||||
uv run dev/generate_swagger_specs.py --output-dir openapi
|
||||
```bash
|
||||
uv sync --project api --group dev
|
||||
make test
|
||||
make test TARGET_TESTS=./api/tests/unit_tests/<path>
|
||||
make lint
|
||||
make type-check
|
||||
```
|
||||
|
||||
use https://jsontotable.org/openapi-to-typescript to convert to typescript
|
||||
`make test` includes provider unit tests and runs controller tests separately. Integration suites are CI-only and are not expected to run locally. Test environment defaults live in `api/pyproject.toml` under `tool.pytest_env`; see the backend [agent guide](AGENTS.md) for package conventions.
|
||||
|
||||
## API contracts
|
||||
|
||||
The [API schema guide](controllers/API_SCHEMA_GUIDE.md) owns schema changes and verification. Generate the OpenAPI specifications and TypeScript/Zod contracts through the workspace script:
|
||||
|
||||
```bash
|
||||
pnpm -C packages/contracts gen-api-contract
|
||||
```
|
||||
|
||||
Refresh the checked-in Markdown reference with:
|
||||
|
||||
```bash
|
||||
uv run --project api python api/dev/generate_swagger_markdown_docs.py \
|
||||
--swagger-dir packages/contracts/openapi --markdown-dir api/openapi/markdown --keep-swagger-json
|
||||
```
|
||||
|
||||
Update the backend schema owner and regenerate contracts instead of converting types manually or editing generated files.
|
||||
|
||||
@@ -10,6 +10,7 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
@@ -187,6 +188,23 @@ def _patch_wildcard_media_type_markdown(markdown: str) -> str:
|
||||
return markdown.replace("***/***", "`*/*`")
|
||||
|
||||
|
||||
def _patch_request_body_markdown(markdown: str) -> str:
|
||||
"""Collapse swagger-markdown 3.0.0's repeated cells for multi-content request bodies.
|
||||
|
||||
Its request-body renderer appends the same mutable Schema cell for every
|
||||
content type, so every extra column repeats the complete set of media types.
|
||||
Only repair that exact shape; preserve distinct cells and other tables.
|
||||
"""
|
||||
lines = markdown.splitlines()
|
||||
for index, line in enumerate(lines):
|
||||
if index < 2 or lines[index - 2].strip() != "| Required | Schema |":
|
||||
continue
|
||||
cells = [cell.strip() for cell in re.split(r"(?<!\\)\|", line.strip().strip("|"))]
|
||||
if len(cells) > 2 and cells[0] in {"Yes", "No"} and len(set(cells[1:])) == 1:
|
||||
lines[index] = f"| {cells[0]} | {cells[1]} |"
|
||||
return "\n".join(lines) + ("\n" if markdown.endswith("\n") else "")
|
||||
|
||||
|
||||
def _drop_null_values_for_markdown(value: object) -> object:
|
||||
"""Remove null object members only from the converter's temporary input."""
|
||||
|
||||
@@ -238,6 +256,7 @@ def _convert_spec_to_markdown(spec_path: Path, markdown_path: Path) -> None:
|
||||
spec_path,
|
||||
)
|
||||
converted_markdown = _patch_wildcard_media_type_markdown(converted_markdown)
|
||||
converted_markdown = _patch_request_body_markdown(converted_markdown)
|
||||
converted_markdown = _strip_trailing_line_whitespace(converted_markdown)
|
||||
if not converted_markdown.strip():
|
||||
raise RuntimeError(f"swagger-markdown wrote an empty document for {markdown_path}")
|
||||
|
||||
@@ -22,10 +22,8 @@ on its `generated-stats` branch. Metadata records the source runs. No timing dat
|
||||
or generated history is committed to Dify itself.
|
||||
|
||||
Every PR, including fork PRs, downloads that same public baseline without a token.
|
||||
Unmerged PR observations do not update the shared baseline automatically. The
|
||||
initial baseline is explicitly marked as a bootstrap from validated CI on #42593;
|
||||
automatic updates use merged PRs only. Keeping the producer in the statistics
|
||||
repository avoids needing a cross-repository write token in Dify or additional
|
||||
Unmerged PR observations do not update the shared baseline automatically.
|
||||
Keeping the producer in the statistics repository avoids needing a cross-repository write token in Dify or additional
|
||||
main-branch test runs.
|
||||
|
||||
A single planning job downloads the baseline once and publishes both the input
|
||||
|
||||
@@ -1544,7 +1544,7 @@ Create a new application
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [AppImportPayload](#appimportpayload)<br>**multipart/form-data**: { **"app_id"**: string, **"description"**: string, **"file"**: binary, **"icon"**: string, **"icon_background"**: string, **"icon_type"**: string, **"name"**: string }<br> | **application/json**: [AppImportPayload](#appimportpayload)<br>**multipart/form-data**: { **"app_id"**: string, **"description"**: string, **"file"**: binary, **"icon"**: string, **"icon_background"**: string, **"icon_type"**: string, **"name"**: string }<br> |
|
||||
| Yes | **application/json**: [AppImportPayload](#appimportpayload)<br>**multipart/form-data**: { **"app_id"**: string, **"description"**: string, **"file"**: binary, **"icon"**: string, **"icon_background"**: string, **"icon_type"**: string, **"name"**: string }<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ Machine-readable catalog of every op on this surface
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br>**multipart/form-data**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br> | **application/json**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br>**multipart/form-data**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br> |
|
||||
| Yes | **application/json**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br>**multipart/form-data**: [AdvancedChatRunPayload](#advancedchatrunpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -150,7 +150,7 @@ Machine-readable catalog of every op on this surface
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [ChatRunPayload](#chatrunpayload)<br>**multipart/form-data**: [ChatRunPayload](#chatrunpayload)<br> | **application/json**: [ChatRunPayload](#chatrunpayload)<br>**multipart/form-data**: [ChatRunPayload](#chatrunpayload)<br> |
|
||||
| Yes | **application/json**: [ChatRunPayload](#chatrunpayload)<br>**multipart/form-data**: [ChatRunPayload](#chatrunpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -171,7 +171,7 @@ Machine-readable catalog of every op on this surface
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [CompletionRunPayload](#completionrunpayload)<br>**multipart/form-data**: [CompletionRunPayload](#completionrunpayload)<br> | **application/json**: [CompletionRunPayload](#completionrunpayload)<br>**multipart/form-data**: [CompletionRunPayload](#completionrunpayload)<br> |
|
||||
| Yes | **application/json**: [CompletionRunPayload](#completionrunpayload)<br>**multipart/form-data**: [CompletionRunPayload](#completionrunpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -266,7 +266,7 @@ Upload a file to use as an input variable when running the app
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br>**multipart/form-data**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br> | **application/json**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br>**multipart/form-data**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br> |
|
||||
| Yes | **application/json**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br>**multipart/form-data**: [OpenApiFormSubmitPayload](#openapiformsubmitpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -320,7 +320,7 @@ Upload a file to use as an input variable when running the app
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)<br>**multipart/form-data**: [WorkflowRunPayload](#workflowrunpayload)<br> | **application/json**: [WorkflowRunPayload](#workflowrunpayload)<br>**multipart/form-data**: [WorkflowRunPayload](#workflowrunpayload)<br> |
|
||||
| Yes | **application/json**: [WorkflowRunPayload](#workflowrunpayload)<br>**multipart/form-data**: [WorkflowRunPayload](#workflowrunpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ Each backend usually follows:
|
||||
- `api/providers/vdb/<backend>/pyproject.toml` — project name `dify-vdb-<backend>`, dependencies, entry points.
|
||||
- `api/providers/vdb/<backend>/src/dify_vdb_<python_package>/` — implementation (e.g. `PGVector`, `PGVectorFactory`).
|
||||
|
||||
See `vdb/pgvector/` as a reference implementation.
|
||||
See [`vdb-pgvector/`](vdb-pgvector/) as a reference implementation.
|
||||
|
||||
### Wiring a new backend into the API workspace
|
||||
|
||||
@@ -55,4 +55,4 @@ The API uses a **uv workspace** (`api/pyproject.toml`):
|
||||
|
||||
1. **`[tool.uv.workspace]`** — `members = ["providers/vdb/*"]` already includes every subdirectory under `vdb/`; new folders there are workspace members.
|
||||
2. **`[tool.uv.sources]`** — add a line for your package: `dify-vdb-mine = { workspace = true }`.
|
||||
3. **`[project.optional-dependencies]`** — add a group such as `vdb-mine = ["dify-vdb-mine"]`, and list `dify-vdb-mine` under `vdb-all` if it should install with the default bundle.
|
||||
3. **`[dependency-groups]`** — add a group such as `vdb-mine = ["dify-vdb-mine"]`, and list `dify-vdb-mine` under `vdb-all` if it should install with the default bundle.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Clickzetta Integration Tests
|
||||
|
||||
## Running Tests
|
||||
## CI Integration Tests
|
||||
|
||||
To run the Clickzetta integration tests, you need to set the following environment variables:
|
||||
Integration tests run in CI with a dedicated Clickzetta test instance. Configure these environment variables in that environment:
|
||||
|
||||
```bash
|
||||
export CLICKZETTA_USERNAME=your_username
|
||||
@@ -14,12 +14,18 @@ export CLICKZETTA_VCLUSTER=your_vcluster
|
||||
export CLICKZETTA_SCHEMA=dify
|
||||
```
|
||||
|
||||
Then run the tests:
|
||||
The CI invocation from the repository root is:
|
||||
|
||||
```bash
|
||||
pytest api/tests/integration_tests/vdb/clickzetta/
|
||||
uv run --project api pytest api/providers/vdb/vdb-clickzetta/tests/integration_tests/
|
||||
```
|
||||
|
||||
## Security Note
|
||||
For local verification, run the provider unit tests:
|
||||
|
||||
```bash
|
||||
uv run --project api pytest api/providers/vdb/vdb-clickzetta/tests/unit_tests/
|
||||
```
|
||||
|
||||
## Credentials
|
||||
|
||||
Never commit credentials to the repository. Always use environment variables or secure credential management systems.
|
||||
|
||||
@@ -403,7 +403,11 @@ def test_patch_union_schema_markdown_ignores_unrenderable_shapes(tmp_path: Path)
|
||||
assert module._patch_union_schema_markdown("#### BrokenUnion\n", spec_path) == "#### BrokenUnion\n"
|
||||
|
||||
|
||||
def test_convert_spec_to_markdown_patches_generated_union_tables(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
||||
@pytest.mark.parametrize("required", ["Yes", "No"])
|
||||
@pytest.mark.parametrize("content_count", [1, 2, 3])
|
||||
def test_convert_spec_to_markdown_patches_generated_union_tables(
|
||||
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, required: str, content_count: int
|
||||
):
|
||||
module = _load_generate_swagger_markdown_docs_module()
|
||||
spec_path = tmp_path / "console-openapi.json"
|
||||
output_path = tmp_path / "console-openapi.md"
|
||||
@@ -435,6 +439,9 @@ def test_convert_spec_to_markdown_patches_generated_union_tables(tmp_path: Path,
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
media_types = ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"][:content_count]
|
||||
body_schema = "".join(f"**{media_type}**: string, enum: a\\|b<br>" for media_type in media_types)
|
||||
|
||||
def run_converter(args, **kwargs):
|
||||
assert kwargs["check"] is False
|
||||
converter_spec_path = Path(args[args.index("-i") + 1])
|
||||
@@ -462,7 +469,11 @@ def test_convert_spec_to_markdown_patches_generated_union_tables(tmp_path: Path,
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| default | | | No |
|
||||
""",
|
||||
"""
|
||||
+ "\n#### Request Body\n\n| Required | Schema |\n| -------- | ------ |\n"
|
||||
+ f"| {required} | "
|
||||
+ " | ".join([body_schema] * content_count)
|
||||
+ " |\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
return module.subprocess.CompletedProcess(args=args, returncode=0, stdout="", stderr="")
|
||||
@@ -476,3 +487,18 @@ def test_convert_spec_to_markdown_patches_generated_union_tables(tmp_path: Path,
|
||||
assert "Intro line\n" in converted
|
||||
assert "| FormInputConfig | [ParagraphInputConfig](#paragraphinputconfig) | | |" in converted
|
||||
assert "| default | [StringSource](#stringsource) | | No |" in converted
|
||||
body_row = converted.split("| -------- | ------ |\n", 1)[1].strip()
|
||||
assert [cell.strip() for cell in body_row.strip("|").split(" | ")] == [required, body_schema]
|
||||
|
||||
|
||||
def test_request_body_patch_preserves_distinct_cells_and_other_tables():
|
||||
module = _load_generate_swagger_markdown_docs_module()
|
||||
markdown = """| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | first | second |
|
||||
|
||||
| Name | Schema | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| Yes | same | same |
|
||||
"""
|
||||
assert module._patch_request_body_markdown(markdown) == markdown
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# AGENTS.md — difyctl (TypeScript CLI)
|
||||
|
||||
This package is the Node 24+, ESM TypeScript implementation of `difyctl`. Development also requires the Bun version pinned in `.bun-version`; command-tree generation and the `dev`, `test`, and `build` pre-scripts invoke it. Read [`ARD.md`] before adding a command or changing shared CLI infrastructure. Read `src/commands/AGENTS.md` for command-folder and registry rules.
|
||||
This package is the ESM TypeScript implementation of `difyctl`. Use the Node.js version pinned in `package.json`. Development also requires the Bun version pinned in `.bun-version`; command-tree generation and the `dev`, `test`, and `build` pre-scripts invoke it. Read [`ARD.md`] before adding a command or changing shared CLI infrastructure. Read `src/commands/AGENTS.md` for command-folder and registry rules.
|
||||
|
||||
## Architecture Boundaries
|
||||
|
||||
|
||||
+9
-95
@@ -1,20 +1,8 @@
|
||||
## README for docker Deployment
|
||||
# Docker deployment
|
||||
|
||||
Welcome to the new `docker` directory for deploying Dify using Docker Compose. This README outlines the updates, deployment instructions, and migration details for existing users.
|
||||
Run Dify with Docker Compose. Configuration templates live in `.env.example` and `envs/`; local overrides belong in `.env`.
|
||||
|
||||
### What's Updated
|
||||
|
||||
- **Certbot Container**: `docker-compose.yaml` now contains `certbot` for managing SSL certificates. This container automatically renews certificates and ensures secure HTTPS connections.\
|
||||
For more information, refer to `docker/certbot/README.md`.
|
||||
|
||||
- **Persistent Environment Variables**: Essential startup defaults are provided in `.env.example`, while local values are stored in `.env`, ensuring that your configurations persist across deployments.
|
||||
|
||||
> What is `.env`? </br> </br>
|
||||
> The `.env` file is the local startup file. Copy it from `.env.example` for a default deployment. Optional advanced settings live in `envs/*.env.example` files.
|
||||
|
||||
- **Unified Vector Database Services**: All vector database services are now managed from a single Docker Compose file `docker-compose.yaml`. You can switch between different vector databases by setting the `VECTOR_STORE` environment variable in your `.env` file.
|
||||
|
||||
### How to Deploy Dify with `docker-compose.yaml`
|
||||
## How to Deploy Dify with `docker-compose.yaml`
|
||||
|
||||
1. **Prerequisites**: Ensure Docker and Docker Compose v2.24.0 or later are installed on your system.
|
||||
2. **Environment Setup**:
|
||||
@@ -33,12 +21,12 @@ Welcome to the new `docker` directory for deploying Dify using Docker Compose. T
|
||||
```
|
||||
|
||||
4. **SSL Certificate Setup**:
|
||||
- Refer to `docker/certbot/README.md` to set up SSL certificates using Certbot.
|
||||
- Refer to [the Certbot guide](certbot/README.md) to set up SSL certificates using Certbot.
|
||||
5. **OpenTelemetry Collector Setup**:
|
||||
- Copy `envs/core-services/shared.env.example` to `envs/core-services/shared.env`.
|
||||
- Set `ENABLE_OTEL=true` and configure `OTLP_BASE_ENDPOINT`. Tune the other `OTEL_*` knobs in the same file if needed.
|
||||
|
||||
### How to Deploy Middleware for Developing Dify
|
||||
## How to Deploy Middleware for Developing Dify
|
||||
|
||||
1. **Middleware Setup**:
|
||||
- Use the `docker-compose.middleware.yaml` for setting up essential middleware services like databases and caches.
|
||||
@@ -50,17 +38,7 @@ Welcome to the new `docker` directory for deploying Dify using Docker Compose. T
|
||||
|
||||
> Compose automatically loads `COMPOSE_PROFILES=${DB_TYPE:-postgresql},weaviate` from `middleware.env`, so no extra `--profile` flags are needed. Adjust variables in `middleware.env` if you want a different combination of services.
|
||||
|
||||
### Migration for Existing Users
|
||||
|
||||
For users migrating from the `docker-legacy` setup:
|
||||
|
||||
1. **Review Changes**: Familiarize yourself with the new `.env` configuration and Docker Compose setup.
|
||||
2. **Transfer Customizations**:
|
||||
- If you have customized configurations such as `docker-compose.yaml`, `ssrf_proxy/squid.conf`, or `nginx/conf.d/default.conf`, you will need to reflect these changes in the `.env` file you create.
|
||||
3. **Data Migration**:
|
||||
- Ensure that data from services like databases and caches is backed up and migrated appropriately to the new structure if necessary.
|
||||
|
||||
### Overview of `.env`, `.env.example`, and `envs/`
|
||||
## Overview of `.env`, `.env.example`, and `envs/`
|
||||
|
||||
- `.env.example` contains the essential default configuration for Docker Compose deployments.
|
||||
- `.env` contains local startup values copied from `.env.example` and any local changes.
|
||||
@@ -71,66 +49,9 @@ Do not add optional, advanced, provider-specific, or service-specific variables
|
||||
|
||||
Docker Compose reads `envs/*.env` files when present, then reads `.env` last so values in `.env` take precedence.
|
||||
|
||||
#### Key Modules and Customization
|
||||
For the available variables and defaults, read the matching `envs/**/*.env.example` template and its service in `docker-compose.yaml`.
|
||||
|
||||
- **Vector Database Services**: Depending on the type of vector database used (`VECTOR_STORE`), users can set specific endpoints, ports, and authentication details.
|
||||
- **Storage Services**: Depending on the storage type (`STORAGE_TYPE`), users can configure specific settings for S3, Azure Blob, Google Storage, etc.
|
||||
- **API and Web Services**: Users can define URLs and other settings that affect how the API and web frontend operate.
|
||||
|
||||
#### Other notable variables
|
||||
|
||||
The root `.env.example` file contains the essential startup settings. Optional and provider-specific settings are grouped in `envs/*.env.example` files. Here are some of the key sections and variables:
|
||||
|
||||
1. **Common Variables**:
|
||||
|
||||
- `CONSOLE_API_URL`, `CONSOLE_WEB_URL`, `SERVICE_API_URL`, `APP_API_URL`, `APP_WEB_URL`: public URLs for the API and frontend services.
|
||||
- `SERVER_CONSOLE_API_URL`: internal API origin used by web server-side requests and, when `INTERNAL_FILES_URL` is unset, as the default fallback for API-side internal file URL generation. Keep the default `http://api:5001` for standard Docker Compose deployments, and only change it when services must reach the API through a different internal address.
|
||||
- `FILES_URL`, `INTERNAL_FILES_URL`: Public and internal base URLs for file downloads and previews.
|
||||
- `ENDPOINT_URL_TEMPLATE`, `NEXT_PUBLIC_SOCKET_URL`, `TRIGGER_URL`: Additional service URLs.
|
||||
|
||||
See `.env.example` for the full list.
|
||||
|
||||
2. **Server Configuration**:
|
||||
|
||||
- `LOG_LEVEL`, `DEBUG`, `FLASK_DEBUG`: Logging and debug settings.
|
||||
- `SECRET_KEY`: A key for signing sessions, JWTs, and file URLs. Leave it empty to let Dify generate a persistent key in the storage directory, or set a unique value yourself.
|
||||
|
||||
3. **Database Configuration**:
|
||||
|
||||
- `DB_USERNAME`, `DB_PASSWORD`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`: PostgreSQL database credentials and connection details.
|
||||
|
||||
4. **Redis Configuration**:
|
||||
|
||||
- `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD`: Redis server connection settings.
|
||||
- `REDIS_KEY_PREFIX`: Optional global namespace prefix for Redis keys, topics, streams, and Celery Redis transport artifacts.
|
||||
|
||||
5. **Celery Configuration**:
|
||||
|
||||
- `CELERY_BROKER_URL`: Configuration for Celery message broker.
|
||||
|
||||
6. **Storage Configuration**:
|
||||
|
||||
- `STORAGE_TYPE`, `OPENDAL_SCHEME`, `OPENDAL_FS_ROOT`: Default local file storage settings. Optional storage backends are configured from the files under `envs/`.
|
||||
|
||||
7. **Vector Database Configuration**:
|
||||
|
||||
- `VECTOR_STORE`: Type of vector database (e.g., `weaviate`, `milvus`). See `envs/vectorstores/` for the full list of supported options.
|
||||
- Specific settings for each vector store like `WEAVIATE_ENDPOINT`, `MILVUS_URI`.
|
||||
|
||||
8. **CORS Configuration**:
|
||||
|
||||
- `WEB_API_CORS_ALLOW_ORIGINS`, `CONSOLE_CORS_ALLOW_ORIGINS`: Settings for cross-origin resource sharing.
|
||||
|
||||
9. **OpenTelemetry Configuration**:
|
||||
|
||||
- `ENABLE_OTEL`: Enable OpenTelemetry collector in api.
|
||||
- `OTLP_BASE_ENDPOINT`: Endpoint for your OTLP exporter.
|
||||
|
||||
10. **Other Service-Specific Environment Variables**:
|
||||
|
||||
- Each service like `nginx`, `redis`, `db`, and vector databases have specific environment variables that are directly referenced in the `docker-compose.yaml`.
|
||||
|
||||
### Environment Variables Synchronization
|
||||
## Environment Variables Synchronization
|
||||
|
||||
When upgrading Dify or pulling the latest changes, new environment variables may be introduced in `.env.example` only when they are required for startup,
|
||||
or in the optional files under `envs/` for advanced, provider-specific, and service-specific settings.
|
||||
@@ -142,7 +63,7 @@ If you maintain a customized `.env` file copied from `.env.example`, an optional
|
||||
> This tool performs a **one-way synchronization** from `.env.example` to `.env`.
|
||||
> Existing values in `.env` are never overwritten automatically.
|
||||
|
||||
#### `dify-env-sync.sh` (Optional)
|
||||
### `dify-env-sync.sh` (Optional)
|
||||
|
||||
This script compares your current `.env` file with the latest `.env.example` template and helps safely apply new or updated environment variables.
|
||||
|
||||
@@ -173,10 +94,3 @@ chmod +x dify-env-sync.sh
|
||||
# Run the synchronization
|
||||
./dify-env-sync.sh
|
||||
```
|
||||
|
||||
### Additional Information
|
||||
|
||||
- **Continuous Improvement Phase**: We are actively seeking feedback from the community to refine and enhance the deployment process. As more users adopt this new method, we will continue to make improvements based on your experiences and suggestions.
|
||||
- **Support**: For detailed configuration options and environment variable settings, refer to the `.env.example` file and the Docker Compose configuration files in the `docker` directory.
|
||||
|
||||
This README aims to guide you through the deployment process using the new Docker Compose setup. For any issues or further assistance, please refer to the official documentation or contact support.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# Launching new servers with SSL certificates
|
||||
|
||||
## Short description
|
||||
|
||||
docker compose certbot configurations with Backward compatibility (without certbot container).\
|
||||
Use `docker compose --profile certbot up` to use this features.
|
||||
Run the following commands from `docker/`. The optional `certbot` profile obtains and renews certificates when you invoke its update script; it does not schedule renewals automatically.
|
||||
|
||||
## The simplest way for launching new servers with SSL certificates
|
||||
|
||||
@@ -18,7 +15,6 @@ Use `docker compose --profile certbot up` to use this features.
|
||||
```
|
||||
execute command:
|
||||
```shell
|
||||
docker network prune
|
||||
docker compose --profile certbot up --force-recreate -d
|
||||
```
|
||||
then after the containers launched:
|
||||
@@ -34,7 +30,7 @@ Use `docker compose --profile certbot up` to use this features.
|
||||
```shell
|
||||
docker compose --profile certbot up -d --no-deps --force-recreate nginx
|
||||
```
|
||||
Then you can access your serve with HTTPS.\
|
||||
Then you can access your server with HTTPS.\
|
||||
[https://your_domain.com](https://your_domain.com)
|
||||
|
||||
## SSL certificates renewal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# الإعداد المتقدم
|
||||
|
||||
إذا كنت بحاجة إلى تخصيص الإعدادات، فيرجى الرجوع إلى التعليقات في ملف [.env.example](../../docker/.env.example) وتحديث القيم المقابلة في ملف `.env`. بالإضافة إلى ذلك، قد تحتاج إلى إجراء تعديلات على ملف `docker-compose.yaml` نفسه، مثل تغيير إصدارات الصور أو تعيينات المنافذ أو نقاط تحميل وحدات التخزين، بناءً على بيئة النشر ومتطلباتك الخاصة. بعد إجراء أي تغييرات، يرجى إعادة تشغيل `docker-compose up -d`. يمكنك العثور على قائمة كاملة بمتغيرات البيئة المتاحة [هنا](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
||||
اضبط الإعدادات المحلية في `docker/.env`. يحتوي [`.env.example`](../../docker/.env.example) على القيم اللازمة للنشر الافتراضي فقط، وتوجد الإعدادات الاختيارية والخاصة بالخدمات في [`docker/envs/`](../../docker/envs/). انسخ القوالب المطلوبة دون اللاحقة `.example`. تكون الأولوية لقيم `.env`. بعد التعديل، شغّل `docker compose up -d` من `docker/`. راجع [دليل Docker](../../docker/README.md).
|
||||
|
||||
## مراقبة المقاييس باستخدام Grafana
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
## استخدام Dify
|
||||
|
||||
- **سحابة </br>**
|
||||
نحن نستضيف [خدمة Dify Cloud](https://dify.ai) لأي شخص لتجربتها بدون أي إعدادات. توفر كل قدرات النسخة التي تمت استضافتها ذاتيًا، وتتضمن 200 أمر GPT-4 مجانًا في خطة الصندوق الرملي.
|
||||
جرّب [Dify Cloud](https://cloud.dify.ai) دون إدارة خادم. راجع [صفحة الأسعار](https://dify.ai/pricing) للاطلاع على الخطط وحصص الاستخدام الحالية.
|
||||
|
||||
- **استضافة ذاتية لنسخة المجتمع Dify</br>**
|
||||
ابدأ سريعًا في تشغيل Dify في بيئتك باستخدام \[دليل البدء السريع\](#البدء السريع).
|
||||
@@ -152,7 +152,7 @@ docker compose up -d
|
||||
|
||||
## الكشف عن الأمان
|
||||
|
||||
لحماية خصوصيتك، يرجى تجنب نشر مشكلات الأمان على GitHub. بدلاً من ذلك، أرسل أسئلتك إلى <security@dify.ai> وسنقدم لك إجابة أكثر تفصيلاً.
|
||||
أبلغ عن الثغرات بشكل خاص عبر GitHub Security Advisories وفقًا [لسياسة الأمان](../../SECURITY.md). لا تفصح عنها في المشكلات أو المناقشات أو طلبات السحب العامة.
|
||||
|
||||
## الرخصة
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# উন্নত সেটআপ
|
||||
|
||||
যদি আপনার কনফিগারেশনটি কাস্টমাইজ করার প্রয়োজন হয়, তাহলে অনুগ্রহ করে আমাদের [.env.example](../../docker/.env.example) ফাইল দেখুন এবং আপনার `.env` ফাইলে সংশ্লিষ্ট মানগুলি আপডেট করুন। এছাড়াও, আপনার নির্দিষ্ট এনভায়রনমেন্ট এবং প্রয়োজনীয়তার উপর ভিত্তি করে আপনাকে `docker-compose.yaml` ফাইলে সমন্বয় করতে হতে পারে, যেমন ইমেজ ভার্সন পরিবর্তন করা, পোর্ট ম্যাপিং করা, অথবা ভলিউম মাউন্ট করা।
|
||||
যেকোনো পরিবর্তন করার পর, অনুগ্রহ করে `docker-compose up -d` পুনরায় চালান। ভেরিয়েবলের সম্পূর্ণ তালিকা [এখানে] (https://docs.dify.ai/getting-started/install-self-hosted/environments) খুঁজে পেতে পারেন।
|
||||
স্থানীয় সেটিংস `docker/.env`-এ পরিবর্তন করুন। [`.env.example`](../../docker/.env.example)-এ ডিফল্ট ডেপ্লয়মেন্টের প্রয়োজনীয় মান থাকে; ঐচ্ছিক ও পরিষেবা-নির্দিষ্ট সেটিংস [`docker/envs/`](../../docker/envs/)-এ রয়েছে। প্রয়োজনীয় টেমপ্লেটের `.example` প্রত্যয় বাদ দিয়ে কপি করুন। `.env`-এর মান অগ্রাধিকার পায়। পরিবর্তনের পরে `docker/` থেকে `docker compose up -d` চালান। [Docker নির্দেশিকা](../../docker/README.md) দেখুন।
|
||||
|
||||
## Grafana দিয়ে মেট্রিক্স মনিটরিং
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ docker compose up -d
|
||||
|
||||
চালানোর পর, আপনি আপনার ব্রাউজারে [http://localhost/install](http://localhost/install)-এ ডিফাই ড্যাশবোর্ডে অ্যাক্সেস করতে পারেন এবং ইনিশিয়ালাইজেশন প্রক্রিয়া শুরু করতে পারেন।
|
||||
|
||||
#### সাহায্যের খোঁজে
|
||||
### সাহায্যের খোঁজে
|
||||
|
||||
ডিফাই সেট আপ করতে সমস্যা হলে দয়া করে আমাদের [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) দেখুন। যদি তবুও সমস্যা থেকে থাকে, তাহলে [কমিউনিটি এবং আমাদের](#কমিউনিটি-এবং-যোগাযোগ) সাথে যোগাযোগ করুন।
|
||||
|
||||
@@ -120,7 +120,7 @@ LLM ফাংশন কলিং বা ReAct উপর ভিত্তি ক
|
||||
## ডিফাই-এর ব্যবহার
|
||||
|
||||
- **ক্লাউড </br>**
|
||||
জিরো সেটাপে ব্যবহার করতে আমাদের [Dify Cloud](https://dify.ai) সার্ভিসটি ব্যবহার করতে পারেন। এখানে সেল্ফহোস্টিং-এর সকল ফিচার ও ক্যাপাবিলিটিসহ স্যান্ডবক্সে ২০০ জিপিটি-৪ কল ফ্রি পাবেন।
|
||||
সার্ভার পরিচালনা ছাড়াই [Dify Cloud](https://cloud.dify.ai)-এ Dify ব্যবহার করে দেখুন। বর্তমান প্ল্যান ও ব্যবহারের সীমা জানতে [মূল্যতালিকা](https://dify.ai/pricing) দেখুন।
|
||||
|
||||
- **সেল্ফহোস্টিং ডিফাই কমিউনিটি সংস্করণ</br>**
|
||||
সেল্ফহোস্ট করতে এই [স্টার্টার গাইড](#কুইক-স্টার্ট) ব্যবহার করে দ্রুত আপনার এনভায়রনমেন্টে ডিফাই চালান।
|
||||
@@ -168,7 +168,7 @@ Dify সব ধরনের অবদানকে স্বাগত জান
|
||||
|
||||
## নিরাপত্তা বিষয়ক
|
||||
|
||||
আপনার গোপনীয়তা রক্ষা করতে, অনুগ্রহ করে GitHub-এ নিরাপত্তা সংক্রান্ত সমস্যা পোস্ট করা এড়িয়ে চলুন। পরিবর্তে, আপনার প্রশ্নগুলি <security@dify.ai> ঠিকানায় পাঠান এবং আমরা আপনাকে আরও বিস্তারিত উত্তর প্রদান করব।
|
||||
আমাদের [নিরাপত্তা নীতি](../../SECURITY.md) অনুসারে GitHub Security Advisories-এর মাধ্যমে গোপনে নিরাপত্তা দুর্বলতা জানান। প্রকাশ্য issue, আলোচনা বা pull request-এ তা প্রকাশ করবেন না।
|
||||
|
||||
## লাইসেন্স
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Erweiterte Einstellungen
|
||||
|
||||
Falls Sie die Konfiguration anpassen müssen, lesen Sie bitte die Kommentare in unserer [.env.example](../../docker/.env.example)-Datei und aktualisieren Sie die entsprechenden Werte in Ihrer `.env`-Datei. Zusätzlich müssen Sie eventuell Anpassungen an der `docker-compose.yaml`-Datei vornehmen, wie zum Beispiel das Ändern von Image-Versionen, Portzuordnungen oder Volumen-Mounts, je nach Ihrer spezifischen Einsatzumgebung und Ihren Anforderungen. Nachdem Sie Änderungen vorgenommen haben, starten Sie `docker-compose up -d` erneut. Eine vollständige Liste der verfügbaren Umgebungsvariablen finden Sie [hier](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
||||
Konfigurieren Sie Ihre Installation in `docker/.env`. [`.env.example`](../../docker/.env.example) enthält die nötigen Startwerte für die Standardbereitstellung; optionale und dienstspezifische Einstellungen liegen unter [`docker/envs/`](../../docker/envs/). Kopieren Sie benötigte Vorlagen ohne die Endung `.example`. Werte aus `.env` haben Vorrang. Führen Sie nach Änderungen `docker compose up -d` in `docker/` aus. Siehe [Docker-Anleitung](../../docker/README.md).
|
||||
|
||||
## Metriküberwachung mit Grafana
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ Vergessen Sie nicht, in der PR-Beschreibung ein bestehendes Issue zu verlinken o
|
||||
|
||||
### Fehlermeldungen
|
||||
|
||||
Melden Sie Sicherheitslücken gemäß der [Sicherheitsrichtlinie](../../SECURITY.md) vertraulich, statt ein öffentliches Issue zu erstellen.
|
||||
|
||||
> [!WICHTIG]
|
||||
> Bitte stellen Sie sicher, dass Sie folgende Informationen bei der Einreichung eines Fehlerberichts angeben:
|
||||
|
||||
@@ -34,7 +36,7 @@ Unsere Priorisierung:
|
||||
|
||||
| Fehlertyp | Priorität |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| Fehler in Kernfunktionen (Cloud-Service, Login nicht möglich, Anwendungen funktionieren nicht, Sicherheitslücken) | Kritisch |
|
||||
| Fehler in Kernfunktionen (Cloud-Service, Login nicht möglich, Anwendungen funktionieren nicht) | Kritisch |
|
||||
| Nicht-kritische Fehler, Leistungsverbesserungen | Mittlere Priorität |
|
||||
| Kleinere Korrekturen (Tippfehler, verwirrende aber funktionierende UI) | Niedrige Priorität |
|
||||
|
||||
@@ -64,7 +66,7 @@ Unsere Priorisierung:
|
||||
1. Repository forken
|
||||
1. Vor dem Erstellen eines PRs bitte ein Issue zur Diskussion der Änderungen erstellen
|
||||
1. Einen neuen Branch für Ihre Änderungen erstellen
|
||||
1. Tests für Ihre Änderungen hinzufügen
|
||||
1. Tests ergänzen oder aktualisieren, wenn die Änderung beobachtbares Verhalten beeinflusst oder ein relevantes Regressionsrisiko birgt.
|
||||
1. Sicherstellen, dass Ihr Code die bestehenden Tests besteht
|
||||
1. Issue in der PR-Beschreibung verlinken (`fixes #<issue_number>`)
|
||||
1. Auf den Merge warten!
|
||||
@@ -73,22 +75,11 @@ Unsere Priorisierung:
|
||||
|
||||
#### Frontend
|
||||
|
||||
Für die Einrichtung des Frontend-Service folgen Sie bitte unserer ausführlichen [Anleitung](https://github.com/langgenius/dify/blob/main/web/README.md) in der Datei `web/README.md`.
|
||||
Für die Einrichtung des Frontend-Service folgen Sie bitte unserer ausführlichen [Anleitung](../../web/README.md) in der Datei `web/README.md`.
|
||||
|
||||
#### Backend
|
||||
|
||||
Für die Einrichtung des Backend-Service folgen Sie bitte unseren detaillierten [Anweisungen](https://github.com/langgenius/dify/blob/main/api/README.md) in der Datei `api/README.md`.
|
||||
|
||||
#### Weitere Hinweise
|
||||
|
||||
Wir empfehlen, dieses Dokument sorgfältig zu lesen, da es wichtige Informationen enthält über:
|
||||
|
||||
- Voraussetzungen und Abhängigkeiten
|
||||
- Installationsschritte
|
||||
- Konfigurationsdetails
|
||||
- Häufige Problemlösungen
|
||||
|
||||
Bei Problemen während der Einrichtung können Sie sich gerne an uns wenden.
|
||||
Für die Einrichtung des Backend-Service folgen Sie bitte unseren detaillierten [Anweisungen](../../api/README.md) in der Datei `api/README.md`.
|
||||
|
||||
## Hilfe bekommen
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ docker compose up -d
|
||||
|
||||
Nachdem Sie den Server gestartet haben, können Sie über Ihren Browser auf das Dify Dashboard unter [http://localhost/install](http://localhost/install) zugreifen und den Initialisierungsprozess starten.
|
||||
|
||||
#### Hilfe suchen
|
||||
### Hilfe suchen
|
||||
|
||||
Bitte beachten Sie unsere [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs), wenn Sie Probleme bei der Einrichtung von Dify haben. Wenden Sie sich an [die Community und uns](#gemeinschaft--kontakt), falls weiterhin Schwierigkeiten auftreten.
|
||||
|
||||
@@ -120,7 +120,7 @@ Alle Dify-Angebote kommen mit entsprechenden APIs, sodass Sie Dify mühelos in I
|
||||
## Dify verwenden
|
||||
|
||||
- **Cloud </br>**
|
||||
Wir hosten einen [Dify Cloud](https://dify.ai)-Service, den jeder ohne Einrichtung ausprobieren kann. Er bietet alle Funktionen der selbstgehosteten Version und beinhaltet 200 kostenlose GPT-4-Aufrufe im Sandbox-Plan.
|
||||
Mit [Dify Cloud](https://cloud.dify.ai) können Sie Dify ohne eigenen Server ausprobieren. Aktuelle Tarife und Nutzungskontingente finden Sie auf der [Preisseite](https://dify.ai/pricing).
|
||||
|
||||
- **Selbstgehostete Dify Community Edition</br>**
|
||||
Starten Sie Dify schnell in Ihrer Umgebung mit diesem [Schnellstart-Leitfaden](#schnellstart). Nutzen Sie unsere [Dokumentation](https://docs.dify.ai) für weiterführende Informationen und detaillierte Anweisungen.
|
||||
@@ -167,7 +167,7 @@ Wählen Sie den Kanal, der am besten zu Ihrem Anliegen passt:
|
||||
|
||||
## Offenlegung der Sicherheit
|
||||
|
||||
Um Ihre Privatsphäre zu schützen, vermeiden Sie es bitte, Sicherheitsprobleme auf GitHub zu posten. Schicken Sie Ihre Fragen stattdessen an security@dify.ai und wir werden Ihnen eine ausführlichere Antwort geben.
|
||||
Melden Sie Sicherheitslücken gemäß unserer [Sicherheitsrichtlinie](../../SECURITY.md) vertraulich über GitHub Security Advisories. Veröffentlichen Sie sie nicht in öffentlichen Issues, Diskussionen oder Pull Requests.
|
||||
|
||||
## Lizenz
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# Configuración avanzada
|
||||
|
||||
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).
|
||||
|
||||
. 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).
|
||||
Configura la instalación en `docker/.env`. [`.env.example`](../../docker/.env.example) contiene los valores necesarios para el despliegue predeterminado; las opciones avanzadas y específicas de cada servicio están en [`docker/envs/`](../../docker/envs/). Copia las plantillas necesarias sin el sufijo `.example`. Los valores de `.env` tienen prioridad. Tras los cambios, ejecuta `docker compose up -d` desde `docker/`. Consulta la [guía de Docker](../../docker/README.md).
|
||||
|
||||
## Monitorización de Métricas con Grafana
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ No olvides vincular un issue existente o abrir uno nuevo en la descripción del
|
||||
|
||||
### Informes de errores
|
||||
|
||||
Informa de las vulnerabilidades en privado según la [política de seguridad](../../SECURITY.md), sin abrir un issue público.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Por favor, asegúrate de incluir la siguiente información al enviar un informe de error:
|
||||
|
||||
@@ -36,7 +38,7 @@ Cómo priorizamos:
|
||||
|
||||
| Tipo de Issue | Prioridad |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| Errores en funciones principales (servicio en la nube, no poder iniciar sesión, aplicaciones que no funcionan, fallos de seguridad) | Crítica |
|
||||
| Errores en funciones principales (servicio en la nube, no poder iniciar sesión, aplicaciones que no funcionan) | Crítica |
|
||||
| Errores no críticos, mejoras de rendimiento | Prioridad Media |
|
||||
| Correcciones menores (errores tipográficos, UI confusa pero funcional) | Prioridad Baja |
|
||||
|
||||
@@ -66,7 +68,7 @@ Cómo priorizamos:
|
||||
1. Haz un fork del repositorio
|
||||
1. Antes de redactar un PR, por favor crea un issue para discutir los cambios que quieres hacer
|
||||
1. Crea una nueva rama para tus cambios
|
||||
1. Por favor añade pruebas para tus cambios en consecuencia
|
||||
1. Añade o actualiza pruebas cuando el cambio afecte al comportamiento observable o implique un riesgo significativo de regresión.
|
||||
1. Asegúrate de que tu código pasa las pruebas existentes
|
||||
1. Por favor vincula el issue en la descripción del PR, `fixes #<número_del_issue>`
|
||||
1. ¡Fusiona tu código!
|
||||
@@ -75,22 +77,11 @@ Cómo priorizamos:
|
||||
|
||||
#### Frontend
|
||||
|
||||
Para configurar el servicio frontend, por favor consulta nuestra [guía completa](https://github.com/langgenius/dify/blob/main/web/README.md) en el archivo `web/README.md`. Este documento proporciona instrucciones detalladas para ayudarte a configurar el entorno frontend correctamente.
|
||||
Para configurar el servicio frontend, por favor consulta nuestra [guía completa](../../web/README.md) en el archivo `web/README.md`. Este documento proporciona instrucciones detalladas para ayudarte a configurar el entorno frontend correctamente.
|
||||
|
||||
#### Backend
|
||||
|
||||
Para configurar el servicio backend, por favor consulta nuestras [instrucciones detalladas](https://github.com/langgenius/dify/blob/main/api/README.md) en el archivo `api/README.md`. Este documento contiene una guía paso a paso para ayudarte a poner en marcha el backend sin problemas.
|
||||
|
||||
#### Otras cosas a tener en cuenta
|
||||
|
||||
Recomendamos revisar este documento cuidadosamente antes de proceder con la configuración, ya que contiene información esencial sobre:
|
||||
|
||||
- Requisitos previos y dependencias
|
||||
- Pasos de instalación
|
||||
- Detalles de configuración
|
||||
- Consejos comunes de solución de problemas
|
||||
|
||||
No dudes en contactarnos si encuentras algún problema durante el proceso de configuración.
|
||||
Para configurar el servicio backend, por favor consulta nuestras [instrucciones detalladas](../../api/README.md) en el archivo `api/README.md`. Este documento contiene una guía paso a paso para ayudarte a poner en marcha el backend sin problemas.
|
||||
|
||||
## Obteniendo Ayuda
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
<a href="../hi-IN/README.md"><img alt="README in हिन्दी" src="https://img.shields.io/badge/Hindi-d9d9d9"></a>
|
||||
</p>
|
||||
|
||||
#
|
||||
|
||||
<p align="center">
|
||||
<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>
|
||||
@@ -94,7 +93,7 @@ Todas las ofertas de Dify vienen con APIs correspondientes, por lo que podrías
|
||||
## Usando Dify
|
||||
|
||||
- **Nube </br>**
|
||||
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.
|
||||
Prueba [Dify Cloud](https://cloud.dify.ai) sin administrar un servidor. Consulta los planes y límites de uso actuales en la [página de precios](https://dify.ai/pricing).
|
||||
|
||||
- **Auto-alojamiento de Dify Community Edition</br>**
|
||||
Pon rápidamente Dify en funcionamiento en tu entorno con esta [guía de inicio rápido](#inicio-rápido).
|
||||
@@ -163,7 +162,7 @@ Elige el canal que mejor se adapte a tu consulta:
|
||||
|
||||
## Divulgación de Seguridad
|
||||
|
||||
Para proteger tu privacidad, evita publicar problemas de seguridad en GitHub. En su lugar, envía tus preguntas a security@dify.ai y te proporcionaremos una respuesta más detallada.
|
||||
Informa de las vulnerabilidades en privado mediante GitHub Security Advisories, siguiendo nuestra [política de seguridad](../../SECURITY.md). No las divulgues en issues, debates ni pull requests públicos.
|
||||
|
||||
## Licencia
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Configuration avancée
|
||||
|
||||
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).
|
||||
Configurez votre installation dans `docker/.env`. [`.env.example`](../../docker/.env.example) contient les paramètres nécessaires au déploiement par défaut ; les options avancées et propres aux services sont dans [`docker/envs/`](../../docker/envs/). Copiez les modèles nécessaires sans le suffixe `.example`. Les valeurs de `.env` sont prioritaires. Après modification, exécutez `docker compose up -d` depuis `docker/`. Consultez le [guide Docker](../../docker/README.md).
|
||||
|
||||
## Surveillance des Métriques avec Grafana
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ N'oubliez pas de lier un problème existant ou d'ouvrir un nouveau problème dan
|
||||
|
||||
### Rapports de bugs
|
||||
|
||||
Signalez les vulnérabilités en privé selon la [politique de sécurité](../../SECURITY.md), sans ouvrir d’issue publique.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Veuillez vous assurer d'inclure les informations suivantes lors de la soumission d'un rapport de bug :
|
||||
|
||||
@@ -36,7 +38,7 @@ Comment nous priorisons :
|
||||
|
||||
| Type de Problème | Priorité |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| Bugs dans les fonctions principales (service cloud, impossibilité de se connecter, applications qui ne fonctionnent pas, failles de sécurité) | Critique |
|
||||
| Bugs dans les fonctions principales (service cloud, impossibilité de se connecter, applications qui ne fonctionnent pas) | Critique |
|
||||
| Bugs non critiques, améliorations de performance | Priorité Moyenne |
|
||||
| Corrections mineures (fautes de frappe, UI confuse mais fonctionnelle) | Priorité Basse |
|
||||
|
||||
@@ -66,7 +68,7 @@ Comment nous priorisons :
|
||||
1. Forkez le dépôt
|
||||
1. Avant de rédiger une PR, veuillez créer un problème pour discuter des changements que vous souhaitez apporter
|
||||
1. Créez une nouvelle branche pour vos changements
|
||||
1. Veuillez ajouter des tests pour vos changements en conséquence
|
||||
1. Ajoutez ou mettez à jour les tests si le changement affecte un comportement observable ou présente un risque significatif de régression.
|
||||
1. Assurez-vous que votre code passe les tests existants
|
||||
1. Veuillez lier le problème dans la description de la PR, `fixes #<numéro_du_problème>`
|
||||
1. Faites fusionner votre code !
|
||||
@@ -75,22 +77,11 @@ Comment nous priorisons :
|
||||
|
||||
#### Frontend
|
||||
|
||||
Pour configurer le service frontend, veuillez consulter notre [guide complet](https://github.com/langgenius/dify/blob/main/web/README.md) dans le fichier `web/README.md`. Ce document fournit des instructions détaillées pour vous aider à configurer correctement l'environnement frontend.
|
||||
Pour configurer le service frontend, veuillez consulter notre [guide complet](../../web/README.md) dans le fichier `web/README.md`. Ce document fournit des instructions détaillées pour vous aider à configurer correctement l'environnement frontend.
|
||||
|
||||
#### Backend
|
||||
|
||||
Pour configurer le service backend, veuillez consulter nos [instructions détaillées](https://github.com/langgenius/dify/blob/main/api/README.md) dans le fichier `api/README.md`. Ce document contient un guide étape par étape pour vous aider à faire fonctionner le backend sans problème.
|
||||
|
||||
#### Autres choses à noter
|
||||
|
||||
Nous recommandons de revoir attentivement ce document avant de procéder à la configuration, car il contient des informations essentielles sur :
|
||||
|
||||
- Prérequis et dépendances
|
||||
- Étapes d'installation
|
||||
- Détails de configuration
|
||||
- Conseils courants de dépannage
|
||||
|
||||
N'hésitez pas à nous contacter si vous rencontrez des problèmes pendant le processus de configuration.
|
||||
Pour configurer le service backend, veuillez consulter nos [instructions détaillées](../../api/README.md) dans le fichier `api/README.md`. Ce document contient un guide étape par étape pour vous aider à faire fonctionner le backend sans problème.
|
||||
|
||||
## Obtenir de l'aide
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
<a href="../hi-IN/README.md"><img alt="README in हिन्दी" src="https://img.shields.io/badge/Hindi-d9d9d9"></a>
|
||||
</p>
|
||||
|
||||
#
|
||||
|
||||
<p align="center">
|
||||
<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>
|
||||
@@ -94,7 +93,7 @@ Toutes les offres de Dify sont accompagnées d'API correspondantes, vous permett
|
||||
## Utiliser Dify
|
||||
|
||||
- **Cloud </br>**
|
||||
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.
|
||||
Essayez [Dify Cloud](https://cloud.dify.ai) sans gérer de serveur. Consultez la [page des tarifs](https://dify.ai/pricing) pour les offres et quotas actuels.
|
||||
|
||||
- **Auto-hébergement Dify Community Edition</br>**
|
||||
Lancez rapidement Dify dans votre environnement avec ce [guide de démarrage](#démarrage-rapide).
|
||||
@@ -163,7 +162,7 @@ Choisissez le canal le plus adapté à votre demande :
|
||||
|
||||
## Divulgation de sécurité
|
||||
|
||||
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 à security@dify.ai et nous vous fournirons une réponse plus détaillée.
|
||||
Signalez les vulnérabilités en privé via GitHub Security Advisories, conformément à notre [politique de sécurité](../../SECURITY.md). Ne les divulguez pas dans les issues, discussions ou pull requests publiques.
|
||||
|
||||
## Licence
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
|
||||
## कस्टम कॉन्फ़िगरेशन
|
||||
|
||||
यदि आपको कॉन्फ़िगरेशन को कस्टमाइज़ करने की आवश्यकता है, तो कृपया हमारी [.env.example](../../docker/.env.example) फ़ाइल में दिए गए टिप्पणियों (comments) को देखें और अपने `.env` फ़ाइल में संबंधित मानों को अपडेट करें।\
|
||||
इसके अतिरिक्त, आपको अपने विशेष डिप्लॉयमेंट वातावरण और आवश्यकताओं के आधार पर `docker-compose.yaml` फ़ाइल में भी बदलाव करने की आवश्यकता हो सकती है, जैसे इमेज संस्करण, पोर्ट मैपिंग या वॉल्यूम माउंट्स बदलना।\
|
||||
कोई भी बदलाव करने के बाद, कृपया `docker-compose up -d` कमांड को पुनः चलाएँ।\
|
||||
उपलब्ध सभी environment variables की पूरी सूची [here](https://docs.dify.ai/getting-started/install-self-hosted/environments) पर पाई जा सकती है।
|
||||
स्थानीय सेटिंग्स `docker/.env` में बदलें। [`.env.example`](../../docker/.env.example) में डिफ़ॉल्ट परिनियोजन के लिए आवश्यक मान हैं; वैकल्पिक और सेवा-विशिष्ट सेटिंग्स [`docker/envs/`](../../docker/envs/) में हैं। ज़रूरी टेम्पलेट को `.example` प्रत्यय हटाकर कॉपी करें। `.env` के मान प्राथमिकता लेते हैं। बदलाव के बाद `docker/` से `docker compose up -d` चलाएँ। [Docker गाइड](../../docker/README.md) देखें।
|
||||
|
||||
## Grafana के साथ मेट्रिक्स मॉनिटरिंग
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ PR के विवरण में मौजूदा issue को लिंक
|
||||
|
||||
### बग रिपोर्ट (Bug reports)
|
||||
|
||||
सुरक्षा खामियों की रिपोर्ट सार्वजनिक issue में करने के बजाय [सुरक्षा नीति](../../SECURITY.md) के अनुसार निजी तौर पर करें।
|
||||
|
||||
> [!IMPORTANT]\
|
||||
> कृपया बग रिपोर्ट सबमिट करते समय निम्नलिखित जानकारी अवश्य शामिल करें:
|
||||
|
||||
@@ -38,7 +40,7 @@ PR के विवरण में मौजूदा issue को लिंक
|
||||
|
||||
| समस्या प्रकार (Issue Type) | प्राथमिकता (Priority) |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| मुख्य कार्यों में बग (क्लाउड सेवा, लॉगिन न होना, एप्लिकेशन न चलना, सुरक्षा खामियाँ) | गंभीर (Critical) |
|
||||
| मुख्य कार्यों में बग (क्लाउड सेवा, लॉगिन न होना, एप्लिकेशन न चलना) | गंभीर (Critical) |
|
||||
| गैर-गंभीर बग, प्रदर्शन सुधार | मध्यम प्राथमिकता (Medium Priority) |
|
||||
| छोटे सुधार (टाइपो, भ्रमित करने वाला लेकिन काम करने वाला UI) | निम्न प्राथमिकता (Low Priority) |
|
||||
|
||||
@@ -68,7 +70,7 @@ PR के विवरण में मौजूदा issue को लिंक
|
||||
1. रिपॉज़िटरी को Fork करें
|
||||
1. PR ड्राफ्ट करने से पहले, कृपया अपने बदलावों पर चर्चा करने के लिए एक issue बनाएँ
|
||||
1. अपने परिवर्तनों के लिए एक नई शाखा (branch) बनाएँ
|
||||
1. अपने बदलावों के लिए उपयुक्त टेस्ट जोड़ें
|
||||
1. बदलाव से प्रत्यक्ष व्यवहार प्रभावित हो या रिग्रेशन का महत्वपूर्ण जोखिम हो, तो टेस्ट जोड़ें या अपडेट करें।
|
||||
1. सुनिश्चित करें कि आपका कोड मौजूदा टेस्ट पास करता है
|
||||
1. PR विवरण में issue लिंक करें, जैसे: `fixes #<issue_number>`
|
||||
1. मर्ज हो जाएँ! 🎉
|
||||
@@ -77,25 +79,14 @@ PR के विवरण में मौजूदा issue को लिंक
|
||||
|
||||
#### फ्रंटएंड (Frontend)
|
||||
|
||||
फ्रंटएंड सेवा सेटअप करने के लिए, कृपया हमारी विस्तृत [guide](https://github.com/langgenius/dify/blob/main/web/README.md) देखें जो `web/README.md` फ़ाइल में उपलब्ध है।\
|
||||
फ्रंटएंड सेवा सेटअप करने के लिए, कृपया हमारी विस्तृत [guide](../../web/README.md) देखें जो `web/README.md` फ़ाइल में उपलब्ध है।\
|
||||
यह दस्तावेज़ आपको फ्रंटएंड वातावरण को सही ढंग से सेटअप करने के लिए विस्तृत निर्देश प्रदान करता है।
|
||||
|
||||
#### बैकएंड (Backend)
|
||||
|
||||
बैकएंड सेवा सेटअप करने के लिए, कृपया हमारी विस्तृत [instructions](https://github.com/langgenius/dify/blob/main/api/README.md) देखें जो `api/README.md` फ़ाइल में दी गई हैं।\
|
||||
बैकएंड सेवा सेटअप करने के लिए, कृपया हमारी विस्तृत [instructions](../../api/README.md) देखें जो `api/README.md` फ़ाइल में दी गई हैं।\
|
||||
यह दस्तावेज़ चरण-दर-चरण मार्गदर्शन प्रदान करता है जिससे आप बैकएंड को सुचारू रूप से चला सकें।
|
||||
|
||||
#### अन्य महत्वपूर्ण बातें (Other things to note)
|
||||
|
||||
सेटअप शुरू करने से पहले इस दस्तावेज़ की सावधानीपूर्वक समीक्षा करने की अनुशंसा की जाती है, क्योंकि इसमें निम्नलिखित महत्वपूर्ण जानकारी शामिल है:
|
||||
|
||||
- आवश्यक पूर्व-आवश्यकताएँ और निर्भरताएँ
|
||||
- इंस्टॉलेशन चरण
|
||||
- कॉन्फ़िगरेशन विवरण
|
||||
- सामान्य समस्या निवारण सुझाव
|
||||
|
||||
यदि सेटअप प्रक्रिया के दौरान आपको कोई समस्या आती है, तो बेझिझक हमसे संपर्क करें।
|
||||
|
||||
## सहायता प्राप्त करना (Getting Help)
|
||||
|
||||
यदि योगदान करते समय आप कहीं अटक जाएँ या कोई महत्वपूर्ण प्रश्न हो, तो संबंधित GitHub issue के माध्यम से हमें अपने प्रश्न भेजें, या त्वरित बातचीत के लिए हमारे [Discord](https://discord.gg/8Tpq4AcN9c) पर जुड़ें।
|
||||
|
||||
@@ -86,7 +86,7 @@ docker compose up -d
|
||||
|
||||
रन करने के बाद, आप अपने ब्राउज़र में [http://localhost/install](http://localhost/install) पर Dify डैशबोर्ड एक्सेस कर सकते हैं और प्रारंभिक सेटअप प्रक्रिया शुरू कर सकते हैं।
|
||||
|
||||
#### सहायता प्राप्त करना
|
||||
### सहायता प्राप्त करना
|
||||
|
||||
यदि आपको Dify सेटअप करते समय कोई समस्या आती है, तो कृपया हमारे [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) को देखें। यदि फिर भी समस्या बनी रहती है, तो [the community and us](#समुदाय-और-संपर्क-community--contact) से संपर्क करें।
|
||||
|
||||
@@ -120,7 +120,7 @@ Dify की सभी सेवाएँ संबंधित APIs के स
|
||||
## Dify का उपयोग करना
|
||||
|
||||
- **Cloud <br/>**\
|
||||
हम [Dify Cloud](https://dify.ai) सेवा प्रदान करते हैं, जिसे कोई भी बिना किसी सेटअप के आज़मा सकता है। यह स्व-परिनियोजित संस्करण की सभी क्षमताएँ प्रदान करता है और सैंडबॉक्स प्लान में 200 निःशुल्क GPT-4 कॉल्स शामिल करता है।
|
||||
सर्वर का प्रबंधन किए बिना [Dify Cloud](https://cloud.dify.ai) पर Dify आज़माएँ। मौजूदा योजनाओं और उपयोग सीमाओं के लिए [मूल्य निर्धारण पृष्ठ](https://dify.ai/pricing) देखें।
|
||||
|
||||
- **Dify कम्युनिटी संस्करण की स्व-होस्टिंग<br/>**\
|
||||
अपने वातावरण में Dify को जल्दी चलाएँ इस [starter guide](#त्वरित-प्रारंभ) की मदद से।\
|
||||
@@ -169,8 +169,7 @@ Dify सभी प्रकार के योगदानों का स्
|
||||
|
||||
## सुरक्षा प्रकटीकरण (Security disclosure)
|
||||
|
||||
आपकी गोपनीयता की सुरक्षा के लिए, कृपया GitHub पर सुरक्षा संबंधित समस्याएँ पोस्ट करने से बचें।\
|
||||
इसके बजाय, समस्याओं की रिपोर्ट security@dify.ai पर करें, और हमारी टीम आपको विस्तृत उत्तर के साथ प्रतिक्रिया देगी।
|
||||
हमारी [सुरक्षा नीति](../../SECURITY.md) के अनुसार GitHub Security Advisories के ज़रिए निजी तौर पर सुरक्षा खामियों की रिपोर्ट करें। उन्हें सार्वजनिक issues, चर्चाओं या pull requests में उजागर न करें।
|
||||
|
||||
## लाइसेंस (License)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Berikut daftar fitur utamanya:
|
||||
|
||||
<br/>
|
||||
|
||||
Cara termudah untuk menjalankan server Dify adalah menggunakan [Docker Compose](docker/docker-compose.yaml). Sebelum menjalankan perintah berikut, pastikan [Docker](https://docs.docker.com/get-docker/) dan Docker Compose versi v2.24.0 atau yang lebih baru telah terpasang:
|
||||
Cara termudah untuk menjalankan server Dify adalah menggunakan [Docker Compose](../../docker/docker-compose.yaml). Sebelum menjalankan perintah berikut, pastikan [Docker](https://docs.docker.com/get-docker/) dan Docker Compose versi v2.24.0 atau yang lebih baru telah terpasang:
|
||||
|
||||
```bash
|
||||
cd dify
|
||||
@@ -85,7 +85,7 @@ docker compose up -d
|
||||
|
||||
Setelah berjalan, Anda dapat mengakses dashboard Dify melalui peramban web di [http://localhost/install](http://localhost/install) untuk memulai proses inisialisasi awal.
|
||||
|
||||
#### Bantuan & FAQ
|
||||
### Bantuan & FAQ
|
||||
|
||||
Silakan merujuk ke [FAQ kami](https://docs.dify.ai/getting-started/install-self-hosted/faqs) jika menemui kendala saat pemasangan Dify. Hubungi [komunitas kami](#komunitas--kontak) jika Anda membutuhkan bantuan lebih lanjut.
|
||||
|
||||
@@ -119,7 +119,7 @@ Seluruh kapabilitas Dify disertai API yang lengkap dan terdokumentasi rapi, memu
|
||||
## Pilihan Penerapan Dify
|
||||
|
||||
- **Dify Cloud <br/>**
|
||||
Layanan terkelola [Dify Cloud](https://dify.ai) yang dapat langsung dicoba tanpa proses konfigurasi server. Menyediakan seluruh kapabilitas versi mandiri dan mencakup 200 panggilan gratis GPT-4 pada paket *sandbox*. Jika ada kendala, [hubungi tim dukungan Cloud kami](mailto:cloud@dify.ai?subject=%5BGitHub%5DDify%20Cloud%20Support).
|
||||
Coba [Dify Cloud](https://cloud.dify.ai) tanpa mengelola server. Lihat paket dan kuota penggunaan terkini di [halaman harga](https://dify.ai/pricing). Jika ada kendala, [hubungi tim dukungan Cloud kami](mailto:cloud@dify.ai?subject=%5BGitHub%5DDify%20Cloud%20Support).
|
||||
|
||||
- **Self-hosting Dify Community Edition<br/>**
|
||||
Jalankan Dify langsung di infrastruktur server mandiri Anda dengan [panduan mulai cepat](#mulai-cepat-quick-start).
|
||||
@@ -136,15 +136,15 @@ Berikan bintang (*star*) pada repositori Dify di GitHub untuk mendapatkan pember
|
||||
|
||||
## Konfigurasi Tingkat Lanjut
|
||||
|
||||
Untuk konfigurasi kustom, observabilitas mendalam, dan opsi deployment tingkat lanjut, lihat [Advanced Setup](docs/ADVANCED_SETUP.md).
|
||||
Untuk konfigurasi kustom, observabilitas mendalam, dan opsi deployment tingkat lanjut, lihat [Advanced Setup](../../docs/ADVANCED_SETUP.md).
|
||||
|
||||
## Berkontribusi
|
||||
|
||||
Dify menyambut segala bentuk kontribusi dari komunitas:
|
||||
|
||||
- **Kode**: Pelajari [Panduan Kontribusi](CONTRIBUTING.md), lalu telusuri daftar [good first issues](https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22).
|
||||
- **Kode**: Pelajari [Panduan Kontribusi](../../CONTRIBUTING.md), lalu telusuri daftar [good first issues](https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22).
|
||||
- **Ide & Masukan**: Mulai diskusi di [GitHub Discussions](https://github.com/langgenius/dify/discussions).
|
||||
- **Terjemahan (i18n)**: Ikuti [panduan internasionalisasi](web/i18n/README.md) untuk memperbarui atau menambahkan bahasa baru.
|
||||
- **Terjemahan (i18n)**: Ikuti [panduan internasionalisasi](../../web/i18n/README.md) untuk memperbarui atau menambahkan bahasa baru.
|
||||
- **Komunitas**: Bagikan aplikasi yang Anda bangun, bantu sesama pengembang, dan sebarkan informasi tentang Dify.
|
||||
|
||||
### Kontributor
|
||||
@@ -158,7 +158,7 @@ Dify menyambut segala bentuk kontribusi dari komunitas:
|
||||
Pilih saluran komunikasi resmi yang paling relevan:
|
||||
|
||||
- [GitHub Discussions](https://github.com/langgenius/dify/discussions): Diskusi umum, masukan fitur, dan tanya jawab.
|
||||
- [GitHub Issues](https://github.com/langgenius/dify/issues): Laporan bug yang dapat direproduksi dan pelacakan fitur teknis. Baca [Panduan Kontribusi](CONTRIBUTING.md) sebelum membuka issue baru.
|
||||
- [GitHub Issues](https://github.com/langgenius/dify/issues): Laporan bug yang dapat direproduksi dan pelacakan fitur teknis. Baca [Panduan Kontribusi](../../CONTRIBUTING.md) sebelum membuka issue baru.
|
||||
- [Discord](https://discord.gg/FngNHpbcY7): Diskusi interaktif langsung, bertukar proyek aplikasi AI, dan berjejaring dengan pengguna Dify di seluruh dunia.
|
||||
- [X (Twitter)](https://x.com/dify_ai): Berita rilis fitur dan pengumuman resmi.
|
||||
|
||||
@@ -174,8 +174,8 @@ Pilih saluran komunikasi resmi yang paling relevan:
|
||||
|
||||
## Kebijakan Pelaporan Kerentanan Keamanan
|
||||
|
||||
Demi menjaga kerahasiaan dan privasi bersama, mohon tidak mempublikasikan laporan kerentanan keamanan secara terbuka di GitHub Issues. Sampaikan langsung melalui email resmi ke `security@dify.ai` agar tim kami dapat segera melakukan mitigasi teknis.
|
||||
Laporkan kerentanan secara privat melalui GitHub Security Advisories sesuai [kebijakan keamanan](../../SECURITY.md). Jangan mengungkapkannya dalam issue, diskusi, atau pull request publik.
|
||||
|
||||
## Lisensi
|
||||
|
||||
Repositori ini dilisensikan di bawah [Dify Open Source License](LICENSE), berbasiskan Apache 2.0 dengan beberapa ketentuan tambahan.
|
||||
Repositori ini dilisensikan di bawah [Dify Open Source License](../../LICENSE), berbasiskan Apache 2.0 dengan beberapa ketentuan tambahan.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Configurazioni Avanzate
|
||||
|
||||
Se dovete personalizzare la configurazione, leggete i commenti nel nostro file [.env.example](../../docker/.env.example) e aggiornate i valori corrispondenti nel vostro file `.env`. Inoltre, potrebbe essere necessario apportare modifiche al file `docker-compose.yaml`, come cambiare le versioni delle immagini, le mappature delle porte o i mount dei volumi, a seconda del vostro ambiente di distribuzione specifico e dei vostri requisiti. Dopo aver apportato le modifiche, riavviate `docker-compose up -d`. L'elenco completo delle variabili d'ambiente disponibili è disponibile [qui](https://docs.dify.ai/getting-started/install-self-hosted/environments).
|
||||
Configura l’installazione in `docker/.env`. [`.env.example`](../../docker/.env.example) contiene i valori necessari per il deployment predefinito; le opzioni avanzate e specifiche dei servizi sono in [`docker/envs/`](../../docker/envs/). Copia i modelli necessari senza il suffisso `.example`. I valori di `.env` hanno la precedenza. Dopo le modifiche, esegui `docker compose up -d` da `docker/`. Consulta la [guida Docker](../../docker/README.md).
|
||||
|
||||
## Monitoraggio delle Metriche con Grafana
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ docker compose up -d
|
||||
|
||||
Dopo aver avviato il server, potete accedere al dashboard di Dify tramite il vostro browser all'indirizzo [http://localhost/install](http://localhost/install) e avviare il processo di inizializzazione.
|
||||
|
||||
#### Richiedere Aiuto
|
||||
### Richiedere Aiuto
|
||||
|
||||
Consultate le nostre [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) se riscontrate problemi durante la configurazione di Dify. Contattateci [tramite la community](#community--contatti) se continuano a verificarsi difficoltà.
|
||||
Consultate le nostre [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) se riscontrate problemi durante la configurazione di Dify. Contattateci [tramite la community](#community-e-contatti) se continuano a verificarsi difficoltà.
|
||||
|
||||
> Se desiderate contribuire a Dify o effettuare ulteriori sviluppi, consultate la nostra [guida al deployment dal codice sorgente](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code).
|
||||
|
||||
@@ -120,7 +120,7 @@ Tutte le offerte di Dify sono dotate di API corrispondenti, permettendovi di int
|
||||
## Utilizzo di Dify
|
||||
|
||||
- **Cloud <br/>**
|
||||
Ospitiamo un servizio [Dify Cloud](https://dify.ai) che chiunque può provare senza configurazione. Offre tutte le funzionalità della versione self-hosted e include 200 chiamate GPT-4 gratuite nel piano sandbox.
|
||||
Prova [Dify Cloud](https://cloud.dify.ai) senza gestire un server. Consulta la [pagina dei prezzi](https://dify.ai/pricing) per i piani e i limiti di utilizzo attuali.
|
||||
|
||||
- **Dify Community Edition Self-Hosted<br/>**
|
||||
Avviate rapidamente Dify nel vostro ambiente con questa [guida di avvio rapido](#avvio-rapido). Utilizzate la nostra [documentazione](https://docs.dify.ai) per ulteriori informazioni e istruzioni dettagliate.
|
||||
@@ -167,7 +167,7 @@ Scegli il canale più adatto alla tua richiesta:
|
||||
|
||||
## Divulgazione sulla Sicurezza
|
||||
|
||||
Per proteggere la vostra privacy, evitate di pubblicare problemi di sicurezza su GitHub. Inviate invece le vostre domande a security@dify.ai e vi forniremo una risposta più dettagliata.
|
||||
Segnala le vulnerabilità in privato tramite GitHub Security Advisories, seguendo la nostra [politica di sicurezza](../../SECURITY.md). Non divulgarle in issue, discussioni o pull request pubbliche.
|
||||
|
||||
## Licenza
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 高度なセットアップ
|
||||
|
||||
設定をカスタマイズする必要がある場合は、[.env.example](../../docker/.env.example) ファイルのコメントを参照し、`.env` ファイルの対応する値を更新してください。さらに、デプロイ環境や要件に応じて、`docker-compose.yaml` ファイル自体を調整する必要がある場合があります。たとえば、イメージのバージョン、ポートのマッピング、ボリュームのマウントなどを変更します。変更を加えた後は、`docker-compose up -d` を再実行してください。利用可能な環境変数の全一覧は、[こちら](https://docs.dify.ai/getting-started/install-self-hosted/environments)で確認できます。
|
||||
ローカル設定は `docker/.env` に記入します。[`.env.example`](../../docker/.env.example) には標準デプロイに必要な設定のみが含まれ、オプションやサービス固有の設定は [`docker/envs/`](../../docker/envs/) にあります。必要なテンプレートを `.example` 接尾辞なしでコピーしてください。`.env` の値が優先されます。変更後は `docker/` で `docker compose up -d` を実行します。詳細は [Docker ガイド](../../docker/README.md)を参照してください。
|
||||
|
||||
## Grafanaを使用したメトリクス監視
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ PRの説明には、既存のイシューへのリンクを含めるか、新し
|
||||
|
||||
### バグ報告
|
||||
|
||||
脆弱性は公開イシューを作成せず、[セキュリティポリシー](../../SECURITY.md)に従って非公開で報告してください。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> バグ報告時には、以下の情報を必ず含めてください:
|
||||
|
||||
@@ -36,7 +38,7 @@ PRの説明には、既存のイシューへのリンクを含めるか、新し
|
||||
|
||||
| 問題の種類 | 優先度 |
|
||||
| ------------------------------------------------------------ | --------- |
|
||||
| コア機能のバグ(クラウドサービス、ログイン不可、アプリケーション不具合、セキュリティ脆弱性) | 最重要 |
|
||||
| コア機能のバグ(クラウドサービス、ログイン不可、アプリケーション不具合) | 最重要 |
|
||||
| 重要度の低いバグ、パフォーマンス改善 | 中程度 |
|
||||
| 軽微な修正(タイプミス、分かりにくいが動作するUI) | 低 |
|
||||
|
||||
@@ -66,7 +68,7 @@ PRの説明には、既存のイシューへのリンクを含めるか、新し
|
||||
1. リポジトリをフォークする
|
||||
1. PRを作成する前に、変更内容についてイシューで議論する
|
||||
1. 変更用の新しいブランチを作成する
|
||||
1. 変更に応じたテストを追加する
|
||||
1. 観察可能な動作に影響する変更や、無視できないリグレッションのリスクがある変更には、テストを追加または更新する。
|
||||
1. 既存のテストをパスすることを確認する
|
||||
1. PRの説明文にイシューをリンクする(`fixes #<issue_number>`)
|
||||
1. マージ完了!
|
||||
@@ -75,22 +77,11 @@ PRの説明には、既存のイシューへのリンクを含めるか、新し
|
||||
|
||||
#### フロントエンド
|
||||
|
||||
フロントエンドサービスのセットアップについては、`web/README.md`の[ガイド](https://github.com/langgenius/dify/blob/main/web/README.md)を参照してください。このドキュメントには、フロントエンド環境を適切にセットアップするための詳細な手順が記載されています。
|
||||
フロントエンドサービスのセットアップについては、`web/README.md`の[ガイド](../../web/README.md)を参照してください。このドキュメントには、フロントエンド環境を適切にセットアップするための詳細な手順が記載されています。
|
||||
|
||||
#### バックエンド
|
||||
|
||||
バックエンドサービスのセットアップについては、`api/README.md`の[手順](https://github.com/langgenius/dify/blob/main/api/README.md)を参照してください。このドキュメントには、バックエンドを正しく動作させるためのステップバイステップのガイドが含まれています。
|
||||
|
||||
#### その他の注意点
|
||||
|
||||
セットアップを進める前に、以下の重要な情報が含まれているため、このドキュメントを注意深く確認することをお勧めします:
|
||||
|
||||
- 前提条件と依存関係
|
||||
- インストール手順
|
||||
- 設定の詳細
|
||||
- 一般的なトラブルシューティングのヒント
|
||||
|
||||
セットアップ中に問題が発生した場合は、お気軽にお問い合わせください。
|
||||
バックエンドサービスのセットアップについては、`api/README.md`の[手順](../../api/README.md)を参照してください。このドキュメントには、バックエンドを正しく動作させるためのステップバイステップのガイドが含まれています。
|
||||
|
||||
## サポートを受ける
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
<a href="../hi-IN/README.md"><img alt="README in हिन्दी" src="https://img.shields.io/badge/Hindi-d9d9d9"></a>
|
||||
</p>
|
||||
|
||||
#
|
||||
|
||||
<p align="center">
|
||||
<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>
|
||||
@@ -95,7 +94,7 @@ LLM Function CallingやReActに基づくエージェントの定義が可能で
|
||||
## Difyの使用方法
|
||||
|
||||
- **クラウド </br>**
|
||||
[こちら](https://dify.ai)のDify Cloudサービスを利用して、セットアップ不要で試すことができます。サンドボックスプランには、200回のGPT-4呼び出しが無料で含まれています。
|
||||
[Dify Cloud](https://cloud.dify.ai) なら、サーバーを管理せずに Dify を試せます。最新のプランと利用枠は[料金ページ](https://dify.ai/pricing)をご覧ください。
|
||||
|
||||
- **Dify Community Editionのセルフホスティング</br>**
|
||||
この[スタートガイド](#%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88)を使用して、ローカル環境でDifyを簡単に実行できます。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 고급 설정
|
||||
|
||||
구성을 사용자 정의해야 하는 경우 [.env.example](../../docker/.env.example) 파일의 주석을 참조하고 `.env` 파일에서 해당 값을 업데이트하십시오. 또한 특정 배포 환경 및 요구 사항에 따라 `docker-compose.yaml` 파일 자체를 조정해야 할 수도 있습니다. 예를 들어 이미지 버전, 포트 매핑 또는 볼륨 마운트를 변경합니다. 변경 한 후 `docker-compose up -d`를 다시 실행하십시오. 사용 가능한 환경 변수의 전체 목록은 [여기](https://docs.dify.ai/getting-started/install-self-hosted/environments)에서 찾을 수 있습니다.
|
||||
로컬 설정은 `docker/.env`에서 변경하세요. [`.env.example`](../../docker/.env.example)에는 기본 배포에 필요한 설정만 있으며, 선택 사항과 서비스별 설정은 [`docker/envs/`](../../docker/envs/)에 있습니다. 필요한 템플릿을 `.example` 접미사 없이 복사하세요. `.env`의 값이 우선합니다. 변경 후 `docker/`에서 `docker compose up -d`를 실행하세요. 자세한 내용은 [Docker 가이드](../../docker/README.md)를 참고하세요.
|
||||
|
||||
## Grafana를 사용한 메트릭 모니터링
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ PR 설명에 기존 이슈를 연결하거나 새 이슈를 여는 것을 잊지
|
||||
|
||||
### 버그 보고
|
||||
|
||||
보안 취약점은 공개 이슈를 만들지 말고 [보안 정책](../../SECURITY.md)에 따라 비공개로 보고하세요.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 버그 보고서를 제출할 때 다음 정보를 포함해 주세요:
|
||||
|
||||
@@ -36,7 +38,7 @@ PR 설명에 기존 이슈를 연결하거나 새 이슈를 여는 것을 잊지
|
||||
|
||||
| 이슈 유형 | 우선순위 |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| 핵심 기능의 버그(클라우드 서비스, 로그인 불가, 애플리케이션 작동 불능, 보안 취약점) | 중대 |
|
||||
| 핵심 기능의 버그(클라우드 서비스, 로그인 불가, 애플리케이션 작동 불능) | 중대 |
|
||||
| 비중요 버그, 성능 향상 | 중간 우선순위 |
|
||||
| 사소한 수정(오타, 혼란스럽지만 작동하는 UI) | 낮은 우선순위 |
|
||||
|
||||
@@ -66,7 +68,7 @@ PR 설명에 기존 이슈를 연결하거나 새 이슈를 여는 것을 잊지
|
||||
1. 저장소를 포크하세요
|
||||
1. PR을 작성하기 전에, 변경하고자 하는 내용에 대해 논의하기 위한 이슈를 생성해 주세요
|
||||
1. 변경 사항을 위한 새 브랜치를 만드세요
|
||||
1. 변경 사항에 대한 테스트를 적절히 추가해 주세요
|
||||
1. 변경이 관찰 가능한 동작에 영향을 주거나 유의미한 회귀 위험이 있으면 테스트를 추가하거나 갱신하세요.
|
||||
1. 코드가 기존 테스트를 통과하는지 확인하세요
|
||||
1. PR 설명에 이슈를 연결해 주세요, `fixes #<이슈_번호>`
|
||||
1. 병합 완료!
|
||||
@@ -75,22 +77,11 @@ PR 설명에 기존 이슈를 연결하거나 새 이슈를 여는 것을 잊지
|
||||
|
||||
#### 프론트엔드
|
||||
|
||||
프론트엔드 서비스를 설정하려면, `web/README.md` 파일에 있는 우리의 [종합 가이드](https://github.com/langgenius/dify/blob/main/web/README.md)를 참조하세요. 이 문서는 프론트엔드 환경을 적절히 설정하는 데 도움이 되는 자세한 지침을 제공합니다.
|
||||
프론트엔드 서비스를 설정하려면, `web/README.md` 파일에 있는 우리의 [종합 가이드](../../web/README.md)를 참조하세요. 이 문서는 프론트엔드 환경을 적절히 설정하는 데 도움이 되는 자세한 지침을 제공합니다.
|
||||
|
||||
#### 백엔드
|
||||
|
||||
백엔드 서비스를 설정하려면, `api/README.md` 파일에 있는 우리의 [상세 지침](https://github.com/langgenius/dify/blob/main/api/README.md)을 참조하세요. 이 문서는 백엔드를 원활하게 실행하는 데 도움이 되는 단계별 가이드를 포함하고 있습니다.
|
||||
|
||||
#### 기타 참고 사항
|
||||
|
||||
설정을 진행하기 전에 이 문서를 주의 깊게 검토하는 것을 권장합니다. 다음과 같은 필수 정보가 포함되어 있습니다:
|
||||
|
||||
- 필수 조건 및 종속성
|
||||
- 설치 단계
|
||||
- 구성 세부 정보
|
||||
- 일반적인 문제 해결 팁
|
||||
|
||||
설정 과정에서 문제가 발생하면 언제든지 연락해 주세요.
|
||||
백엔드 서비스를 설정하려면, `api/README.md` 파일에 있는 우리의 [상세 지침](../../api/README.md)을 참조하세요. 이 문서는 백엔드를 원활하게 실행하는 데 도움이 되는 단계별 가이드를 포함하고 있습니다.
|
||||
|
||||
## 도움 받기
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ Dify의 모든 제품에는 해당 API가 함께 제공되므로 Dify를 자신
|
||||
## Dify 사용하기
|
||||
|
||||
- **클라우드 </br>**
|
||||
우리는 누구나 설정이 필요 없이 사용해 볼 수 있도록 [Dify 클라우드](https://dify.ai) 서비스를 호스팅합니다. 이는 자체 배포 버전의 모든 기능을 제공하며, 샌드박스 플랜에서 무료로 200회의 GPT-4 호출을 포함합니다.
|
||||
[Dify Cloud](https://cloud.dify.ai)를 통해 서버를 관리하지 않고 Dify를 사용할 수 있습니다. 최신 요금제와 사용 한도는 [요금 안내](https://dify.ai/pricing)를 확인하세요.
|
||||
|
||||
- **셀프-호스팅 Dify 커뮤니티 에디션</br>**
|
||||
환경에서 Dify를 빠르게 실행하려면 이 [스타터 가이드를](#빠른-시작) 참조하세요.
|
||||
@@ -157,7 +157,7 @@ Dify는 모든 형태의 기여를 환영합니다.
|
||||
|
||||
## 보안 공개
|
||||
|
||||
개인정보 보호를 위해 보안 문제를 GitHub에 게시하지 마십시오. 대신 security@dify.ai로 질문을 보내주시면 더 자세한 답변을 드리겠습니다.
|
||||
[보안 정책](../../SECURITY.md)에 따라 GitHub Security Advisories를 통해 취약점을 비공개로 보고하세요. 공개 이슈, 토론 또는 PR에 공개하지 마세요.
|
||||
|
||||
## 라이선스
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Configuração avançada
|
||||
|
||||
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).
|
||||
Configure a instalação em `docker/.env`. [`.env.example`](../../docker/.env.example) contém os valores necessários para a implantação padrão; opções avançadas e específicas dos serviços ficam em [`docker/envs/`](../../docker/envs/). Copie os modelos necessários sem o sufixo `.example`. Os valores de `.env` têm prioridade. Após alterações, execute `docker compose up -d` em `docker/`. Consulte o [guia do Docker](../../docker/README.md).
|
||||
|
||||
## Monitoramento de Métricas com Grafana
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Não se esqueça de vincular um problema existente ou abrir um novo problema na
|
||||
|
||||
### Relatórios de bugs
|
||||
|
||||
Relate vulnerabilidades em particular, seguindo a [política de segurança](../../SECURITY.md), sem abrir uma issue pública.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Por favor, certifique-se de incluir as seguintes informações ao enviar um relatório de bug:
|
||||
|
||||
@@ -36,7 +38,7 @@ Como priorizamos:
|
||||
|
||||
| Tipo de Problema | Prioridade |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| Bugs em funções centrais (serviço em nuvem, não conseguir fazer login, aplicações não funcionando, falhas de segurança) | Crítica |
|
||||
| Bugs em funções centrais (serviço em nuvem, não conseguir fazer login, aplicações não funcionando) | Crítica |
|
||||
| Bugs não críticos, melhorias de desempenho | Prioridade Média |
|
||||
| Correções menores (erros de digitação, interface confusa mas funcional) | Prioridade Baixa |
|
||||
|
||||
@@ -66,7 +68,7 @@ Como priorizamos:
|
||||
1. Faça um fork do repositório
|
||||
1. Antes de elaborar um PR, por favor crie um problema para discutir as mudanças que você quer fazer
|
||||
1. Crie um novo branch para suas alterações
|
||||
1. Por favor, adicione testes para suas alterações conforme apropriado
|
||||
1. Adicione ou atualize testes quando a alteração afetar o comportamento observável ou apresentar risco significativo de regressão.
|
||||
1. Certifique-se de que seu código passa nos testes existentes
|
||||
1. Por favor, vincule o problema na descrição do PR, `fixes #<número_do_problema>`
|
||||
1. Faça o merge do seu código!
|
||||
@@ -75,22 +77,11 @@ Como priorizamos:
|
||||
|
||||
#### Frontend
|
||||
|
||||
Para configurar o serviço frontend, por favor consulte nosso [guia abrangente](https://github.com/langgenius/dify/blob/main/web/README.md) no arquivo `web/README.md`. Este documento fornece instruções detalhadas para ajudá-lo a configurar o ambiente frontend adequadamente.
|
||||
Para configurar o serviço frontend, por favor consulte nosso [guia abrangente](../../web/README.md) no arquivo `web/README.md`. Este documento fornece instruções detalhadas para ajudá-lo a configurar o ambiente frontend adequadamente.
|
||||
|
||||
#### Backend
|
||||
|
||||
Para configurar o serviço backend, por favor consulte nossas [instruções detalhadas](https://github.com/langgenius/dify/blob/main/api/README.md) no arquivo `api/README.md`. Este documento contém um guia passo a passo para ajudá-lo a colocar o backend em funcionamento sem problemas.
|
||||
|
||||
#### Outras coisas a observar
|
||||
|
||||
Recomendamos revisar este documento cuidadosamente antes de prosseguir com a configuração, pois ele contém informações essenciais sobre:
|
||||
|
||||
- Pré-requisitos e dependências
|
||||
- Etapas de instalação
|
||||
- Detalhes de configuração
|
||||
- Dicas comuns de solução de problemas
|
||||
|
||||
Sinta-se à vontade para entrar em contato se encontrar quaisquer problemas durante o processo de configuração.
|
||||
Para configurar o serviço backend, por favor consulte nossas [instruções detalhadas](../../api/README.md) no arquivo `api/README.md`. Este documento contém um guia passo a passo para ajudá-lo a colocar o backend em funcionamento sem problemas.
|
||||
|
||||
## Obtendo Ajuda
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ Todas os recursos do Dify vêm com APIs correspondentes, permitindo que você in
|
||||
## Usando o Dify
|
||||
|
||||
- **Nuvem </br>**
|
||||
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.
|
||||
Experimente o [Dify Cloud](https://cloud.dify.ai) sem gerenciar um servidor. Consulte os planos e limites de uso atuais na [página de preços](https://dify.ai/pricing).
|
||||
|
||||
- **Auto-hospedagem do Dify Community Edition</br>**
|
||||
Configure rapidamente o Dify no seu ambiente com este [guia inicial](#início-rápido).
|
||||
@@ -162,7 +162,7 @@ Escolha o canal mais adequado para a sua dúvida:
|
||||
|
||||
## Divulgação de segurança
|
||||
|
||||
Para proteger sua privacidade, evite postar problemas de segurança no GitHub. Em vez disso, envie suas perguntas para security@dify.ai e forneceremos uma resposta mais detalhada.
|
||||
Relate vulnerabilidades em particular pelo GitHub Security Advisories, seguindo nossa [política de segurança](../../SECURITY.md). Não as divulgue em issues, discussões ou pull requests públicos.
|
||||
|
||||
## Licença
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Napredne nastavitve
|
||||
|
||||
Če morate prilagoditi konfiguracijo, si oglejte komentarje v naši datoteki .env.example in posodobite ustrezne vrednosti v svoji .env datoteki. Poleg tega boste morda morali prilagoditi docker-compose.yamlsamo datoteko, na primer spremeniti različice slike, preslikave vrat ali namestitve nosilca, glede na vaše specifično okolje in zahteve za uvajanje. Po kakršnih koli spremembah ponovno zaženite docker-compose up -d. Celoten seznam razpoložljivih spremenljivk okolja najdete tukaj .
|
||||
Lokalne nastavitve uredite v `docker/.env`. [`.env.example`](../../docker/.env.example) vsebuje nujne vrednosti za privzeto namestitev; izbirne nastavitve in nastavitve posameznih storitev so v [`docker/envs/`](../../docker/envs/). Potrebne predloge kopirajte brez končnice `.example`. Vrednosti v `.env` imajo prednost. Po spremembah v `docker/` zaženite `docker compose up -d`. Glejte [vodnik za Docker](../../docker/README.md).
|
||||
|
||||
## Spremljanje metrik z Grafana
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ docker compose up -d
|
||||
|
||||
Po zagonu lahko dostopate do nadzorne plošče Dify v brskalniku na [http://localhost/install](http://localhost/install) in začnete postopek inicializacije.
|
||||
|
||||
#### Iskanje pomoči
|
||||
### Iskanje pomoči
|
||||
|
||||
Prosimo, glejte naša pogosta vprašanja [FAQ](https://docs.dify.ai/getting-started/install-self-hosted/faqs) če naletite na težave pri nastavitvi Dify. Če imate še vedno težave, se obrnite na [skupnost ali nas](#skupnost-in-stik).
|
||||
|
||||
@@ -117,7 +117,7 @@ AVse ponudbe Difyja so opremljene z ustreznimi API-ji, tako da lahko Dify brez t
|
||||
## Uporaba Dify
|
||||
|
||||
- **Cloud </br>**
|
||||
Gostimo storitev Dify Cloud za vsakogar, ki jo lahko preizkusite brez nastavitev. Zagotavlja vse zmožnosti različice za samostojno namestitev in vključuje 200 brezplačnih klicev GPT-4 v načrtu peskovnika.
|
||||
Preizkusite [Dify Cloud](https://cloud.dify.ai) brez upravljanja strežnika. Trenutne pakete in omejitve uporabe najdete na [strani s cenami](https://dify.ai/pricing).
|
||||
|
||||
- **Self-hosting Dify Community Edition</br>**
|
||||
Hitro zaženite Dify v svojem okolju s tem [začetnim vodnikom](#hitri-začetek) . Za dodatne reference in podrobnejša navodila uporabite našo [dokumentacijo](https://docs.dify.ai) .
|
||||
@@ -164,7 +164,7 @@ Izberite kanal, ki najbolj ustreza vašemu vprašanju:
|
||||
|
||||
## Varnostno razkritje
|
||||
|
||||
Zaradi zaščite vaše zasebnosti se izogibajte objavljanju varnostnih vprašanj na GitHub. Namesto tega pošljite vprašanja na security@dify.ai in zagotovili vam bomo podrobnejši odgovor.
|
||||
Ranljivosti prijavite zasebno prek GitHub Security Advisories v skladu z našo [varnostno politiko](../../SECURITY.md). Ne razkrivajte jih v javnih prijavah težav, razpravah ali zahtevkih za združitev.
|
||||
|
||||
## Licenca
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Advanced Setup
|
||||
|
||||
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).
|
||||
Set local configuration in `docker/.env`. [`.env.example`](../../docker/.env.example) contains essential startup defaults; optional and service-specific settings live under [`docker/envs/`](../../docker/envs/). Copy the templates you need without the `.example` suffix. Values in `.env` take precedence. After changes, run `docker compose up -d` from `docker/`. See the [Docker deployment guide](../../docker/README.md).
|
||||
|
||||
## Kubernetes
|
||||
|
||||
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.
|
||||
|
||||
|
||||
+2
-3
@@ -60,7 +60,6 @@
|
||||
<a href="../hi-IN/README.md"><img alt="README in हिन्दी" src="https://img.shields.io/badge/Hindi-d9d9d9"></a>
|
||||
</p>
|
||||
|
||||
#
|
||||
|
||||
<p align="center">
|
||||
<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>
|
||||
@@ -94,7 +93,7 @@ All of Dify's offerings come with corresponding APIs, so you could effortlessly
|
||||
## Using Dify
|
||||
|
||||
- **Cloud </br>**
|
||||
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.
|
||||
We host [Dify Cloud](https://cloud.dify.ai) so you can try Dify without managing a server. See the [pricing page](https://dify.ai/pricing) for current plans and usage allowances.
|
||||
|
||||
- **Self-hosting Dify Community Edition</br>**
|
||||
Quickly get Dify running in your environment with this [starter guide](#quick-start).
|
||||
@@ -163,7 +162,7 @@ Choose the channel that best fits your question:
|
||||
|
||||
## Security Disclosure
|
||||
|
||||
To protect your privacy, please avoid posting security issues on GitHub. Instead, send your questions to security@dify.ai and we will provide you with a more detailed answer.
|
||||
Report vulnerabilities privately through GitHub Security Advisories, following our [security policy](../../SECURITY.md). Do not disclose them in public issues, discussions, or pull requests.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gelişmiş Kurulum
|
||||
|
||||
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.
|
||||
Yerel ayarları `docker/.env` içinde düzenleyin. [`.env.example`](../../docker/.env.example) varsayılan dağıtım için gereken başlangıç değerlerini içerir; isteğe bağlı ve hizmete özel ayarlar [`docker/envs/`](../../docker/envs/) altındadır. Gereken şablonları `.example` son eki olmadan kopyalayın. `.env` değerleri önceliklidir. Değişikliklerden sonra `docker/` dizininde `docker compose up -d` çalıştırın. [Docker kılavuzuna](../../docker/README.md) bakın.
|
||||
|
||||
## Grafana ile Metrik İzleme
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ PR açıklamasında mevcut bir sorunu bağlamayı veya yeni bir sorun açmayı u
|
||||
|
||||
### Hata Raporları
|
||||
|
||||
Güvenlik açıklarını herkese açık issue oluşturmadan [güvenlik politikasına](../../SECURITY.md) göre özel olarak bildirin.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Lütfen bir hata raporu gönderirken aşağıdaki bilgileri dahil ettiğinizden emin olun:
|
||||
|
||||
@@ -36,7 +38,7 @@ Nasıl önceliklendiriyoruz:
|
||||
|
||||
| Sorun Türü | Öncelik |
|
||||
| ------------------------------------------------------------ | --------------- |
|
||||
| Temel işlevlerdeki hatalar (bulut hizmeti, giriş yapamama, çalışmayan uygulamalar, güvenlik açıkları) | Kritik |
|
||||
| Temel işlevlerdeki hatalar (bulut hizmeti, giriş yapamama, çalışmayan uygulamalar) | Kritik |
|
||||
| Kritik olmayan hatalar, performans artışları | Orta Öncelik |
|
||||
| Küçük düzeltmeler (yazım hataları, kafa karıştırıcı ama çalışan UI) | Düşük Öncelik |
|
||||
|
||||
@@ -66,7 +68,7 @@ Nasıl önceliklendiriyoruz:
|
||||
1. Depoyu fork edin
|
||||
1. Bir PR taslağı oluşturmadan önce, yapmak istediğiniz değişiklikleri tartışmak için lütfen bir sorun oluşturun
|
||||
1. Değişiklikleriniz için yeni bir dal oluşturun
|
||||
1. Lütfen değişiklikleriniz için uygun testler ekleyin
|
||||
1. Değişiklik gözlemlenebilir davranışı etkiliyorsa veya önemli bir regresyon riski taşıyorsa test ekleyin ya da güncelleyin.
|
||||
1. Kodunuzun mevcut testleri geçtiğinden emin olun
|
||||
1. Lütfen PR açıklamasında sorunu bağlayın, `fixes #<sorun_numarası>`
|
||||
1. Kodunuzu birleştirin!
|
||||
@@ -75,22 +77,11 @@ Nasıl önceliklendiriyoruz:
|
||||
|
||||
#### Frontend
|
||||
|
||||
Frontend hizmetini kurmak için, lütfen `web/README.md` dosyasındaki kapsamlı [rehberimize](https://github.com/langgenius/dify/blob/main/web/README.md) bakın. Bu belge, frontend ortamını düzgün bir şekilde kurmanıza yardımcı olacak ayrıntılı talimatlar sağlar.
|
||||
Frontend hizmetini kurmak için, lütfen `web/README.md` dosyasındaki kapsamlı [rehberimize](../../web/README.md) bakın. Bu belge, frontend ortamını düzgün bir şekilde kurmanıza yardımcı olacak ayrıntılı talimatlar sağlar.
|
||||
|
||||
#### Backend
|
||||
|
||||
Backend hizmetini kurmak için, lütfen `api/README.md` dosyasındaki detaylı [talimatlarımıza](https://github.com/langgenius/dify/blob/main/api/README.md) bakın. Bu belge, backend'i sorunsuz bir şekilde çalıştırmanıza yardımcı olacak adım adım bir kılavuz içerir.
|
||||
|
||||
#### Dikkat Edilecek Diğer Şeyler
|
||||
|
||||
Kuruluma geçmeden önce bu belgeyi dikkatlice incelemenizi öneririz, çünkü şunlar hakkında temel bilgiler içerir:
|
||||
|
||||
- Ön koşullar ve bağımlılıklar
|
||||
- Kurulum adımları
|
||||
- Yapılandırma detayları
|
||||
- Yaygın sorun giderme ipuçları
|
||||
|
||||
Kurulum süreci sırasında herhangi bir sorunla karşılaşırsanız bizimle iletişime geçmekten çekinmeyin.
|
||||
Backend hizmetini kurmak için, lütfen `api/README.md` dosyasındaki detaylı [talimatlarımıza](../../api/README.md) bakın. Bu belge, backend'i sorunsuz bir şekilde çalıştırmanıza yardımcı olacak adım adım bir kılavuz içerir.
|
||||
|
||||
## Yardım Almak
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ Dify'ın tüm özellikleri ilgili API'lerle birlikte gelir, böylece Dify'ı ken
|
||||
## Dify'ı Kullanma
|
||||
|
||||
- **Cloud </br>**
|
||||
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.
|
||||
Sunucu yönetmeden [Dify Cloud](https://cloud.dify.ai) ile Dify’ı deneyebilirsiniz. Güncel planlar ve kullanım kotaları için [fiyatlandırma sayfasına](https://dify.ai/pricing) bakın.
|
||||
|
||||
- **Dify Topluluk Sürümünü Kendi Sunucunuzda Barındırma</br>**
|
||||
Bu [başlangıç kılavuzu](#hızlı-başlangıç) ile Dify'ı kendi ortamınızda hızlıca çalıştırın.
|
||||
@@ -157,7 +157,7 @@ Sorunuza en uygun kanalı seçin:
|
||||
|
||||
## Güvenlik açıklaması
|
||||
|
||||
Gizliliğinizi korumak için, lütfen güvenlik sorunlarını GitHub'da paylaşmaktan kaçının. Bunun yerine, sorularınızı security@dify.ai adresine gönderin ve size daha detaylı bir cevap vereceğiz.
|
||||
Güvenlik açıklarını [güvenlik politikamıza](../../SECURITY.md) göre GitHub Security Advisories üzerinden özel olarak bildirin. Herkese açık issue, tartışma veya pull request içinde paylaşmayın.
|
||||
|
||||
## Lisans
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Thiết lập nâng cao
|
||||
|
||||
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).
|
||||
Cấu hình cục bộ nằm trong `docker/.env`. [`.env.example`](../../docker/.env.example) chỉ chứa các giá trị cần cho triển khai mặc định; cấu hình tùy chọn và riêng cho từng dịch vụ nằm trong [`docker/envs/`](../../docker/envs/). Sao chép mẫu cần dùng và bỏ hậu tố `.example`. Giá trị trong `.env` được ưu tiên. Sau khi thay đổi, chạy `docker compose up -d` từ `docker/`. Xem [hướng dẫn Docker](../../docker/README.md).
|
||||
|
||||
## Giám sát Số liệu với Grafana
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Hãy tham gia, đóng góp và cùng nhau xây dựng điều tuyệt vời!
|
||||
|
||||
### Báo cáo lỗi
|
||||
|
||||
Báo cáo lỗ hổng riêng tư theo [chính sách bảo mật](../../SECURITY.md), không tạo issue công khai.
|
||||
|
||||
> [!QUAN TRỌNG]\
|
||||
> Vui lòng đảm bảo cung cấp các thông tin sau khi gửi báo cáo lỗi:
|
||||
|
||||
@@ -36,7 +38,7 @@ Cách chúng tôi ưu tiên:
|
||||
|
||||
| Loại vấn đề | Mức độ ưu tiên |
|
||||
| ----------- | -------------- |
|
||||
| Lỗi trong các chức năng cốt lõi (dịch vụ đám mây, không thể đăng nhập, ứng dụng không hoạt động, lỗ hổng bảo mật) | Quan trọng |
|
||||
| Lỗi trong các chức năng cốt lõi (dịch vụ đám mây, không thể đăng nhập, ứng dụng không hoạt động) | Quan trọng |
|
||||
| Lỗi không nghiêm trọng, cải thiện hiệu suất | Ưu tiên trung bình |
|
||||
| Sửa lỗi nhỏ (lỗi chính tả, UI gây nhầm lẫn nhưng vẫn hoạt động) | Ưu tiên thấp |
|
||||
|
||||
@@ -66,7 +68,7 @@ Cách chúng tôi ưu tiên:
|
||||
1. Fork repository
|
||||
1. Trước khi soạn PR, vui lòng tạo issue để thảo luận về các thay đổi bạn muốn thực hiện
|
||||
1. Tạo nhánh mới cho các thay đổi của bạn
|
||||
1. Vui lòng thêm test cho các thay đổi tương ứng
|
||||
1. Thêm hoặc cập nhật kiểm thử khi thay đổi ảnh hưởng đến hành vi có thể quan sát được hoặc có nguy cơ hồi quy đáng kể.
|
||||
1. Đảm bảo code của bạn vượt qua các test hiện có
|
||||
1. Vui lòng liên kết issue trong mô tả PR, `fixes #<số_issue>`
|
||||
1. Được merge!
|
||||
@@ -75,22 +77,11 @@ Cách chúng tôi ưu tiên:
|
||||
|
||||
#### Frontend
|
||||
|
||||
Để thiết lập dịch vụ frontend, vui lòng tham khảo [hướng dẫn](https://github.com/langgenius/dify/blob/main/web/README.md) chi tiết của chúng tôi trong file `web/README.md`. Tài liệu này cung cấp hướng dẫn chi tiết để giúp bạn thiết lập môi trường frontend một cách đúng đắn.
|
||||
Để thiết lập dịch vụ frontend, vui lòng tham khảo [hướng dẫn](../../web/README.md) chi tiết của chúng tôi trong file `web/README.md`. Tài liệu này cung cấp hướng dẫn chi tiết để giúp bạn thiết lập môi trường frontend một cách đúng đắn.
|
||||
|
||||
#### Backend
|
||||
|
||||
Để thiết lập dịch vụ backend, vui lòng tham khảo [hướng dẫn](https://github.com/langgenius/dify/blob/main/api/README.md) chi tiết của chúng tôi trong file `api/README.md`. Tài liệu này chứa hướng dẫn từng bước để giúp bạn khởi chạy backend một cách suôn sẻ.
|
||||
|
||||
#### Các điểm cần lưu ý khác
|
||||
|
||||
Chúng tôi khuyến nghị xem xét kỹ tài liệu này trước khi tiến hành thiết lập, vì nó chứa thông tin thiết yếu về:
|
||||
|
||||
- Điều kiện tiên quyết và dependencies
|
||||
- Các bước cài đặt
|
||||
- Chi tiết cấu hình
|
||||
- Các mẹo xử lý sự cố phổ biến
|
||||
|
||||
Đừng ngần ngại liên hệ nếu bạn gặp bất kỳ vấn đề nào trong quá trình thiết lập.
|
||||
Để thiết lập dịch vụ backend, vui lòng tham khảo [hướng dẫn](../../api/README.md) chi tiết của chúng tôi trong file `api/README.md`. Tài liệu này chứa hướng dẫn từng bước để giúp bạn khởi chạy backend một cách suôn sẻ.
|
||||
|
||||
## Nhận trợ giúp
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ Tất cả các dịch vụ của Dify đều đi kèm với các API tương
|
||||
## Sử dụng Dify
|
||||
|
||||
- **Cloud </br>**
|
||||
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.
|
||||
Dùng thử [Dify Cloud](https://cloud.dify.ai) mà không cần quản lý máy chủ. Xem các gói và hạn mức sử dụng hiện tại tại [trang giá](https://dify.ai/pricing).
|
||||
|
||||
- **Tự triển khai Dify Community Edition</br>**
|
||||
Nhanh chóng chạy Dify trong môi trường của bạn với [hướng dẫn bắt đầu](#bắt-đầu-nhanh) này.
|
||||
@@ -158,7 +158,7 @@ Chọn kênh phù hợp nhất với câu hỏi của bạn:
|
||||
|
||||
## Tiết lộ bảo mật
|
||||
|
||||
Để 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 security@dify.ai và chúng tôi sẽ cung cấp cho bạn câu trả lời chi tiết hơn.
|
||||
Báo cáo lỗ hổng riêng tư qua GitHub Security Advisories theo [chính sách bảo mật](../../SECURITY.md). Không công bố trong issue, thảo luận hoặc pull request công khai.
|
||||
|
||||
## Giấy phép
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## 自定义配置
|
||||
|
||||
如果您需要自定义配置,请参考 [.env.example](../../docker/.env.example) 文件中的注释,并更新 `.env` 文件中对应的值。此外,您可能需要根据您的具体部署环境和需求对 `docker-compose.yaml` 文件本身进行调整,例如更改镜像版本、端口映射或卷挂载。完成任何更改后,请重新运行 `docker-compose up -d`。您可以在[此处](https://docs.dify.ai/getting-started/install-self-hosted/environments)找到可用环境变量的完整列表。
|
||||
在 `docker/.env` 中设置本地配置。[`.env.example`](../../docker/.env.example) 只包含默认部署所需的启动配置,可选和服务专用配置位于 [`docker/envs/`](../../docker/envs/)。需要时,将对应模板复制为不带 `.example` 后缀的文件;`.env` 中的值优先。修改后,在 `docker/` 目录运行 `docker compose up -d`。详见 [Docker 部署指南](../../docker/README.md)。
|
||||
|
||||
## 使用 Grafana 进行指标监控
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
### Bug 报告
|
||||
|
||||
安全漏洞请按[安全政策](../../SECURITY.md)私下报告,不要创建公开 issue。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 提交 bug 报告时请务必包含以下信息:
|
||||
|
||||
@@ -36,7 +38,7 @@
|
||||
|
||||
| 问题类型 | 优先级 |
|
||||
| -------------------------------------------------- | ---------- |
|
||||
| 核心功能 bug(云服务、登录失败、应用无法使用、安全漏洞) | 紧急 |
|
||||
| 核心功能 bug(云服务、登录失败、应用无法使用) | 紧急 |
|
||||
| 非关键 bug、性能优化 | 中等优先级 |
|
||||
| 小修复(拼写错误、界面混乱但可用) | 低优先级 |
|
||||
|
||||
@@ -61,36 +63,25 @@
|
||||
|
||||
## 提交 PR
|
||||
|
||||
### 项目设置
|
||||
|
||||
### PR 提交流程
|
||||
|
||||
1. Fork 本仓库
|
||||
1. 在提交 PR 之前,请先创建 issue 讨论你想要做的修改
|
||||
1. 为你的修改创建一个新的分支
|
||||
1. 请为你的修改添加相应的测试
|
||||
1. 当修改影响可观察行为或存在明显回归风险时,添加或更新测试。
|
||||
1. 确保你的代码能通过现有的测试
|
||||
1. 请在 PR 描述中关联相关 issue,格式为 `fixes #<issue编号>`
|
||||
1. 等待合并!
|
||||
|
||||
### 项目设置
|
||||
|
||||
#### 前端
|
||||
|
||||
关于前端服务的设置,请参考 `web/README.md` 文件中的[详细指南](https://github.com/langgenius/dify/blob/main/web/README.md)。该文档提供了帮助你正确配置前端环境的详细说明。
|
||||
关于前端服务的设置,请参考 `web/README.md` 文件中的[详细指南](../../web/README.md)。该文档提供了帮助你正确配置前端环境的详细说明。
|
||||
|
||||
#### 后端
|
||||
|
||||
关于后端服务的设置,请参考 `api/README.md` 文件中的[详细说明](https://github.com/langgenius/dify/blob/main/api/README.md)。该文档包含了帮助你顺利运行后端的步骤说明。
|
||||
|
||||
#### 其他注意事项
|
||||
|
||||
我们建议在开始设置之前仔细阅读本文档,因为它包含以下重要信息:
|
||||
|
||||
- 前置条件和依赖项
|
||||
- 安装步骤
|
||||
- 配置细节
|
||||
- 常见问题解决方案
|
||||
|
||||
如果在设置过程中遇到任何问题,请随时联系我们。
|
||||
关于后端服务的设置,请参考 `api/README.md` 文件中的[详细说明](../../api/README.md)。该文档包含了帮助你顺利运行后端的步骤说明。
|
||||
|
||||
## 获取帮助
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
<a href="../hi-IN/README.md"><img alt="README in हिन्दी" src="https://img.shields.io/badge/Hindi-d9d9d9"></a>
|
||||
</div>
|
||||
|
||||
#
|
||||
|
||||
<div align="center">
|
||||
<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>
|
||||
@@ -95,7 +94,7 @@ Dify 是一个开源的 LLM 应用开发平台。其直观的界面结合了 AI
|
||||
## 使用 Dify
|
||||
|
||||
- **云 </br>**
|
||||
我们提供[ Dify 云服务](https://dify.ai),任何人都可以零设置尝试。它提供了自部署版本的所有功能,并在沙盒计划中包含 200 次免费的 GPT-4 调用。
|
||||
我们提供 [Dify 云服务](https://cloud.dify.ai),无需管理服务器即可体验 Dify。最新套餐与用量额度请参阅[定价页面](https://dify.ai/pricing)。
|
||||
|
||||
- **自托管 Dify 社区版</br>**
|
||||
使用这个[入门指南](#%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8)快速在您的环境中运行 Dify。
|
||||
@@ -170,7 +169,7 @@ Dify 欢迎各种形式的贡献:
|
||||
[](https://star-history.com/#langgenius/dify&Date)
|
||||
## 安全问题
|
||||
|
||||
为了保护您的隐私,请避免在 GitHub 上发布安全问题。发送问题至 security@dify.ai,我们将为您做更细致的解答。
|
||||
请按照[安全政策](../../SECURITY.md),通过 GitHub Security Advisories 私下报告漏洞,不要在公开 issue、讨论或 PR 中披露。
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 進階設定
|
||||
|
||||
如果您需要自定義配置,請參考我們的 [.env.example](../../docker/.env.example) 文件中的註釋,並在您的 `.env` 文件中更新相應的值。此外,根據您特定的部署環境和需求,您可能需要調整 `docker-compose.yaml` 文件本身,例如更改映像版本、端口映射或卷掛載。進行任何更改後,請重新運行 `docker-compose up -d`。您可以在[這裡](https://docs.dify.ai/getting-started/install-self-hosted/environments)找到可用環境變數的完整列表。
|
||||
在 `docker/.env` 中設定本機配置。[`.env.example`](../../docker/.env.example) 僅包含預設部署所需的啟動設定,可選與服務專用設定位於 [`docker/envs/`](../../docker/envs/)。需要時,將對應範本複製為不含 `.example` 後綴的檔案;`.env` 中的值優先。修改後,在 `docker/` 目錄執行 `docker compose up -d`。詳見 [Docker 部署指南](../../docker/README.md)。
|
||||
|
||||
## 使用 Grafana 進行指標監控
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
### 錯誤回報
|
||||
|
||||
安全漏洞請依照[安全政策](../../SECURITY.md)私下回報,不要建立公開議題。
|
||||
|
||||
> [!IMPORTANT]\
|
||||
> 提交錯誤回報時,請務必包含以下資訊:
|
||||
|
||||
@@ -36,7 +38,7 @@
|
||||
|
||||
| 議題類型 | 優先級 |
|
||||
| -------- | ------ |
|
||||
| 核心功能錯誤(雲端服務、無法登入、應用程式無法運作、安全漏洞) | 緊急 |
|
||||
| 核心功能錯誤(雲端服務、無法登入、應用程式無法運作) | 緊急 |
|
||||
| 非緊急錯誤、效能優化 | 中等 |
|
||||
| 次要修正(拼字錯誤、介面混淆但可運作) | 低 |
|
||||
|
||||
@@ -66,7 +68,7 @@
|
||||
1. Fork 專案
|
||||
1. 在開始撰寫 PR 前,請先建立議題討論你想做的更改
|
||||
1. 為你的更改建立新分支
|
||||
1. 請為你的更改新增相應的測試
|
||||
1. 當更改影響可觀察行為或存在明顯回歸風險時,新增或更新測試。
|
||||
1. 確保你的程式碼通過現有測試
|
||||
1. 請在 PR 描述中連結相關議題,使用 `fixes #<issue_number>`
|
||||
1. 等待合併!
|
||||
@@ -75,22 +77,11 @@
|
||||
|
||||
#### 前端
|
||||
|
||||
關於前端服務的設定,請參考 `web/README.md` 中的完整[指南](https://github.com/langgenius/dify/blob/main/web/README.md)。此文件提供詳細說明,幫助你正確設定前端環境。
|
||||
關於前端服務的設定,請參考 `web/README.md` 中的完整[指南](../../web/README.md)。此文件提供詳細說明,幫助你正確設定前端環境。
|
||||
|
||||
#### 後端
|
||||
|
||||
關於後端服務的設定,請參考 `api/README.md` 中的詳細[說明](https://github.com/langgenius/dify/blob/main/api/README.md)。此文件包含逐步指引,幫助你順利啟動後端服務。
|
||||
|
||||
#### 其他注意事項
|
||||
|
||||
我們建議在開始設定前仔細閱讀此文件,因為它包含以下重要資訊:
|
||||
|
||||
- 前置需求和相依性
|
||||
- 安裝步驟
|
||||
- 設定細節
|
||||
- 常見問題排解
|
||||
|
||||
如果在設定過程中遇到任何問題,歡迎隨時詢問。
|
||||
關於後端服務的設定,請參考 `api/README.md` 中的詳細[說明](../../api/README.md)。此文件包含逐步指引,幫助你順利啟動後端服務。
|
||||
|
||||
## 尋求協助
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ Dify 的所有功能都提供相應的 API,因此您可以輕鬆地將 Dify
|
||||
## 使用 Dify
|
||||
|
||||
- **雲端服務 </br>**
|
||||
我們提供 [Dify Cloud](https://dify.ai) 服務,任何人都可以零配置嘗試。它提供與自部署版本相同的所有功能,並在沙盒計劃中包含 200 次免費 GPT-4 調用。
|
||||
我們提供 [Dify Cloud](https://cloud.dify.ai),無需管理伺服器即可體驗 Dify。最新方案與用量額度請參閱[定價頁面](https://dify.ai/pricing)。
|
||||
|
||||
- **自託管 Dify 社區版</br>**
|
||||
使用這份[快速指南](#%E5%BF%AB%E9%80%9F%E9%96%8B%E5%A7%8B)在您的環境中快速運行 Dify。
|
||||
@@ -168,7 +168,7 @@ Dify 歡迎各種形式的貢獻:
|
||||
|
||||
## 安全揭露
|
||||
|
||||
為保護您的隱私,請避免在 GitHub 上發布安全性問題。請將您的問題發送至 security@dify.ai,我們將為您提供更詳細的答覆。
|
||||
請依照[安全政策](../../SECURITY.md),透過 GitHub Security Advisories 私下回報漏洞,不要在公開議題、討論或 PR 中揭露。
|
||||
|
||||
## 授權條款
|
||||
|
||||
|
||||
+58
-501
@@ -1,541 +1,98 @@
|
||||
# Dify Stress Test Suite
|
||||
# Dify SSE stress tests
|
||||
|
||||
A high-performance stress test suite for Dify workflow execution using **Locust** - optimized for measuring Server-Sent Events (SSE) streaming performance.
|
||||
This Locust suite exercises streaming `POST /v1/workflows/run` requests against a local Dify instance with a mock OpenAI server. It measures connection counts, event throughput, time to first event (TTFE), stream duration, inter-event latency, and failures.
|
||||
|
||||
## Key Metrics Tracked
|
||||
Run the following commands from the repository root. Keep long-running services in separate terminals.
|
||||
|
||||
The stress test focuses on four critical SSE performance indicators:
|
||||
## Prepare the runtime
|
||||
|
||||
1. **Active SSE Connections** - Real-time count of open SSE connections
|
||||
1. **New Connection Rate** - Connections per second (conn/sec)
|
||||
1. **Time to First Event (TTFE)** - Latency until first SSE event arrives
|
||||
1. **Event Throughput** - Events per second (events/sec)
|
||||
Complete the [backend setup](../../api/README.md), including middleware, migrations, the plugin daemon, and workers. For measurements, run the API with Gunicorn instead of the development server:
|
||||
|
||||
## Features
|
||||
```bash
|
||||
uv run --project api gunicorn --chdir api \
|
||||
--bind 0.0.0.0:5001 --workers 4 --worker-class gevent \
|
||||
--timeout 120 --keep-alive 5 app:app
|
||||
```
|
||||
|
||||
- **True SSE Support**: Properly handles Server-Sent Events streaming without premature connection closure
|
||||
- **Real-time Metrics**: Live reporting every 5 seconds during tests
|
||||
- **Comprehensive Tracking**:
|
||||
- Active connection monitoring
|
||||
- Connection establishment rate
|
||||
- Event processing throughput
|
||||
- TTFE distribution analysis
|
||||
- **Multiple Interfaces**:
|
||||
- Web UI for real-time monitoring (<http://localhost:8089>)
|
||||
- Headless mode with periodic console updates
|
||||
- **Detailed Reports**: Final statistics with overall rates and averages
|
||||
- **Easy Configuration**: Uses existing API key configuration from setup
|
||||
The worker count is a starting configuration; tune it for the machine and record it with the results.
|
||||
|
||||
## What Gets Measured
|
||||
Start the mock provider before running setup:
|
||||
|
||||
The stress test focuses on SSE streaming performance with these key metrics:
|
||||
```bash
|
||||
uv run --project api python scripts/stress-test/setup/mock_openai_server.py
|
||||
```
|
||||
|
||||
### Primary Endpoint: `/v1/workflows/run`
|
||||
Then provision the benchmark app, plugin configuration, and API key:
|
||||
|
||||
The stress test tests a single endpoint with comprehensive SSE metrics tracking:
|
||||
```bash
|
||||
STRESS_TEST_ADMIN_EMAIL='your-admin@example.com' \
|
||||
STRESS_TEST_ADMIN_USERNAME='dify' \
|
||||
STRESS_TEST_ADMIN_PASSWORD='your-password' \
|
||||
uv run --project api python scripts/stress-test/setup_all.py
|
||||
```
|
||||
|
||||
- **Request Type**: POST request to workflow execution API
|
||||
- **Response Type**: Server-Sent Events (SSE) stream
|
||||
- **Payload**: Random questions from a configurable pool
|
||||
- **Concurrency**: Configurable from 1 to 1000+ simultaneous users
|
||||
Setup creates the first admin on an uninitialized instance or signs in with the supplied account on an existing instance. `STRESS_TEST_ADMIN_USERNAME` is used only for initial setup. It writes credentials and the app API key to `scripts/stress-test/setup/config/stress_test_state.json`; keep that local file private.
|
||||
|
||||
### Key Performance Metrics
|
||||
|
||||
#### 1. **Active Connections**
|
||||
|
||||
- **What it measures**: Number of concurrent SSE connections open at any moment
|
||||
- **Why it matters**: Shows system's ability to handle parallel streams
|
||||
- **Good values**: Should remain stable under load without drops
|
||||
|
||||
#### 2. **Connection Rate (conn/sec)**
|
||||
|
||||
- **What it measures**: How fast new SSE connections are established
|
||||
- **Why it matters**: Indicates system's ability to handle connection spikes
|
||||
- **Good values**:
|
||||
- Light load: 5-10 conn/sec
|
||||
- Medium load: 20-50 conn/sec
|
||||
- Heavy load: 100+ conn/sec
|
||||
|
||||
#### 3. **Time to First Event (TTFE)**
|
||||
|
||||
- **What it measures**: Latency from request sent to first SSE event received
|
||||
- **Why it matters**: Critical for user experience - faster TTFE = better perceived performance
|
||||
- **Good values**:
|
||||
- Excellent: < 50ms
|
||||
- Good: 50-100ms
|
||||
- Acceptable: 100-500ms
|
||||
- Poor: > 500ms
|
||||
|
||||
#### 4. **Event Throughput (events/sec)**
|
||||
|
||||
- **What it measures**: Rate of SSE events being delivered across all connections
|
||||
- **Why it matters**: Shows actual data delivery performance
|
||||
- **Expected values**: Depends on workflow complexity and number of connections
|
||||
- Single connection: 10-20 events/sec
|
||||
- 10 connections: 50-100 events/sec
|
||||
- 100 connections: 200-500 events/sec
|
||||
|
||||
#### 5. **Request/Response Times**
|
||||
|
||||
- **P50 (Median)**: 50% of requests complete within this time
|
||||
- **P95**: 95% of requests complete within this time
|
||||
- **P99**: 99% of requests complete within this time
|
||||
- **Min/Max**: Best and worst case response times
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Dependencies**:
|
||||
|
||||
- Locust runs through `uvx --from locust`, outside the API project environment.
|
||||
- `sseclient-py` is included in the API project dependencies.
|
||||
|
||||
1. **Complete Dify setup**:
|
||||
|
||||
```bash
|
||||
# Run the complete setup
|
||||
python scripts/stress-test/setup_all.py
|
||||
```
|
||||
|
||||
For a brand-new Dify instance, the setup script creates the first admin account. Override the defaults if needed:
|
||||
|
||||
```bash
|
||||
STRESS_TEST_ADMIN_EMAIL='your-admin@example.com' \
|
||||
STRESS_TEST_ADMIN_USERNAME='dify' \
|
||||
STRESS_TEST_ADMIN_PASSWORD='your-password' \
|
||||
python scripts/stress-test/setup_all.py
|
||||
```
|
||||
|
||||
For an already-initialized Dify instance with an admin account, provide the existing admin login:
|
||||
|
||||
```bash
|
||||
STRESS_TEST_ADMIN_EMAIL='your-admin@example.com' \
|
||||
STRESS_TEST_ADMIN_PASSWORD='your-password' \
|
||||
python scripts/stress-test/setup_all.py
|
||||
```
|
||||
|
||||
`STRESS_TEST_ADMIN_USERNAME` is only used in the brand-new instance case, when `/console/api/setup` creates the first admin account.
|
||||
|
||||
1. **Ensure services are running**:
|
||||
|
||||
**IMPORTANT**: For accurate stress testing, run the API server with Gunicorn in production mode:
|
||||
|
||||
```bash
|
||||
# Run from the api directory
|
||||
cd api
|
||||
uv run gunicorn \
|
||||
--bind 0.0.0.0:5001 \
|
||||
--workers 4 \
|
||||
--worker-class gevent \
|
||||
--timeout 120 \
|
||||
--keep-alive 5 \
|
||||
--log-level info \
|
||||
--access-logfile - \
|
||||
--error-logfile - \
|
||||
app:app
|
||||
```
|
||||
|
||||
**Configuration options explained**:
|
||||
|
||||
- `--workers 4`: Number of worker processes (adjust based on CPU cores)
|
||||
- `--worker-class gevent`: Async worker for handling concurrent connections
|
||||
- `--timeout 120`: Worker timeout for long-running requests
|
||||
- `--keep-alive 5`: Keep connections alive for SSE streaming
|
||||
|
||||
**NOT RECOMMENDED for stress testing**:
|
||||
|
||||
```bash
|
||||
# Debug mode - DO NOT use for stress testing (slow performance)
|
||||
./dev/start-api # This runs Flask in debug mode with single-threaded execution
|
||||
```
|
||||
|
||||
**Also start the Mock OpenAI server**:
|
||||
|
||||
```bash
|
||||
python scripts/stress-test/setup/mock_openai_server.py
|
||||
```
|
||||
|
||||
## Running the Stress Test
|
||||
## Run
|
||||
|
||||
```bash
|
||||
# Run with default configuration (headless mode)
|
||||
./scripts/stress-test/run_locust_stress_test.sh
|
||||
|
||||
# Or run directly with uvx
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py --host http://localhost:5001
|
||||
|
||||
# Run with Web UI (access at http://localhost:8089)
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py --host http://localhost:5001 --web-port 8089
|
||||
```
|
||||
|
||||
The script will:
|
||||
The runner checks the API on port 5001, the mock provider on port 5004, and the saved API key. It prompts for headless mode or the Web UI at <http://localhost:8089>. Locust runs in its own environment through `uvx --from locust`.
|
||||
|
||||
1. Validate that all required services are running
|
||||
1. Check API token availability
|
||||
1. Execute the Locust stress test with SSE support
|
||||
1. Generate comprehensive reports in the `reports/` directory
|
||||
|
||||
## Configuration
|
||||
|
||||
The stress test configuration is in `locust.conf`:
|
||||
|
||||
```ini
|
||||
users = 10 # Number of concurrent users
|
||||
spawn-rate = 2 # Users spawned per second
|
||||
run-time = 1m # Test duration (30s, 5m, 1h)
|
||||
headless = true # Run without web UI
|
||||
```
|
||||
|
||||
### Custom Question Sets
|
||||
|
||||
Modify the questions list in `sse_benchmark.py`:
|
||||
|
||||
```python
|
||||
self.questions = [
|
||||
"Your custom question 1",
|
||||
"Your custom question 2",
|
||||
# Add more questions...
|
||||
]
|
||||
```
|
||||
|
||||
## Understanding the Results
|
||||
|
||||
### Report Structure
|
||||
|
||||
After running the stress test, you'll find one directory per run under `reports/`:
|
||||
|
||||
- `YYYYMMDD_HHMMSS/locust_summary.txt` - Complete console output with metrics
|
||||
- `YYYYMMDD_HHMMSS/locust_report.html` - Interactive HTML report with charts
|
||||
- `YYYYMMDD_HHMMSS/locust_stats.csv` - CSV with detailed statistics
|
||||
- `YYYYMMDD_HHMMSS/locust_stats_history.csv` - Time-series data
|
||||
- `YYYYMMDD_HHMMSS/sse_metrics_YYYYMMDD_HHMMSS.json` - Custom SSE metrics
|
||||
|
||||
### Key Metrics
|
||||
|
||||
**Requests Per Second (RPS)**:
|
||||
|
||||
- **Excellent**: > 50 RPS
|
||||
- **Good**: 20-50 RPS
|
||||
- **Acceptable**: 10-20 RPS
|
||||
- **Needs Improvement**: < 10 RPS
|
||||
|
||||
**Response Time Percentiles**:
|
||||
|
||||
- **P50 (Median)**: 50% of requests complete within this time
|
||||
- **P95**: 95% of requests complete within this time
|
||||
- **P99**: 99% of requests complete within this time
|
||||
|
||||
**Success Rate**:
|
||||
|
||||
- Should be > 99% for production readiness
|
||||
- Lower rates indicate errors or timeouts
|
||||
|
||||
### Example Output
|
||||
|
||||
```text
|
||||
============================================================
|
||||
DIFY SSE STRESS TEST
|
||||
============================================================
|
||||
|
||||
[2025-09-12 15:45:44,468] Starting test run with 10 users at 2 users/sec
|
||||
|
||||
============================================================
|
||||
SSE Metrics | Active: 8 | Total Conn: 142 | Events: 2841
|
||||
Rates: 2.4 conn/s | 47.3 events/s | TTFE: 43ms
|
||||
============================================================
|
||||
|
||||
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
|
||||
---------|------------------------------|--------|--------|--------|--------|--------|--------|--------|-----------
|
||||
POST /v1/workflows/run 142 0(0.00%) | 41 18 192 38 | 2.37 0.00
|
||||
---------|------------------------------|--------|--------|--------|--------|--------|--------|--------|-----------
|
||||
Aggregated 142 0(0.00%) | 41 18 192 38 | 2.37 0.00
|
||||
|
||||
============================================================
|
||||
FINAL RESULTS
|
||||
============================================================
|
||||
Total Connections: 142
|
||||
Total Events: 2841
|
||||
Average TTFE: 43 ms
|
||||
============================================================
|
||||
```
|
||||
|
||||
### How to Read the Results
|
||||
|
||||
**Live SSE Metrics Box (Updates every 10 seconds):**
|
||||
|
||||
```text
|
||||
SSE Metrics | Active: 8 | Total Conn: 142 | Events: 2841
|
||||
Rates: 2.4 conn/s | 47.3 events/s | TTFE: 43ms
|
||||
```
|
||||
|
||||
- **Active**: Current number of open SSE connections
|
||||
- **Total Conn**: Cumulative connections established
|
||||
- **Events**: Total SSE events received
|
||||
- **conn/s**: Connection establishment rate
|
||||
- **events/s**: Event delivery rate
|
||||
- **TTFE**: Average time to first event
|
||||
|
||||
**Standard Locust Table:**
|
||||
|
||||
```text
|
||||
Type Name # reqs # fails | Avg Min Max Med | req/s
|
||||
POST /v1/workflows/run 142 0(0.00%) | 41 18 192 38 | 2.37
|
||||
```
|
||||
|
||||
- **Type**: Always POST for our SSE requests
|
||||
- **Name**: The API endpoint being tested
|
||||
- **# reqs**: Total requests made
|
||||
- **# fails**: Failed requests (should be 0)
|
||||
- **Avg/Min/Max/Med**: Response time percentiles (ms)
|
||||
- **req/s**: Request throughput
|
||||
|
||||
**Performance Targets:**
|
||||
|
||||
✅ **Good Performance**:
|
||||
|
||||
- Zero failures (0.00%)
|
||||
- TTFE < 100ms
|
||||
- Stable active connections
|
||||
- Consistent event throughput
|
||||
|
||||
⚠️ **Warning Signs**:
|
||||
|
||||
- Failures > 1%
|
||||
- TTFE > 500ms
|
||||
- Dropping active connections
|
||||
- Declining event rate over time
|
||||
|
||||
## Test Scenarios
|
||||
|
||||
### Light Load
|
||||
|
||||
```yaml
|
||||
concurrency: 10
|
||||
iterations: 100
|
||||
```
|
||||
|
||||
### Normal Load
|
||||
|
||||
```yaml
|
||||
concurrency: 100
|
||||
iterations: 1000
|
||||
```
|
||||
|
||||
### Heavy Load
|
||||
|
||||
```yaml
|
||||
concurrency: 500
|
||||
iterations: 5000
|
||||
```
|
||||
|
||||
### Stress Test
|
||||
|
||||
```yaml
|
||||
concurrency: 1000
|
||||
iterations: 10000
|
||||
```
|
||||
|
||||
## Performance Tuning
|
||||
|
||||
### API Server Optimization
|
||||
|
||||
**Gunicorn Tuning for Different Load Levels**:
|
||||
For headless runs, the wrapper reads `users`, `spawn-rate`, and `run-time` from [`locust.conf`](locust.conf). To set options directly, invoke Locust from the repository root:
|
||||
|
||||
```bash
|
||||
# Light load (10-50 concurrent users)
|
||||
uv run gunicorn --bind 0.0.0.0:5001 --workers 2 --worker-class gevent app:app
|
||||
|
||||
# Medium load (50-200 concurrent users)
|
||||
uv run gunicorn --bind 0.0.0.0:5001 --workers 4 --worker-class gevent --worker-connections 1000 app:app
|
||||
|
||||
# Heavy load (200-1000 concurrent users)
|
||||
uv run gunicorn --bind 0.0.0.0:5001 --workers 8 --worker-class gevent --worker-connections 2000 --max-requests 1000 app:app
|
||||
```
|
||||
|
||||
**Worker calculation formula**:
|
||||
|
||||
- Workers = (2 × CPU cores) + 1
|
||||
- For SSE/WebSocket: Use gevent worker class
|
||||
- For CPU-bound tasks: Use sync workers
|
||||
|
||||
### Database Optimization
|
||||
|
||||
**PostgreSQL Connection Pool Tuning**:
|
||||
|
||||
For high-concurrency stress testing, increase the PostgreSQL max connections in `docker/middleware.env`:
|
||||
|
||||
```bash
|
||||
# Edit docker/middleware.env
|
||||
POSTGRES_MAX_CONNECTIONS=200 # Default is 100
|
||||
|
||||
# Recommended values for different load levels:
|
||||
# Light load (10-50 users): 100 (default)
|
||||
# Medium load (50-200 users): 200
|
||||
# Heavy load (200-1000 users): 500
|
||||
```
|
||||
|
||||
After changing, restart the PostgreSQL container:
|
||||
|
||||
```bash
|
||||
docker compose -f docker/docker-compose.middleware.yaml down db
|
||||
docker compose -f docker/docker-compose.middleware.yaml up -d db
|
||||
```
|
||||
|
||||
**Note**: Each connection uses ~10MB of RAM. Ensure your database server has sufficient memory:
|
||||
|
||||
- 100 connections: ~1GB RAM
|
||||
- 200 connections: ~2GB RAM
|
||||
- 500 connections: ~5GB RAM
|
||||
|
||||
### System Optimizations
|
||||
|
||||
1. **Increase file descriptor limits**:
|
||||
|
||||
```bash
|
||||
ulimit -n 65536
|
||||
```
|
||||
|
||||
1. **TCP tuning for high concurrency** (Linux):
|
||||
|
||||
```bash
|
||||
# Increase TCP buffer sizes
|
||||
sudo sysctl -w net.core.rmem_max=134217728
|
||||
sudo sysctl -w net.core.wmem_max=134217728
|
||||
|
||||
# Enable TCP fast open
|
||||
sudo sysctl -w net.ipv4.tcp_fastopen=3
|
||||
```
|
||||
|
||||
1. **macOS specific**:
|
||||
|
||||
```bash
|
||||
# Increase maximum connections
|
||||
sudo sysctl -w kern.ipc.somaxconn=2048
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **"ModuleNotFoundError: No module named 'locust'"**:
|
||||
|
||||
```bash
|
||||
# Locust is intentionally run outside the api project environment:
|
||||
uvx --from locust locust --version
|
||||
```
|
||||
|
||||
1. **"API key configuration not found"**:
|
||||
|
||||
```bash
|
||||
# Run setup
|
||||
python scripts/stress-test/setup_all.py
|
||||
```
|
||||
|
||||
1. **Services not running**:
|
||||
|
||||
```bash
|
||||
# Start Dify API with Gunicorn (production mode)
|
||||
cd api
|
||||
uv run gunicorn --bind 0.0.0.0:5001 --workers 4 --worker-class gevent app:app
|
||||
|
||||
# Start Mock OpenAI server
|
||||
python scripts/stress-test/setup/mock_openai_server.py
|
||||
```
|
||||
|
||||
1. **High error rate**:
|
||||
|
||||
- Reduce concurrency level
|
||||
- Check system resources (CPU, memory)
|
||||
- Review API server logs for errors
|
||||
- Increase timeout values if needed
|
||||
|
||||
1. **Permission denied running script**:
|
||||
|
||||
```bash
|
||||
chmod +x run_benchmark.sh
|
||||
```
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Running Multiple Iterations
|
||||
|
||||
```bash
|
||||
# Run stress test 3 times with 60-second intervals
|
||||
for i in {1..3}; do
|
||||
echo "Run $i of 3"
|
||||
./run_locust_stress_test.sh
|
||||
sleep 60
|
||||
done
|
||||
```
|
||||
|
||||
### Custom Locust Options
|
||||
|
||||
Run Locust directly with custom options:
|
||||
|
||||
```bash
|
||||
# With specific user count and spawn rate
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py \
|
||||
--host http://localhost:5001 --users 50 --spawn-rate 5
|
||||
|
||||
# Generate CSV reports
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py \
|
||||
--host http://localhost:5001 --csv reports/results
|
||||
|
||||
# Run for specific duration
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py \
|
||||
--host http://localhost:5001 --run-time 5m --headless
|
||||
--host http://localhost:5001 --users 50 --spawn-rate 5 \
|
||||
--run-time 1m --headless
|
||||
```
|
||||
|
||||
### Comparing Results
|
||||
For the Web UI:
|
||||
|
||||
```bash
|
||||
# Compare multiple stress test runs
|
||||
ls -la scripts/stress-test/reports/*/locust_summary.txt | tail -5
|
||||
uvx --from locust locust -f scripts/stress-test/sse_benchmark.py \
|
||||
--host http://localhost:5001 --web-port 8089
|
||||
```
|
||||
|
||||
## Interpreting Performance Issues
|
||||
The wrapper fixes the target to localhost; use the direct invocation to change the host. Direct invocations must set their own options or explicitly load `scripts/stress-test/locust.conf` with `--config`.
|
||||
|
||||
### High Response Times
|
||||
## Workload configuration
|
||||
|
||||
Possible causes:
|
||||
[`sse_benchmark.py`](sse_benchmark.py) reads these environment variables:
|
||||
|
||||
- Database query performance
|
||||
- External API latency
|
||||
- Insufficient server resources
|
||||
- Network congestion
|
||||
| Variable | Default | Purpose |
|
||||
| --- | --- | --- |
|
||||
| `WORKFLOW_PATH` | `/v1/workflows/run` | Request path |
|
||||
| `CONNECT_TIMEOUT` | `10` | Connection timeout in seconds |
|
||||
| `READ_TIMEOUT` | `60` | Stream read timeout in seconds |
|
||||
| `TERMINAL_EVENTS` | `workflow_finished,error` | Comma-separated terminal event names |
|
||||
| `QUESTIONS_FILE` | Empty | Text file with one nonempty question per line; otherwise uses built-in questions |
|
||||
| `WAIT_TIME` | `0` | `0` sends the next request immediately; any other value selects a random 1–3 second wait |
|
||||
|
||||
### Low Throughput (RPS < 10)
|
||||
Requests pass the selected question as `inputs.question`. Keep this aligned with the benchmark workflow. A custom question file avoids editing the benchmark source.
|
||||
|
||||
Check for:
|
||||
## Reports and interpretation
|
||||
|
||||
- CPU bottlenecks
|
||||
- Memory constraints
|
||||
- Database connection pooling
|
||||
- API rate limiting
|
||||
Headless wrapper runs create `scripts/stress-test/reports/YYYYMMDD_HHMMSS/` containing:
|
||||
|
||||
### High Error Rate
|
||||
- `locust_summary.txt`: console output.
|
||||
- `locust_report.html`: Locust report.
|
||||
- `locust_stats.csv` and `locust_stats_history.csv`: request statistics.
|
||||
- `sse_metrics_YYYYMMDD_HHMMSS.json`: custom SSE metrics.
|
||||
|
||||
Investigate:
|
||||
Direct runs write custom SSE JSON under `scripts/stress-test/reports/`; request CSV or HTML explicitly with Locust options. Live SSE metrics update every five seconds.
|
||||
|
||||
- Server error logs
|
||||
- Resource exhaustion
|
||||
- Timeout configurations
|
||||
- Connection limits
|
||||
Compare results with the same workflow, mock response behavior, hardware, worker configuration, and load profile. TTFE measures arrival of the first SSE event, not necessarily the first model token. Use the custom stream-duration metrics to assess stream completion separately from the standard Locust request timings. This mock-provider workload does not establish real-model latency or a universal production capacity threshold.
|
||||
|
||||
## Why Locust?
|
||||
For failures, inspect API, worker, plugin-daemon, and mock-server logs. Check timeouts, CPU, memory, database connections, and client resource limits before changing concurrency or server settings.
|
||||
|
||||
Locust was chosen over Drill for this stress test because:
|
||||
## Maintenance
|
||||
|
||||
1. **Proper SSE Support**: Correctly handles streaming responses without premature closure
|
||||
1. **Custom Metrics**: Can track SSE-specific metrics like TTFE and stream duration
|
||||
1. **Web UI**: Real-time monitoring and control via web interface
|
||||
1. **Python Integration**: Seamlessly integrates with existing Python setup code
|
||||
1. **Extensibility**: Easy to customize for specific testing scenarios
|
||||
- Setup and fixture provisioning: `setup_all.py` and `setup/`.
|
||||
- Load defaults: `locust.conf`.
|
||||
- Stream parsing and metrics: `sse_benchmark.py`.
|
||||
- Service checks and report collection: `run_locust_stress_test.sh`.
|
||||
|
||||
## Contributing
|
||||
|
||||
To improve the stress test suite:
|
||||
|
||||
1. Edit `stress_test.yml` for configuration changes
|
||||
1. Modify `run_locust_stress_test.sh` for workflow improvements
|
||||
1. Update question sets for better coverage
|
||||
1. Add new metrics or analysis features
|
||||
`cleanup.py` removes local setup state and reports, not the resources created in Dify. Preserve reports you need before running it; it asks for confirmation only in an interactive terminal.
|
||||
|
||||
+8
-21
@@ -1,25 +1,12 @@
|
||||
# SDK
|
||||
# SDKs
|
||||
|
||||
## Java
|
||||
## In this repository
|
||||
|
||||
https://github.com/langgenius/java-client/
|
||||
- [Node.js](nodejs-client/README.md)
|
||||
- [PHP](php-client/README.md)
|
||||
|
||||
## Go
|
||||
## Separate repositories
|
||||
|
||||
https://github.com/langgenius/dify-sdk-go
|
||||
|
||||
## Ruby
|
||||
|
||||
https://github.com/langgenius/ruby-sdk
|
||||
|
||||
## Python
|
||||
|
||||
TODO move to another place
|
||||
|
||||
## PHP
|
||||
|
||||
TODO move to another place
|
||||
|
||||
## Node.js
|
||||
|
||||
TODO move to another place
|
||||
- [Java](https://github.com/langgenius/java-client/)
|
||||
- [Go](https://github.com/langgenius/dify-sdk-go)
|
||||
- [Ruby](https://github.com/langgenius/ruby-sdk)
|
||||
|
||||
@@ -11,12 +11,12 @@ This is the PHP SDK for the Dify API, which allows you to easily integrate Dify
|
||||
|
||||
If you want to try the example, you can run `composer install` in this directory.
|
||||
|
||||
In exist project, copy the `dify-client.php` to you project, and merge the following to your `composer.json` file, then run `composer install && composer dump-autoload` to install. Guzzle does not require 7.9, other versions have not been tested, but you can try.
|
||||
For an existing project, copy `dify-client.php` into your project and merge the following into `composer.json`, then run `composer install` and `composer dump-autoload`. Keep the dependency requirements aligned with this directory’s `composer.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^7.9"
|
||||
"guzzlehttp/guzzle": "^7.15.2"
|
||||
},
|
||||
"autoload": {
|
||||
"files": ["path/to/dify-client.php"]
|
||||
@@ -32,6 +32,7 @@ After installing the SDK, you can use it in your project like this:
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$apiKey = 'your-api-key-here';
|
||||
$conversation_id = null; // Start a new conversation.
|
||||
|
||||
$difyClient = new DifyClient($apiKey);
|
||||
|
||||
@@ -55,14 +56,14 @@ $fileForVision = [
|
||||
// [
|
||||
// "type" => "image",
|
||||
// "transfer_method" => "local_file",
|
||||
// "url" => "your_file_id"
|
||||
// "upload_file_id" => "your_file_id"
|
||||
// ]
|
||||
// ];
|
||||
|
||||
// Create a completion client with vision model like gpt-4-vision
|
||||
// Create a completion client with a vision-capable model
|
||||
$response = $completionClient->create_completion_message(array("query" => "Describe this image."), "blocking", "user_id", $fileForVision);
|
||||
|
||||
// Create a chat client with vision model like gpt-4-vision
|
||||
// Create a chat client with a vision-capable model
|
||||
$response = $chatClient->create_chat_message(array(), "Describe this image.", "user_id", "blocking", $conversation_id, $fileForVision);
|
||||
|
||||
// File Upload
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ docker build -f web/Dockerfile -t dify-web .
|
||||
If you want to customize the host and port:
|
||||
|
||||
```bash
|
||||
pnpm -C web run start --port=3001 --host=0.0.0.0
|
||||
PORT=3001 HOSTNAME=0.0.0.0 pnpm -C web run start
|
||||
```
|
||||
|
||||
### Vinext standalone Node server
|
||||
@@ -117,7 +117,7 @@ Open <http://localhost:6006> with your browser to see the result.
|
||||
|
||||
## Lint Code
|
||||
|
||||
If your IDE is VSCode, rename `.vscode/settings.example.json` to `.vscode/settings.json` for lint code setting.
|
||||
For VS Code, copy `.vscode/settings.example.json` to `.vscode/settings.json`, or merge it into your existing settings.
|
||||
|
||||
Then follow the [Lint Documentation] to lint the code.
|
||||
|
||||
|
||||
@@ -184,40 +184,6 @@ session controller mounted and renders its translation consumer only when the
|
||||
checklist, guide, or recovery prompt is visible. Preserve all existing locale
|
||||
values and language-specific plural forms when moving keys.
|
||||
|
||||
### Provider trial verification
|
||||
|
||||
On 2026-09-23, the production Vinext standalone build was checked in fresh
|
||||
Chromium contexts using local system-features and unauthenticated API fixtures.
|
||||
English and Simplified Chinese sign-in rendered correctly after hydration without
|
||||
runtime or hydration errors. The raw HTML contains the shell and a loading spinner,
|
||||
not the login form: `NormalForm` waits for the client account-profile probe. This
|
||||
browser check does not establish that the complete login form is server-rendered.
|
||||
English hydration requested `en-US/login`; Chinese hydration
|
||||
requested `zh-Hans/login` and `en-US/login`. Switching English to Chinese requested
|
||||
only `zh-Hans/common` and `zh-Hans/login`. Navigation to sign-up and back preserved
|
||||
Chinese and requested no additional translation modules. These counts use the
|
||||
client build manifest, exclude loader modules, and are not backend latency metrics.
|
||||
Authenticated feature navigation remains unverified.
|
||||
|
||||
### Streaming resource verification
|
||||
|
||||
The Chromium hydration regression renders the real creation menu on the server,
|
||||
collects its dictionaries, and hydrates with client backend requests held pending.
|
||||
Its first click opens the menu without disabling the trigger or retrying the click.
|
||||
It also verifies that a later resource update reaches the mounted Provider before
|
||||
its feature renders. Unit coverage checks incremental collection, fallback
|
||||
languages, Provider isolation, and inline-script escaping.
|
||||
|
||||
A production Next.js sign-in check with controlled unauthenticated API fixtures
|
||||
confirmed English and Chinese `login` resources in the HTML stream, no repeated
|
||||
login translation chunk requests, and no browser hydration errors. Production
|
||||
Vinext validation remains pending; its build was stopped to limit local resource
|
||||
usage. The complete authenticated Agent creation journey must still pass CI.
|
||||
|
||||
Empty-store coverage also verifies shell rendering without an enclosing Suspense
|
||||
boundary, concurrent locale/fallback rendering, and hydration of both `common`
|
||||
and feature namespaces without duplicate backend requests.
|
||||
|
||||
[`i18next-resources-for-ts`]: https://github.com/i18next/i18next-resources-for-ts
|
||||
[official TypeScript guidance]: https://www.i18next.com/overview/typescript
|
||||
[plural rules]: https://www.i18next.com/translation-function/plurals
|
||||
|
||||
Reference in New Issue
Block a user