gzdaniel commited on
Commit
f70a76a
·
1 Parent(s): 1e9398a

Update env.example

Browse files
Files changed (1) hide show
  1. env.example +82 -63
env.example CHANGED
@@ -1,6 +1,8 @@
1
  ### This is sample file of .env
2
 
 
3
  ### Server Configuration
 
4
  HOST=0.0.0.0
5
  PORT=9621
6
  WEBUI_TITLE='My Graph KB'
@@ -9,29 +11,17 @@ OLLAMA_EMULATING_MODEL_TAG=latest
9
  # WORKERS=2
10
  # CORS_ORIGINS=http://localhost:3000,http://localhost:8080
11
 
12
- ### Login Configuration
13
- # AUTH_ACCOUNTS='admin:admin123,user1:pass456'
14
- # TOKEN_SECRET=Your-Key-For-LightRAG-API-Server
15
- # TOKEN_EXPIRE_HOURS=48
16
- # GUEST_TOKEN_EXPIRE_HOURS=24
17
- # JWT_ALGORITHM=HS256
18
-
19
- ### API-Key to access LightRAG Server API
20
- # LIGHTRAG_API_KEY=your-secure-api-key-here
21
- # WHITELIST_PATHS=/health,/api/*
22
-
23
  ### Optional SSL Configuration
24
  # SSL=true
25
  # SSL_CERTFILE=/path/to/cert.pem
26
  # SSL_KEYFILE=/path/to/key.pem
27
 
28
  ### Directory Configuration (defaults to current working directory)
29
- ### Should not be set if deploy by docker (Set by Dockerfile instead of .env)
30
  ### Default value is ./inputs and ./rag_storage
31
  # INPUT_DIR=<absolute_path_for_doc_input_dir>
32
  # WORKING_DIR=<absolute_path_for_working_dir>
33
 
34
- ### Max nodes return from grap retrieval
35
  # MAX_GRAPH_NODES=1000
36
 
37
  ### Logging level
@@ -42,68 +32,95 @@ OLLAMA_EMULATING_MODEL_TAG=latest
42
  ### Logfile location (defaults to current working directory)
43
  # LOG_DIR=/path/to/log/directory
44
 
45
- ### RAG Configuration
46
- ### Chunk size for document splitting, 500~1500 is recommended
47
- # CHUNK_SIZE=1200
48
- # CHUNK_OVERLAP_SIZE=100
49
-
50
- ### RAG Query Configuration
51
- # HISTORY_TURNS=3
 
52
 
53
- ### These parameters provide more precise control over total token usage
54
- # MAX_ENTITY_TOKENS=10000
55
- # MAX_RELATION_TOKENS=10000
56
- # MAX_TOTAL_TOKENS=32000
57
 
 
 
 
 
 
 
58
  # COSINE_THRESHOLD=0.2
59
- ### Number of entities or relations to retrieve from KG
60
  # TOP_K=40
61
- ### Number of text chunks to retrieve initially from vector search and keep after reranking
62
  # CHUNK_TOP_K=10
 
 
 
 
 
 
63
 
64
- ### Enable reranking for retrieved text chunks (default: true)
65
- # ENABLE_RERANK=true
66
-
67
- ### Rerank Configuration
68
- ### Rerank model configuration (required when enable_rerank=true in query parameters)
69
  # RERANK_MODEL=BAAI/bge-reranker-v2-m3
70
  # RERANK_BINDING_HOST=https://api.your-rerank-provider.com/v1/rerank
71
  # RERANK_BINDING_API_KEY=your_rerank_api_key_here
72
 
73
- ### Entity and relation summarization configuration
 
 
74
  ### Language: English, Chinese, French, German ...
75
  SUMMARY_LANGUAGE=English
 
 
 
 
 
 
 
76
  ### Number of duplicated entities/edges to trigger LLM re-summary on merge ( at least 3 is recommented)
77
- # FORCE_LLM_SUMMARY_ON_MERGE=6
78
  ### Maximum number of entity extraction attempts for ambiguous content
79
  # MAX_GLEANING=1
80
 
81
- ### Number of parallel processing documents(Less than MAX_ASYNC/2 is recommended)
82
- # MAX_PARALLEL_INSERT=2
 
 
 
 
 
 
 
 
 
83
 
 
84
  ### LLM Configuration
85
- ENABLE_LLM_CACHE=true
86
- ENABLE_LLM_CACHE_FOR_EXTRACT=true
87
  ### Time out in seconds for LLM, None for infinite timeout
88
  TIMEOUT=240
89
  ### Some models like o1-mini require temperature to be set to 1
90
  TEMPERATURE=0
91
- ### Max concurrency requests of LLM
92
- MAX_ASYNC=4
93
- ### MAX_TOKENS: max tokens send to LLM for entity relation summaries (less than context size of the model)
94
- MAX_TOKENS=32000
95
  ### LLM Binding type: openai, ollama, lollms, azure_openai
96
  LLM_BINDING=openai
97
  LLM_MODEL=gpt-4o
98
  LLM_BINDING_HOST=https://api.openai.com/v1
99
  LLM_BINDING_API_KEY=your_api_key
 
 
 
 
100
  ### Optional for Azure
101
  # AZURE_OPENAI_API_VERSION=2024-08-01-preview
102
  # AZURE_OPENAI_DEPLOYMENT=gpt-4o
103
- ### set as num_ctx option for Ollama LLM
104
- # OLLAMA_NUM_CTX=32768
105
 
106
- ### Embedding Configuration
 
 
107
  ### Embedding Binding type: openai, ollama, lollms, azure_openai
108
  EMBEDDING_BINDING=ollama
109
  EMBEDDING_MODEL=bge-m3:latest
@@ -111,51 +128,53 @@ EMBEDDING_DIM=1024
111
  EMBEDDING_BINDING_API_KEY=your_api_key
112
  # If the embedding service is deployed within the same Docker stack, use host.docker.internal instead of localhost
113
  EMBEDDING_BINDING_HOST=http://localhost:11434
114
- ### Num of chunks send to Embedding in single request
115
- # EMBEDDING_BATCH_NUM=10
116
- ### Max concurrency requests for Embedding
117
- # EMBEDDING_FUNC_MAX_ASYNC=8
118
  ### Maximum tokens sent to Embedding for each chunk (no longer in use?)
119
  # MAX_EMBED_TOKENS=8192
 
120
  ### Optional for Azure
121
  # AZURE_EMBEDDING_DEPLOYMENT=text-embedding-3-large
122
  # AZURE_EMBEDDING_API_VERSION=2023-05-15
123
  # AZURE_EMBEDDING_ENDPOINT=your_endpoint
124
  # AZURE_EMBEDDING_API_KEY=your_api_key
125
 
126
- ###########################
127
  ### Data storage selection
128
- ###########################
129
- ### In-memory database with local file persistence(Recommended for small scale deployment)
130
  # LIGHTRAG_KV_STORAGE=JsonKVStorage
131
  # LIGHTRAG_DOC_STATUS_STORAGE=JsonDocStatusStorage
132
  # LIGHTRAG_GRAPH_STORAGE=NetworkXStorage
133
  # LIGHTRAG_VECTOR_STORAGE=NanoVectorDBStorage
 
 
 
 
 
 
 
 
134
  # LIGHTRAG_VECTOR_STORAGE=FaissVectorDBStorage
 
 
 
 
 
135
  ### PostgreSQL
136
  # LIGHTRAG_KV_STORAGE=PGKVStorage
137
  # LIGHTRAG_DOC_STATUS_STORAGE=PGDocStatusStorage
138
  # LIGHTRAG_GRAPH_STORAGE=PGGraphStorage
139
  # LIGHTRAG_VECTOR_STORAGE=PGVectorStorage
 
140
  ### MongoDB (Vector storage only available on Atlas Cloud)
141
  # LIGHTRAG_KV_STORAGE=MongoKVStorage
142
  # LIGHTRAG_DOC_STATUS_STORAGE=MongoDocStatusStorage
143
  # LIGHTRAG_GRAPH_STORAGE=MongoGraphStorage
144
  # LIGHTRAG_VECTOR_STORAGE=MongoVectorDBStorage
145
- ### Redis Storage (Recommended for production deployment)
146
- # LIGHTRAG_KV_STORAGE=RedisKVStorage
147
- # LIGHTRAG_DOC_STATUS_STORAGE=RedisDocStatusStorage
148
- ### Vector Storage (Recommended for production deployment)
149
- # LIGHTRAG_VECTOR_STORAGE=MilvusVectorDBStorage
150
- # LIGHTRAG_VECTOR_STORAGE=QdrantVectorDBStorage
151
- ### Graph Storage (Recommended for production deployment)
152
- # LIGHTRAG_GRAPH_STORAGE=Neo4JStorage
153
- # LIGHTRAG_GRAPH_STORAGE=MemgraphStorage
154
 
155
  ####################################################################
156
- ### Default workspace for all storage types
157
- ### For the purpose of isolation of data for each LightRAG instance
158
- ### Valid characters: a-z, A-Z, 0-9, and _
159
  ####################################################################
160
  # WORKSPACE=space1
161
 
 
1
  ### This is sample file of .env
2
 
3
+ ###########################
4
  ### Server Configuration
5
+ ###########################
6
  HOST=0.0.0.0
7
  PORT=9621
8
  WEBUI_TITLE='My Graph KB'
 
11
  # WORKERS=2
12
  # CORS_ORIGINS=http://localhost:3000,http://localhost:8080
13
 
 
 
 
 
 
 
 
 
 
 
 
14
  ### Optional SSL Configuration
15
  # SSL=true
16
  # SSL_CERTFILE=/path/to/cert.pem
17
  # SSL_KEYFILE=/path/to/key.pem
18
 
19
  ### Directory Configuration (defaults to current working directory)
 
20
  ### Default value is ./inputs and ./rag_storage
21
  # INPUT_DIR=<absolute_path_for_doc_input_dir>
22
  # WORKING_DIR=<absolute_path_for_working_dir>
23
 
24
+ ### Max nodes return from grap retrieval in webui
25
  # MAX_GRAPH_NODES=1000
26
 
27
  ### Logging level
 
32
  ### Logfile location (defaults to current working directory)
33
  # LOG_DIR=/path/to/log/directory
34
 
35
+ #####################################
36
+ ### Login and API-Key Configuration
37
+ #####################################
38
+ # AUTH_ACCOUNTS='admin:admin123,user1:pass456'
39
+ # TOKEN_SECRET=Your-Key-For-LightRAG-API-Server
40
+ # TOKEN_EXPIRE_HOURS=48
41
+ # GUEST_TOKEN_EXPIRE_HOURS=24
42
+ # JWT_ALGORITHM=HS256
43
 
44
+ ### API-Key to access LightRAG Server API
45
+ # LIGHTRAG_API_KEY=your-secure-api-key-here
46
+ # WHITELIST_PATHS=/health,/api/*
 
47
 
48
+ ########################
49
+ ### Query Configuration
50
+ ########################
51
+ # LLM responde cache for query (Not valid for streaming response
52
+ ENABLE_LLM_CACHE=true
53
+ # HISTORY_TURNS=3
54
  # COSINE_THRESHOLD=0.2
55
+ ### Number of entities or relations retrieved from KG
56
  # TOP_K=40
57
+ ### Maxmium number or chunks plan to send to LLM
58
  # CHUNK_TOP_K=10
59
+ ### control the actual enties send to LLM
60
+ # MAX_ENTITY_TOKENS=10000
61
+ ### control the actual relations send to LLM
62
+ # MAX_RELATION_TOKENS=10000
63
+ ### control the maximum tokens send to LLM (include entities, raltions and chunks)
64
+ # MAX_TOTAL_TOKENS=32000
65
 
66
+ ### Reranker configuration (Set ENABLE_RERANK to true in reranking model is configed)
67
+ ENABLE_RERANK=False
 
 
 
68
  # RERANK_MODEL=BAAI/bge-reranker-v2-m3
69
  # RERANK_BINDING_HOST=https://api.your-rerank-provider.com/v1/rerank
70
  # RERANK_BINDING_API_KEY=your_rerank_api_key_here
71
 
72
+ ########################################
73
+ ### Document processing configuration
74
+ ########################################
75
  ### Language: English, Chinese, French, German ...
76
  SUMMARY_LANGUAGE=English
77
+ ENABLE_LLM_CACHE_FOR_EXTRACT=true
78
+ ### MAX_TOKENS: max tokens send to LLM for entity relation summaries (less than context size of the model)
79
+ MAX_TOKENS=32000
80
+ ### Chunk size for document splitting, 500~1500 is recommended
81
+ # CHUNK_SIZE=1200
82
+ # CHUNK_OVERLAP_SIZE=100
83
+ ### Entity and relation summarization configuration
84
  ### Number of duplicated entities/edges to trigger LLM re-summary on merge ( at least 3 is recommented)
85
+ # FORCE_LLM_SUMMARY_ON_MERGE=4
86
  ### Maximum number of entity extraction attempts for ambiguous content
87
  # MAX_GLEANING=1
88
 
89
+ ###############################
90
+ ### Concurrency Configuration
91
+ ###############################
92
+ ### Max concurrency requests of LLM (for both query and document processing)
93
+ MAX_ASYNC=4
94
+ ### Number of parallel processing documents(between 2~10, MAX_ASYNC/4 is recommended)
95
+ MAX_PARALLEL_INSERT=2
96
+ ### Max concurrency requests for Embedding
97
+ # EMBEDDING_FUNC_MAX_ASYNC=8
98
+ ### Num of chunks send to Embedding in single request
99
+ # EMBEDDING_BATCH_NUM=10
100
 
101
+ #######################
102
  ### LLM Configuration
103
+ #######################
 
104
  ### Time out in seconds for LLM, None for infinite timeout
105
  TIMEOUT=240
106
  ### Some models like o1-mini require temperature to be set to 1
107
  TEMPERATURE=0
 
 
 
 
108
  ### LLM Binding type: openai, ollama, lollms, azure_openai
109
  LLM_BINDING=openai
110
  LLM_MODEL=gpt-4o
111
  LLM_BINDING_HOST=https://api.openai.com/v1
112
  LLM_BINDING_API_KEY=your_api_key
113
+
114
+ ### Set as num_ctx option for Ollama LLM
115
+ # OLLAMA_NUM_CTX=32768
116
+
117
  ### Optional for Azure
118
  # AZURE_OPENAI_API_VERSION=2024-08-01-preview
119
  # AZURE_OPENAI_DEPLOYMENT=gpt-4o
 
 
120
 
121
+ ####################################################################################
122
+ ### Embedding Configuration (Should not be changed after the first file processed)
123
+ ####################################################################################
124
  ### Embedding Binding type: openai, ollama, lollms, azure_openai
125
  EMBEDDING_BINDING=ollama
126
  EMBEDDING_MODEL=bge-m3:latest
 
128
  EMBEDDING_BINDING_API_KEY=your_api_key
129
  # If the embedding service is deployed within the same Docker stack, use host.docker.internal instead of localhost
130
  EMBEDDING_BINDING_HOST=http://localhost:11434
 
 
 
 
131
  ### Maximum tokens sent to Embedding for each chunk (no longer in use?)
132
  # MAX_EMBED_TOKENS=8192
133
+
134
  ### Optional for Azure
135
  # AZURE_EMBEDDING_DEPLOYMENT=text-embedding-3-large
136
  # AZURE_EMBEDDING_API_VERSION=2023-05-15
137
  # AZURE_EMBEDDING_ENDPOINT=your_endpoint
138
  # AZURE_EMBEDDING_API_KEY=your_api_key
139
 
140
+ ############################
141
  ### Data storage selection
142
+ ############################
143
+ ### Default storage (Recommended for small scale deployment)
144
  # LIGHTRAG_KV_STORAGE=JsonKVStorage
145
  # LIGHTRAG_DOC_STATUS_STORAGE=JsonDocStatusStorage
146
  # LIGHTRAG_GRAPH_STORAGE=NetworkXStorage
147
  # LIGHTRAG_VECTOR_STORAGE=NanoVectorDBStorage
148
+
149
+ ### Redis Storage (Recommended for production deployment)
150
+ # LIGHTRAG_KV_STORAGE=RedisKVStorage
151
+ # LIGHTRAG_DOC_STATUS_STORAGE=RedisDocStatusStorage
152
+
153
+ ### Vector Storage (Recommended for production deployment)
154
+ # LIGHTRAG_VECTOR_STORAGE=MilvusVectorDBStorage
155
+ # LIGHTRAG_VECTOR_STORAGE=QdrantVectorDBStorage
156
  # LIGHTRAG_VECTOR_STORAGE=FaissVectorDBStorage
157
+
158
+ ### Graph Storage (Recommended for production deployment)
159
+ # LIGHTRAG_GRAPH_STORAGE=Neo4JStorage
160
+ # LIGHTRAG_GRAPH_STORAGE=MemgraphStorage
161
+
162
  ### PostgreSQL
163
  # LIGHTRAG_KV_STORAGE=PGKVStorage
164
  # LIGHTRAG_DOC_STATUS_STORAGE=PGDocStatusStorage
165
  # LIGHTRAG_GRAPH_STORAGE=PGGraphStorage
166
  # LIGHTRAG_VECTOR_STORAGE=PGVectorStorage
167
+
168
  ### MongoDB (Vector storage only available on Atlas Cloud)
169
  # LIGHTRAG_KV_STORAGE=MongoKVStorage
170
  # LIGHTRAG_DOC_STATUS_STORAGE=MongoDocStatusStorage
171
  # LIGHTRAG_GRAPH_STORAGE=MongoGraphStorage
172
  # LIGHTRAG_VECTOR_STORAGE=MongoVectorDBStorage
 
 
 
 
 
 
 
 
 
173
 
174
  ####################################################################
175
+ ### WORKSPACE setting workspace name for all storage types
176
+ ### in the purpose of isolating data from LightRAG instances.
177
+ ### Valid workspace name constraints: a-z, A-Z, 0-9, and _
178
  ####################################################################
179
  # WORKSPACE=space1
180