all_possible_config.toml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. [app]
  2. # app settings are global available like `r2r_config.agent.app`
  3. # project_name = "r2r_default" # optional, can also set with `R2R_PROJECT_NAME` env var
  4. default_max_documents_per_user = 1_000_000
  5. default_max_chunks_per_user = 10_000_000
  6. default_max_collections_per_user = 1_000_000
  7. # Set the default max upload size to 2 GB for local testing
  8. default_max_upload_size = 2147483648 # 2 GB for anything not explicitly listed
  9. # LLM used for internal operations, like deriving conversation names
  10. fast_llm = "openai/gpt-4o-mini"
  11. # LLM used for user-facing output, like RAG replies
  12. quality_llm = "openai/gpt-4o-mini"
  13. # LLM used for ingesting visual inputs
  14. vlm = "openai/gpt-4o-mini"
  15. # LLM used for transcription
  16. audio_lm = "openai/whisper-1"
  17. # Reasoning model, used for `research` agent
  18. reasoning_llm = "openai/o3-mini"
  19. # Planning model, used for `research` agent
  20. planning_llm = "anthropic/claude-3-7-sonnet-20250219"
  21. [app.max_upload_size_by_type]
  22. txt = 2000000
  23. md = 2000000
  24. tsv = 2000000
  25. csv = 5000000
  26. html = 5000000
  27. doc = 10000000
  28. docx = 10000000
  29. ppt = 20000000
  30. pptx = 20000000
  31. xls = 10000000
  32. xlsx = 10000000
  33. odt = 5000000
  34. pdf = 30000000
  35. eml = 5000000
  36. msg = 5000000
  37. p7s = 5000000
  38. bmp = 5000000
  39. heic = 5000000
  40. jpeg = 5000000
  41. jpg = 5000000
  42. png = 5000000
  43. tiff = 5000000
  44. epub = 10000000
  45. rtf = 5000000
  46. rst = 5000000
  47. org = 5000000
  48. [agent]
  49. rag_agent_static_prompt = "static_rag_agent"
  50. rag_agent_dynamic_prompt = "dynamic_rag_agent"
  51. #tools = ["search_file_knowledge", "content"]
  52. rag_tools = ["search_file_descriptions", "search_file_knowledge", "get_file_content"] # can add "web_search" | "web_scrape"
  53. # The following tools are available to the `research` agent
  54. research_tools = ["rag", "reasoning", "critique", "python_executor"]
  55. # tool_names = ["local_search", "web_search"] # uncomment to enable web search
  56. #tool_names = ["local_search"]
  57. # [agent.generation_config]
  58. # model = "openai/gpt-4o"
  59. [auth]
  60. provider = "r2r"
  61. access_token_lifetime_in_minutes = 6000 # set a very high default value, for easier testing
  62. refresh_token_lifetime_in_days = 7
  63. require_authentication = false
  64. require_email_verification = false
  65. default_admin_email = "xujiawei@cocorobo.cc"
  66. default_admin_password = "usestudio-1"
  67. [completion]
  68. provider = "r2r"
  69. concurrent_request_limit = 256000
  70. #fast_llm = "openai/gpt-4o-mini"
  71. [completion.generation_config]
  72. #model = "openai/gpt-4o-mini"
  73. temperature = 0.1
  74. top_p = 1.0
  75. max_tokens_to_sample = 1024
  76. stream = false
  77. add_generation_kwargs = { }
  78. [crypto]
  79. provider = "bcrypt"
  80. [database]
  81. provider = "postgres"
  82. default_collection_name = "Default"
  83. default_collection_description = "Your default collection."
  84. # collection_summary_system_prompt = 'default_system'
  85. # collection_summary_task_prompt = 'default_collection_summary'
  86. # KG settings
  87. batch_size = 6400
  88. collection_summary_system_prompt = "system"
  89. collection_summary_prompt = "collection_summary"
  90. disable_create_extension = false
  91. kg_store_path = ""
  92. # PostgreSQL tuning settings
  93. [database.postgres_configuration_settings]
  94. checkpoint_completion_target = 0.7
  95. default_statistics_target = 100
  96. effective_io_concurrency = 4
  97. effective_cache_size = 5242880
  98. huge_pages = "try"
  99. maintenance_work_mem = 655360
  100. max_connections = 2560
  101. max_parallel_workers_per_gather = 16
  102. max_parallel_workers = 4
  103. max_parallel_maintenance_workers = 4
  104. max_wal_size = 102400
  105. max_worker_processes = 8
  106. min_wal_size = 80
  107. shared_buffers = 163840
  108. statement_cache_size = 1000
  109. random_page_cost = 1.1
  110. wal_buffers = 2560
  111. work_mem = 409600
  112. # Graph creation settings
  113. [database.graph_creation_settings]
  114. graph_entity_description_prompt = "graph_entity_description"
  115. graph_extraction_prompt = "graph_extraction"
  116. entity_types = []
  117. relation_types = []
  118. automatic_deduplication = false
  119. # Graph enrichment settings
  120. [database.graph_enrichment_settings]
  121. graph_communities_prompt = "graph_communities"
  122. # Rate limiting settings
  123. [database.limits]
  124. global_per_min = 60
  125. route_per_min = 20
  126. monthly_limit = 10000
  127. # Route-specific limits (empty by default)
  128. [database.route_limits]
  129. # e.g., "/api/search" = { global_per_min = 30, route_per_min = 10, monthly_limit = 5000 }
  130. # User-specific limits (empty by default)
  131. [database.user_limits]
  132. # e.g., "user_uuid_here" = { global_per_min = 20, route_per_min = 5, monthly_limit = 2000 }
  133. [database.maintenance]
  134. vacuum_schedule = "0 3 * * *" # Run at 3:00 AM daily
  135. [embedding]
  136. provider = "litellm"
  137. # For basic applications, use `openai/text-embedding-3-small` with `base_dimension = 512`
  138. # RECOMMENDED - For advanced applications,
  139. # use `openai/text-embedding-3-large` with `base_dimension = 3072` and binary quantization
  140. #base_model = "openai/text-embedding-3-small"
  141. #base_dimension = 512
  142. base_model = "openai/text-embedding-3-large"
  143. #base_model = "/text-embedding-v3"
  144. base_dimension = 256
  145. rerank_model = ""
  146. rerank_url = ""
  147. # rerank_model = "huggingface/mixedbread-ai/mxbai-rerank-large-v1" # reranking model
  148. batch_size = 32
  149. prefixes = {} # Provide prefix overrides here if needed
  150. add_title_as_prefix = false
  151. concurrent_request_limit = 2560
  152. max_retries = 3
  153. initial_backoff = 1.0
  154. max_backoff = 64.0
  155. # Deprecated fields (if still used)
  156. rerank_dimension = 0
  157. rerank_transformer_type = ""
  158. # Vector quantization settings for embeddings
  159. [embedding.quantization_settings]
  160. quantization_type = "FP32"
  161. # (Additional quantization parameters can be added here)
  162. [completion_embedding]
  163. # Generally this should be the same as the embedding config, but advanced users may want to run with a different provider to reduce latency
  164. provider = "litellm"
  165. base_model = "openai/text-embedding-3-large"
  166. #base_model = "dashscope/text-embedding-v3"
  167. base_dimension = 256
  168. batch_size = 128
  169. add_title_as_prefix = false
  170. concurrent_request_limit = 256
  171. [file]
  172. provider = "postgres"
  173. # If using S3
  174. bucket_name = ""
  175. endpoint_url = ""
  176. region_name = ""
  177. aws_access_key_id = ""
  178. aws_secret_access_key = ""
  179. [ingestion]
  180. provider = "r2r"
  181. chunking_strategy = "recursive"
  182. chunk_size = 800
  183. chunk_overlap = 400
  184. excluded_parsers = ["mp4"]
  185. # Ingestion-time document summary parameters
  186. # skip_document_summary = False
  187. # document_summary_system_prompt = 'default_system'
  188. # document_summary_task_prompt = 'default_summary'
  189. # chunks_for_document_summary = 128
  190. document_summary_model = "openai/gpt-4o-mini"
  191. vision_img_model = "openai/gpt-4o-mini"
  192. vision_pdf_model = "openai/gpt-4o-mini"
  193. automatic_extraction = false # enable automatic extraction of entities and relations
  194. vlm_batch_size=20
  195. vlm_max_tokens_to_sample=1024
  196. max_concurrent_vlm_tasks=20
  197. vlm_ocr_one_page_per_chunk = true
  198. # Audio transcription and vision model settings
  199. audio_transcription_model = ""
  200. skip_document_summary = false
  201. document_summary_system_prompt = "system"
  202. document_summary_task_prompt = "summary"
  203. document_summary_max_length = 100000
  204. chunks_for_document_summary = 128
  205. document_summary_model = ""
  206. parser_overrides = {}
  207. # Chunk enrichment settings
  208. [ingestion.chunk_enrichment_settings]
  209. chunk_enrichment_prompt = "chunk_enrichment"
  210. enable_chunk_enrichment = false
  211. n_chunks = 2
  212. # [ingestion.chunk_enrichment_settings]
  213. # enable_chunk_enrichment = false # disabled by default
  214. # n_chunks = 2 # the number of chunks (both preceeding and succeeding) to use in enrichment
  215. # generation_config = { model = "openai/gpt-4o-mini" }
  216. [ingestion.extra_parsers]
  217. pdf = ["ocr", "zerox"]
  218. #pdf = "ocr"
  219. [logging]
  220. provider = "r2r"
  221. log_table = "logs"
  222. log_info_table = "log_info"
  223. [ocr]
  224. provider = "mistral"
  225. model = "mistral-ocr-latest"
  226. ################################################################################
  227. # Orchestration Settings (OrchestrationConfig)
  228. ################################################################################
  229. [orchestration]
  230. provider = "no"
  231. #max_runs = 2048
  232. #kg_creation_concurrency_limit = 32
  233. #ingestion_concurrency_limit = 16
  234. #kg_concurrency_limit = 4
  235. [prompt]
  236. provider = "r2r"
  237. [email]
  238. provider = "console_mock"
  239. [scheduler]
  240. provider = "apscheduler"