gateway
gateway copied to clipboard
feat: add thinking parameter to OllamaChatCompleteConfig
Description
This PR adds thinking parameter support for Ollama provider
Motivation
--
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
How Has This Been Tested?
- [ ] Unit Tests
- [ ] Integration Tests
- [x] Manual Testing
Screenshots (if applicable)
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
Related Issues
Fixes And Closes #1414
Summary By MatterAI 
🔄 What Changed
Added a new think parameter to the OllamaChatCompleteConfig to control thinking behavior with a transformation function that maps the thinking parameter's type to a boolean value.
🔍 Impact of the Change
This change introduces a new configurable option for Ollama chat completions, allowing users to enable or disable thinking behavior based on the parameter's type. The transformation function ensures proper mapping of the parameter to a boolean value for API consumption.
📁 Total Files Changed
| File | ChangeLog |
|---|---|
| Ollama Chat | Added think parameter with transformation logic to map thinking type to boolean |
🧪 Test Added/Recommended
Recommended
- Unit tests for the new
thinkparameter transformation function - Integration tests to verify the parameter is correctly passed to the Ollama API
🔒Security Vulnerabilities
N/A