Use LLMs to generate summaries of web content for reading later.
Configuration can be via an appsettings.json file or environment variables. These two configuration schemes can be mixed. If a setting is configured in both appsettings.json and as an environment variable, the environment variable will take precedence.
In the following examples, the JSON comments show the environment variable name which corresponds to the setting in appsettings.json.
These config items relate to the BreefApi service itself.
- ApiKey - The API key used to authenticate with the breef API service. This is required for all requests to the API.
These config items relate to the Wallabag service. Refer to the Wallabag documentation for more information on setting up breef as an API client.
- BaseUrl - The base URL for the Wallabag instance.
- ClientId - The Wallabag client ID for breef.
- ClientSecret - The Wallabag client secret for breef.
- Username - The Wallabag username to be used in conjunction with the breef client.
- Password - The Wallabag password to be used in conjunction with the breef client.
These config items relate to the AI service used for generating summaries.
- Provider - The AI service provider.
AzureOpenAI,OpenAIandOllamaare supported. The Microsoft SematicKernel connector for Ollama is in preview and a warning will be logged to make this clear. - ModelId - The model ID to be used for generating summaries. A chat-completion model should be used.
- AzureOpenAI - This is given as the 'Name' in the 'Deployment info' in Azure.
- OpenAI - This is given as the 'model' in OpenAI.
- Ollama - This is given as the 'model' in Ollama and must also include the tag.
- EndpointUrl - The endpoint URL for the AI service.
- AzureOpenAI - This is given as the 'Azure OpenAI endpoint' in Azure and typically takes the form
https://<tenant-specific>.openai.azure.comIt should not include any model-specific routing. - OpenAI - Typically
https://api.openai.com/v1It should not include any model-specific routing. - Ollama - By default this is
http://<host>:11434.
- AzureOpenAI - This is given as the 'Azure OpenAI endpoint' in Azure and typically takes the form
- ApiKey - The API key used to authenticate with the AI service. Ollama does not support an API key and should be left blank. If a key is provided for Ollama, a warning will be logged and the key will be ignored.
Example
These config items relate to the Reddit integration using the Options pattern with support for multiple Reddit instances.
- DefaultBaseAddress - The primary base address for Reddit API requests. Default:
"https://www.reddit.com". Must be a valid URL. Used for Refit HTTP client configuration, fallback subreddit image extraction, and primary Reddit instance for content extraction. - AdditionalBaseAddresses - Additional Reddit instances that the content extractors can handle. Default:
["https://reddit.com"](includes non-www variant by default). Domain matching is exact - if you want to support bothreddit.comandwww.reddit.com, you must explicitly configure both. - FallbackImageUrl - The fallback image URL used when subreddit-specific images cannot be retrieved. Default:
"https://redditinc.com/hubfs/Reddit%20Inc/Brand/Reddit_Lockup_Logo.svg". This URL is used as the default Reddit logo when no subreddit banner, icon, or community image is available.
The Reddit integration allows extraction of content from:
- Custom Reddit instances
- Alternative Reddit domains
- Corporate or self-hosted Reddit installations
- Specific subdomains (e.g.,
old.reddit.com,api.reddit.com)
Domain Validation: The content extractors validate URLs using exact domain matching. reddit.com does NOT automatically allow www.reddit.com - each domain variant must be explicitly configured.
Example:
"Reddit": {
"DefaultBaseAddress": "https://www.reddit.com", // breef_Reddit__DefaultBaseAddress
"AdditionalBaseAddresses": [ // breef_Reddit__AdditionalBaseAddresses__0
"https://reddit.com", // breef_Reddit__AdditionalBaseAddresses__0
],
"FallbackImageUrl": "https://redditinc.com/hubfs/Reddit%20Inc/Brand/Reddit_Lockup_Logo.svg" // breef_Reddit__FallbackImageUrl
}- TimeOut - Sets the number of seconds before the AiService used will time out. The default used if not set is 100 seconds. This may need to be increased where Ollama is used with limiting hardware.
Example:
"AiService": {
"Timeout": 100, // breef_AiService__Timeout
}These settings affect how pages are downloaded prior to being summarised.
- UserAgent - The user agent used when downloading pages. By default this is set to
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36but can be overridden here. - TimeoutSeconds - The timeout in seconds for HTTP requests when downloading pages. By default this is set to
30seconds but can be overridden here. Must be at least 1 second.
Example:
"HttpClient" : {
"UserAgent": "<custom-agent>", // breef_HttpClient__UserAgent
"TimeoutSeconds": 30 // breef_HttpClient__TimeoutSeconds
}Logging is handled by Serilog and configuration is documented here. This example shows how to change the default log level:
"Serilog": {
"MinimumLevel": {
"Default": "Debug" // breef_Serilog__MinimumLevel__Default
}
}
{ "BreefApi": { "ApiKey": "<wallabag-generaged-key>" // breef_BreefApi__ApiKey }, "Wallabag": { "BaseUrl": "https://<wallabag-host>", // breef_Wallabag__BaseUrl "ClientId": "<wallabag-generaged-client-id>", // breef_Wallabag__ClientId "ClientSecret": "<wallabag-generaged-client-secrect>", // breef_Wallabag__ClientSecret "Username": "<wallabag-username>", // breef_Wallabag__Username "Password": "<wallabag-password>" // breef_Wallabag__Password }, "AiService": { "Provider": "OpenAi", // breef_AiService__Provider "ModelId": "https://api.openai.com/v1", // breef_AiService__ModelId "EndpointUrl": "gpt-4o-mini", // breef_AiService__EndpointUrl "ApiKey": "<open-ai-api-key>" // breef_AiService__ApiKey } }