R1 Reasoning Effort is a multi-API reasoning pipeline within open-webui that integrates OpenAI and Ollama, enabling responses with varying levels of reasoning depth. It supports iterative refinement, allowing multiple reasoning cycles with context-aware adjustments.
The Reasoning Effort parameter controls how long the model spends thinking before finalizing a response. Ranging from 1 to 100, each increment forces an additional reasoning iteration, enhancing depth and coherence in the generated output.
This project is inspired by r1-overthinker, extending its concepts to support multiple APIs and provide an improved structured reasoning pipeline.
- Multi-API Support: Choose between OpenAI and Ollama APIs for reasoning.
- Configurable Reasoning Iterations: Set effort levels to control the depth of reasoning.
- Dynamic Response Refinement: Iteratively refine responses with extended reasoning.
- Customizable End Tokens & Prompts: Define how and when reasoning phases end.
- Logging & Error Handling: Provides robust logging and handling for API errors.
The core pipeline is implemented in the Pipe
class. It processes messages, determines reasoning effort, and interacts with the chosen API.
Modify the Valves
with in the open-webui function after setup:
Blog post on how to set a pipe up
This project is based on r1-overthinker and extends its functionality.
MIT License. See LICENSE
for details.