You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONFIG.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ First, select the operation mode in plugin credentials:
62
62
- Recommended for production environments
63
63
- Supports high concurrency
64
64
- Write operations (Add/Update/Delete/Delete_All): non-blocking, return ACCEPT status immediately
65
-
- Read operations (Search/Get/Get_All/History): wait for results with timeout protection (default: 30s)
65
+
- Read operations (Search/Get/Get_All/History): wait for results with timeout protection (default: 5s)
66
66
67
67
-**Sync Mode** (`async_mode=false`)
68
68
- Recommended for testing environments
@@ -116,14 +116,14 @@ After installation, click on the `mem0ai` plugin to configure it. You'll see cre
116
116
You can configure the following performance parameters in plugin settings to optimize concurrency and database connections for production environments:
117
117
118
118
**Performance Parameters:**
119
-
-`max_concurrent_memory_operations` - Maximum concurrent memory operations (default: 40)
119
+
-`max_concurrent_memory_operations` - Maximum concurrent memory operations (default: 20)
120
120
- Applies to all operations including search/add/get/get_all/update/delete/delete_all/history
121
121
- Must be a positive integer (>= 1)
122
-
- Invalid values (<= 0 or cannot be converted to integer) will use default value 40 with warning logs
122
+
- Invalid values (<= 0 or cannot be converted to integer) will use default value 20 with warning logs
123
123
124
124
**Concurrency Configuration Logic:**
125
125
-**`max_concurrent_memory_operations` configured**: Uses the configured value directly
126
-
-**Not configured**: Uses default value (40)
126
+
-**Not configured**: Uses default value (20)
127
127
-**Invalid values** (cannot be converted to positive integers): Uses default values and logs a warning
128
128
-**Unset or empty values**: Uses default values and logs a warning
129
129
@@ -276,8 +276,8 @@ The plugin automatically creates a psycopg3 ConnectionPool when `connection_stri
-**Important**: If you previously used `pgvector_min_connections` and `pgvector_max_connections` credential fields, you must now configure them in the `local_vector_db_json_secret` JSON config:
225
-
- Add `"minconn": 10` and `"maxconn": 40` to your pgvector config JSON (see [CONFIG.md](https://github.com/beersoccer/mem0_dify_plugin/blob/main/CONFIG.md#vector-store-configuration-local_vector_db_json_secret) for examples)
225
+
- Add `"minconn": 10` and `"maxconn": 20` to your pgvector config JSON (or set `maxconn` to match your `max_concurrent_memory_operations`, default: 20). See [CONFIG.md](https://github.com/beersoccer/mem0_dify_plugin/blob/main/CONFIG.md#vector-store-configuration-local_vector_db_json_secret) for examples.
226
226
- These fields are no longer available as separate credential fields
227
227
- Use the same configuration values you backed up in step 1
228
228
- Save the configuration
@@ -243,7 +243,7 @@ Note: `extract_long_term_memory` uses `conversations_limit` as the per-user tota
243
243
**New Features:**
244
244
-**Dynamic Log Level**: You can now change log level (INFO/DEBUG/WARNING/ERROR) in plugin credentials without redeployment
245
245
-**Request Tracing**: All tools now support `run_id` parameter for better call chain tracking (recommended to use Dify's `workflow_run_id`)
246
-
-**Timeout Optimization**: Read operation timeout reduced to 15 seconds for better responsiveness
246
+
-**Timeout Optimization**: Read operation timeout is tuned for responsiveness (current default: 5s, configurable per tool)
DIFY_BASE_URL="http://<your-dify-host>/v1"# Base URL for remote testing (overrides --host if set)
61
61
DIFY_ENDPOINT="/chat-messages"
62
62
DIFY_QUERY="<your-custom-query>"
63
-
DIFY_USER_ID="<user_a>"#Single user, or comma-separated list: "<user_a>,<user_b>"
63
+
DIFY_USER_COUNT=5#参与测试的用户数量,实际用户 ID 为 user1..userN(默认 5)
64
64
DIFY_RESPONSE_MODE="streaming"
65
65
DIFY_MIN_TURNS=3 # Minimum number of follow-up conversation turns (default: 3)
66
66
DIFY_MAX_TURNS=5 # Maximum number of follow-up conversation turns (default: 5)
@@ -70,7 +70,7 @@ The script will automatically load variables from `performance/.env` if it exist
70
70
71
71
**Note**:
72
72
- The conversation will have 3-5 follow-up turns (randomly selected) after the initial message. This simulates multi-turn conversations that can trigger long-term memory extraction.
73
-
- If `DIFY_USER_ID` contains multiple users (comma-separated), each request will randomly select one user from the list. This allows testing with different user contexts.
73
+
- If `DIFY_USER_COUNT` is an integer N, each request will randomly select one user from user1..userN. This allows testing with different user contexts.
74
74
- Use a base URL ending with `/v1` and endpoints starting with `/chat-messages` and `/messages/...` to match the Dify API structure.
Copy file name to clipboardExpand all lines: provider/mem0ai.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -94,13 +94,13 @@ credentials_for_provider:
94
94
max_concurrent_memory_operations:
95
95
type: text-input
96
96
required: false
97
-
default: "40"
97
+
default: "20"
98
98
label:
99
99
en_US: Max Concurrent Memory Operations
100
100
zh_Hans: 最大并发记忆操作数
101
101
help:
102
-
en_US: "Maximum concurrent memory operations (default: 40). Must be a positive integer (>= 1). Applies to all operations including search/add/get/get_all/update/delete/delete_all/history."
en_US: "Maximum concurrent memory operations (default: 20). Must be a positive integer (>= 1). Applies to all operations including search/add/get/get_all/update/delete/delete_all/history."
0 commit comments