R2RConfig
uses a TOML-based configuration system to customize various aspects of R2R’s functionality. This guide provides a detailed overview of how to configure R2R, including all available options and their meanings.
r2r.toml
. The file is divided into several sections, each corresponding to a different aspect of the R2R system:
AuthProvider
to learn more about how R2R supports auth providers.
provider
: Authentication provider. Currently, only “r2r” is supported.access_token_lifetime_in_minutes
: Lifespan of access tokens in minutes.refresh_token_lifetime_in_days
: Lifespan of refresh tokens in days.require_authentication
: If true, all secure routes require authentication. Otherwise, non-authenticated requests mock superuser access.require_email_verification
: If true, email verification is required for new accounts.default_admin_email
and default_admin_password
: Credentials for the default admin account.LLMProvider
to learn more about how R2R supports LLM providers.
provider
: LLM provider. Options include “litellm” and “openai”.concurrent_request_limit
: Maximum number of concurrent requests allowed.generation_config
: Detailed configuration for text generation.
model
: The specific LLM model to use.temperature
: Controls randomness in generation (0.0 to 1.0).top_p
: Parameter for nucleus sampling.max_tokens_to_sample
: Maximum number of tokens to generate.CryptoProvider
to learn more about how R2R supports cryptography.
provider
: Cryptography provider for password hashing. Currently, only “bcrypt” is supported.DatabaseProvider
to learn more about how R2R supports databases.
provider
: Database provider. Only “postgres” is supported.user
: Default username for accessing database.password
: Default password for accessing database.host
: Default host for accessing database.port
: Default port for accessing database.db_name
: Default db_name for accessing database.EmbeddingProvider
to learn more about how R2R supports embeddings.
provider
: Embedding provider. Options include “ollama”, “openai” and “sentence-transformers”.base_model
: The specific embedding model to use.base_dimension
: Dimension of the embedding vectors.batch_size
: Number of items to process in a single batch.add_title_as_prefix
: Whether to add the title as a prefix to the embedded text.rerank_model
: Model used for reranking, if any.concurrent_request_limit
: Maximum number of concurrent embedding requests.provider
: Evaluation provider. Set to “None” to disable evaluation functionality.KGProvider
to learn more about how R2R supports knowledge graphs.
provider
: Specifies the backend used for storing and querying the knowledge graph. Options include “postgres” and “None”.batch_size
: Determines how many text chunks are processed at once for knowledge extraction.kg_extraction_config
: Configures the language model used for extracting knowledge from text chunks.provider
: Logging provider. Currently set to “local”.log_table
: Name of the table where logs are stored.log_info_table
: Name of the table where log information is stored.provider
: Prompt management provider. Currently set to “r2r”..gitignore
to exclude files with sensitive information.