File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ USERS_OPEN_REGISTRATION=False
2222MAX_UPLOAD_SIZE = 50_000_000
2323# Sets the number of processes
2424MAX_WORKERS = 1
25+ # Controls LangGraph's recursion_limit configuration parameter. If empty, defaults to 25.
26+ RECURSION_LIMIT = 25
2527
2628# llm provider keys. Add only to models that you want to use
2729OPENAI_API_KEY =
Original file line number Diff line number Diff line change @@ -148,5 +148,8 @@ def _enforce_non_default_secrets(self) -> Self:
148148
149149 MAX_UPLOAD_SIZE : int = 50_000_000
150150
151+ # LangGraph config
152+ RECURSION_LIMIT : int = 25
153+
151154
152155settings = Settings () # type: ignore
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ async def generator(
509509
510510 config : RunnableConfig = {
511511 "configurable" : {"thread_id" : thread_id },
512- "recursion_limit" : 25 ,
512+ "recursion_limit" : settings . RECURSION_LIMIT ,
513513 }
514514 # Handle interrupt logic by orriding state
515515 if interrupt and interrupt .decision == InterruptDecision .APPROVED :
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ services:
110110 - DENSE_EMBEDDING_MODEL=${DENSE_EMBEDDING_MODEL?Variable not set}
111111 - SPARSE_EMBEDDING_MODEL=${SPARSE_EMBEDDING_MODEL?Variable not set}
112112 - MAX_UPLOAD_SIZE=${MAX_UPLOAD_SIZE}
113+ - RECURSION_LIMIT=${RECURSION_LIMIT}
113114 - CELERY_BROKER_URL=redis://redis:6379/0
114115 - CELERY_RESULT_BACKEND=redis://redis:6379/0
115116 build :
You can’t perform that action at this time.
0 commit comments