yangdx commited on
Commit
ca8ab4c
·
1 Parent(s): 6237af5

Change defautl timeout for LLM to 150s

Browse files
.env.example CHANGED
@@ -26,7 +26,7 @@
26
  ### Max async calls for LLM
27
  # MAX_ASYNC=4
28
  ### Optional Timeout for LLM
29
- # TIMEOUT=None # Time out in seconds, None for infinite timeout
30
 
31
  ### Settings for RAG query
32
  # HISTORY_TURNS=3
 
26
  ### Max async calls for LLM
27
  # MAX_ASYNC=4
28
  ### Optional Timeout for LLM
29
+ # TIMEOUT=150 # Time out in seconds, None for infinite timeout
30
 
31
  ### Settings for RAG query
32
  # HISTORY_TURNS=3
lightrag/api/README.md CHANGED
@@ -268,7 +268,7 @@ You can not change storage implementation selection after you add documents to L
268
  | --input-dir | ./inputs | Directory containing input documents |
269
  | --max-async | 4 | Maximum async operations |
270
  | --max-tokens | 32768 | Maximum token size |
271
- | --timeout | None | Timeout in seconds (useful when using slow AI). Use None for infinite timeout |
272
  | --log-level | INFO | Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
273
  | --verbose | - | Verbose debug output (True, Flase) |
274
  | --key | None | API key for authentication. Protects lightrag server against unauthorized access |
 
268
  | --input-dir | ./inputs | Directory containing input documents |
269
  | --max-async | 4 | Maximum async operations |
270
  | --max-tokens | 32768 | Maximum token size |
271
+ | --timeout | 150 | Timeout in seconds. None for infinite timeout(not recommended) |
272
  | --log-level | INFO | Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
273
  | --verbose | - | Verbose debug output (True, Flase) |
274
  | --key | None | API key for authentication. Protects lightrag server against unauthorized access |
lightrag/api/utils_api.py CHANGED
@@ -148,6 +148,8 @@ def parse_args() -> argparse.Namespace:
148
  )
149
 
150
  def timeout_type(value):
 
 
151
  if value is None or value == "None":
152
  return None
153
  return int(value)
 
148
  )
149
 
150
  def timeout_type(value):
151
+ if value is None:
152
+ return 150
153
  if value is None or value == "None":
154
  return None
155
  return int(value)