r2r.toml.bak 7.6 KB

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