Skip to content

Commit c1aa473

Browse files
authored
Merge pull request #73 from apconw/dev
v1.1.3版本
2 parents 0bf80de + 9b09914 commit c1aa473

49 files changed

Lines changed: 3052 additions & 2864 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.dev

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ MYSQL_DATABASE=chat_db
1010
DIFY_SERVER_URL="http://127.0.0.1:18000"
1111

1212
# Dify 数据问答画布key
13-
DIFY_DATABASE_QA_API_KEY="app-AXDUw8TtcY7N6TMGHkPaC4VF"
13+
DIFY_DATABASE_QA_API_KEY="app-i6hHQ1u9BEqzkL3PYZh9Rqrk"
1414

1515
# minio
1616
MINIO_ENDPOINT=localhost:19000
17-
MINIO_ACCESS_KEY=sIR5eeDkiwoo779yNJbw
18-
MiNIO_SECRET_KEY=MreuQ3aC1ymHJeo3QfzSg7aPz7PqlxeOw39nZUdE
17+
MINIO_ACCESS_KEY=A1TwSUF3NCdh1qdA3zUO
18+
MiNIO_SECRET_KEY=KYvzplcksgLEii1fm2MpIZscuFTXh65BDIr6Jg1J
1919

2020
#关闭pandas-ai匿名收集信息
2121
SCARF_NO_ANALYTICS=true

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ __pycache__/
55

66
tests/
77
docker/volume/
8-
docker/dify/volume/
8+
docker/dify/volumes/*
9+
!docker/dify/docker/volumes/myscale/config/users.d/custom_users_config.xml
10+
!docker/dify/docker/volumes/oceanbase/init.d/vec_memory.sql
11+
!docker/dify/docker/volumes/opensearch/opensearch_dashboards.yml
12+
!docker/dify/docker/volumes/sandbox/conf/config.yaml
13+
!docker/dify/docker/volumes/sandbox/conf/config.yaml.example
14+
!docker/dify/docker/volumes/sandbox/dependencies/python-requirements.txt
15+
16+
17+
18+
919

1020
web/node_modules/
1121
web/dist/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include web/Makefile
55
SERVER_PROJECT_NAME = sanic-web
66

77
# 服务端 Docker 镜像标签
8-
SERVER_DOCKER_IMAGE = apconw/$(SERVER_PROJECT_NAME):1.1.2
8+
SERVER_DOCKER_IMAGE = apconw/$(SERVER_PROJECT_NAME):1.1.3
99

1010

1111
# 构建 Vue 3 前端项目镜像

controllers/user_service_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ async def query_user_qa_record(request):
4949
"""
5050
page = int(request.json.get("page", 1))
5151
limit = int(request.json.get("limit", 10))
52+
search_text = request.json.get("search_text")
5253
user_info = await get_user_info(request)
53-
return await query_user_record(user_info["id"], page, limit)
54+
return await query_user_record(user_info["id"], page, limit, search_text)
5455

5556

5657
@bp.post("/delete_user_record")

docker/dify/docker/.env

Lines changed: 108 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# ------------------------------
66
# Common Variables
77
# ------------------------------
8-
98
# service 服务名称
109
COMPOSE_PROJECT_NAME=dify_service
1110

@@ -42,6 +41,12 @@ APP_WEB_URL=
4241
# File preview or download Url prefix.
4342
# used to display File preview or download Url to the front-end or as Multi-model inputs;
4443
# Url is signed and has expiration time.
44+
# Setting FILES_URL is required for file processing plugins.
45+
# - For https://example.com, use FILES_URL=https://example.com
46+
# - For http://example.com, use FILES_URL=http://example.com
47+
# Recommendation: use a dedicated domain (e.g., https://upload.example.com).
48+
# Alternatively, use http://<your-ip>:5001 or http://api:5001,
49+
# ensuring port 5001 is externally accessible (see docker-compose.yaml).
4550
FILES_URL=
4651

4752
# ------------------------------
@@ -71,15 +76,15 @@ DEBUG=false
7176
# which is convenient for debugging.
7277
FLASK_DEBUG=false
7378

74-
# A secretkey that is used for securely signing the session cookie
79+
# A secret key that is used for securely signing the session cookie
7580
# and encrypting sensitive information on the database.
7681
# You can generate a strong key using `openssl rand -base64 42`.
7782
SECRET_KEY=sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U
7883

7984
# Password for admin user initialization.
8085
# If left unset, admin user will not be prompted for a password
81-
# when creating the initial admin account.
82-
# The length of the password cannot exceed 30 charactors.
86+
# when creating the initial admin account.
87+
# The length of the password cannot exceed 30 characters.
8388
INIT_PASSWORD=
8489

8590
# Deployment environment.
@@ -177,6 +182,12 @@ CELERY_MIN_WORKERS=
177182
API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
178183
API_TOOL_DEFAULT_READ_TIMEOUT=60
179184

185+
# -------------------------------
186+
# Datasource Configuration
187+
# --------------------------------
188+
ENABLE_WEBSITE_JINAREADER=true
189+
ENABLE_WEBSITE_FIRECRAWL=true
190+
ENABLE_WEBSITE_WATERCRAWL=true
180191

181192
# ------------------------------
182193
# Database Configuration
@@ -386,7 +397,7 @@ SUPABASE_URL=your-server-url
386397
# ------------------------------
387398

388399
# The type of vector store to use.
389-
# Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `tidb_vector`, `oracle`, `tencent`, `elasticsearch`, `elasticsearch-ja`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`, `opengauss`.
400+
# Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `oracle`, `tencent`, `elasticsearch`, `elasticsearch-ja`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`, `opengauss`, `tablestore`,`vastbase`,`tidb`,`tidb_on_qdrant`,`baidu`,`lindorm`,`huawei_cloud`,`upstash`.
390401
VECTOR_STORE=weaviate
391402

392403
# The Weaviate endpoint URL. Only available when VECTOR_STORE is `weaviate`.
@@ -403,10 +414,12 @@ QDRANT_GRPC_PORT=6334
403414
# Milvus configuration. Only available when VECTOR_STORE is `milvus`.
404415
# The milvus uri.
405416
MILVUS_URI=http://host.docker.internal:19530
417+
MILVUS_DATABASE=
406418
MILVUS_TOKEN=
407419
MILVUS_USER=
408420
MILVUS_PASSWORD=
409421
MILVUS_ENABLE_HYBRID_SEARCH=False
422+
MILVUS_ANALYZER_PARAMS=
410423

411424
# MyScale configuration, only available when VECTOR_STORE is `myscale`
412425
# For multi-language support, please set MYSCALE_FTS_PARAMS with referring to:
@@ -437,6 +450,15 @@ PGVECTOR_MAX_CONNECTION=5
437450
PGVECTOR_PG_BIGM=false
438451
PGVECTOR_PG_BIGM_VERSION=1.2-20240606
439452

453+
# vastbase configurations, only available when VECTOR_STORE is `vastbase`
454+
VASTBASE_HOST=vastbase
455+
VASTBASE_PORT=5432
456+
VASTBASE_USER=dify
457+
VASTBASE_PASSWORD=Difyai123456
458+
VASTBASE_DATABASE=dify
459+
VASTBASE_MIN_CONNECTION=1
460+
VASTBASE_MAX_CONNECTION=5
461+
440462
# pgvecto-rs configurations, only available when VECTOR_STORE is `pgvecto-rs`
441463
PGVECTO_RS_HOST=pgvecto-rs
442464
PGVECTO_RS_PORT=5432
@@ -506,9 +528,13 @@ RELYT_DATABASE=postgres
506528
# open search configuration, only available when VECTOR_STORE is `opensearch`
507529
OPENSEARCH_HOST=opensearch
508530
OPENSEARCH_PORT=9200
531+
OPENSEARCH_SECURE=true
532+
OPENSEARCH_AUTH_METHOD=basic
509533
OPENSEARCH_USER=admin
510534
OPENSEARCH_PASSWORD=admin
511-
OPENSEARCH_SECURE=true
535+
# If using AWS managed IAM, e.g. Managed Cluster or OpenSearch Serverless
536+
OPENSEARCH_AWS_REGION=ap-southeast-1
537+
OPENSEARCH_AWS_SERVICE=aoss
512538

513539
# tencent vector configurations, only available when VECTOR_STORE is `tencent`
514540
TENCENT_VECTOR_DB_URL=http://127.0.0.1
@@ -518,6 +544,7 @@ TENCENT_VECTOR_DB_USERNAME=dify
518544
TENCENT_VECTOR_DB_DATABASE=dify
519545
TENCENT_VECTOR_DB_SHARD=1
520546
TENCENT_VECTOR_DB_REPLICAS=2
547+
TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH=false
521548

522549
# ElasticSearch configuration, only available when VECTOR_STORE is `elasticsearch`
523550
ELASTICSEARCH_HOST=0.0.0.0
@@ -548,6 +575,7 @@ VIKINGDB_SOCKET_TIMEOUT=30
548575
LINDORM_URL=http://lindorm:30070
549576
LINDORM_USERNAME=lindorm
550577
LINDORM_PASSWORD=lindorm
578+
LINDORM_QUERY_TIMEOUT=1
551579

552580
# OceanBase Vector configuration, only available when VECTOR_STORE is `oceanbase`
553581
OCEANBASE_VECTOR_HOST=oceanbase
@@ -557,6 +585,7 @@ OCEANBASE_VECTOR_PASSWORD=difyai123456
557585
OCEANBASE_VECTOR_DATABASE=test
558586
OCEANBASE_CLUSTER_NAME=difyai
559587
OCEANBASE_MEMORY_LIMIT=6G
588+
OCEANBASE_ENABLE_HYBRID_SEARCH=false
560589

561590
# opengauss configurations, only available when VECTOR_STORE is `opengauss`
562591
OPENGAUSS_HOST=opengauss
@@ -566,11 +595,24 @@ OPENGAUSS_PASSWORD=Dify@123
566595
OPENGAUSS_DATABASE=dify
567596
OPENGAUSS_MIN_CONNECTION=1
568597
OPENGAUSS_MAX_CONNECTION=5
598+
OPENGAUSS_ENABLE_PQ=false
599+
600+
# huawei cloud search service vector configurations, only available when VECTOR_STORE is `huawei_cloud`
601+
HUAWEI_CLOUD_HOSTS=https://127.0.0.1:9200
602+
HUAWEI_CLOUD_USER=admin
603+
HUAWEI_CLOUD_PASSWORD=admin
569604

570605
# Upstash Vector configuration, only available when VECTOR_STORE is `upstash`
571606
UPSTASH_VECTOR_URL=https://xxx-vector.upstash.io
572607
UPSTASH_VECTOR_TOKEN=dify
573608

609+
# TableStore Vector configuration
610+
# (only used when VECTOR_STORE is tablestore)
611+
TABLESTORE_ENDPOINT=https://instance-name.cn-hangzhou.ots.aliyuncs.com
612+
TABLESTORE_INSTANCE_NAME=instance-name
613+
TABLESTORE_ACCESS_KEY_ID=xxx
614+
TABLESTORE_ACCESS_KEY_SECRET=xxx
615+
574616
# ------------------------------
575617
# Knowledge Configuration
576618
# ------------------------------
@@ -598,17 +640,22 @@ SCARF_NO_ANALYTICS=true
598640
# ------------------------------
599641

600642
# The maximum number of tokens allowed for prompt generation.
601-
# This setting controls the upper limit of tokens that can be used by the LLM
643+
# This setting controls the upper limit of tokens that can be used by the LLM
602644
# when generating a prompt in the prompt generation tool.
603645
# Default: 512 tokens.
604646
PROMPT_GENERATION_MAX_TOKENS=512
605647

606648
# The maximum number of tokens allowed for code generation.
607-
# This setting controls the upper limit of tokens that can be used by the LLM
649+
# This setting controls the upper limit of tokens that can be used by the LLM
608650
# when generating code in the code generation tool.
609651
# Default: 1024 tokens.
610652
CODE_GENERATION_MAX_TOKENS=1024
611653

654+
# Enable or disable plugin based token counting. If disabled, token counting will return 0.
655+
# This can improve performance by skipping token counting operations.
656+
# Default: false (disabled).
657+
PLUGIN_BASED_TOKEN_COUNTING_ENABLED=false
658+
612659
# ------------------------------
613660
# Multi-modal Configuration
614661
# ------------------------------
@@ -725,6 +772,12 @@ MAX_VARIABLE_SIZE=204800
725772
WORKFLOW_PARALLEL_DEPTH_LIMIT=3
726773
WORKFLOW_FILE_UPLOAD_LIMIT=10
727774

775+
# Workflow storage configuration
776+
# Options: rdbms, hybrid
777+
# rdbms: Use only the relational database (default)
778+
# hybrid: Save new data to object storage, read from both object storage and RDBMS
779+
WORKFLOW_NODE_EXECUTION_STORAGE=rdbms
780+
728781
# HTTP request node in workflow configuration
729782
HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760
730783
HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576
@@ -744,6 +797,9 @@ MAX_TOOLS_NUM=10
744797
# Maximum number of Parallelism branches in the workflow
745798
MAX_PARALLEL_LIMIT=10
746799

800+
# The maximum number of iterations for agent setting
801+
MAX_ITERATIONS_NUM=5
802+
747803
# ------------------------------
748804
# Environment Variables for web Service
749805
# ------------------------------
@@ -811,7 +867,7 @@ CHROMA_IS_PERSISTENT=TRUE
811867

812868
# ------------------------------
813869
# Environment Variables for Oracle Service
814-
# (only used when VECTOR_STORE is Oracle)
870+
# (only used when VECTOR_STORE is oracle)
815871
# ------------------------------
816872
ORACLE_PWD=Dify123456
817873
ORACLE_CHARACTERSET=AL32UTF8
@@ -995,3 +1051,46 @@ PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
9951051
PLUGIN_MAX_EXECUTION_TIMEOUT=600
9961052
# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
9971053
PIP_MIRROR_URL=
1054+
1055+
# https://github.com/langgenius/dify-plugin-daemon/blob/main/.env.example
1056+
# Plugin storage type, local aws_s3 tencent_cos azure_blob
1057+
PLUGIN_STORAGE_TYPE=local
1058+
PLUGIN_STORAGE_LOCAL_ROOT=/app/storage
1059+
PLUGIN_WORKING_PATH=/app/storage/cwd
1060+
PLUGIN_INSTALLED_PATH=plugin
1061+
PLUGIN_PACKAGE_CACHE_PATH=plugin_packages
1062+
PLUGIN_MEDIA_CACHE_PATH=assets
1063+
# Plugin oss bucket
1064+
PLUGIN_STORAGE_OSS_BUCKET=
1065+
# Plugin oss s3 credentials
1066+
PLUGIN_S3_USE_AWS_MANAGED_IAM=false
1067+
PLUGIN_S3_ENDPOINT=
1068+
PLUGIN_S3_USE_PATH_STYLE=false
1069+
PLUGIN_AWS_ACCESS_KEY=
1070+
PLUGIN_AWS_SECRET_KEY=
1071+
PLUGIN_AWS_REGION=
1072+
# Plugin oss azure blob
1073+
PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME=
1074+
PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING=
1075+
# Plugin oss tencent cos
1076+
PLUGIN_TENCENT_COS_SECRET_KEY=
1077+
PLUGIN_TENCENT_COS_SECRET_ID=
1078+
PLUGIN_TENCENT_COS_REGION=
1079+
1080+
# ------------------------------
1081+
# OTLP Collector Configuration
1082+
# ------------------------------
1083+
ENABLE_OTEL=false
1084+
OTLP_BASE_ENDPOINT=http://localhost:4318
1085+
OTLP_API_KEY=
1086+
OTEL_EXPORTER_TYPE=otlp
1087+
OTEL_SAMPLING_RATE=0.1
1088+
OTEL_BATCH_EXPORT_SCHEDULE_DELAY=5000
1089+
OTEL_MAX_QUEUE_SIZE=2048
1090+
OTEL_MAX_EXPORT_BATCH_SIZE=512
1091+
OTEL_METRIC_EXPORT_INTERVAL=60000
1092+
OTEL_BATCH_EXPORT_TIMEOUT=10000
1093+
OTEL_METRIC_EXPORT_TIMEOUT=30000
1094+
1095+
# Prevent Clickjacking
1096+
ALLOW_EMBED=false

0 commit comments

Comments
 (0)