Refactor Ollama API to use ThinkMode enum for "think" parameter

- Addresses #231
- Updated Ollama class and related methods to replace boolean "think" with ThinkMode enum for better clarity and control over thinking levels.
- Modified MetricsRecorder to accept ThinkMode instead of boolean for metrics recording.
- Adjusted OllamaChatRequest and OllamaGenerateRequest to utilize ThinkMode, including serialization support.
- Updated integration and unit tests to reflect changes in the "think" parameter handling.
- Introduced ThinkMode and ThinkModeSerializer classes to manage the new thinking parameter structure.
This commit is contained in:
Amith Koujalgi
2025-11-07 15:17:22 +05:30
parent 84e1950864
commit 074ac712ca
15 changed files with 238 additions and 95 deletions

View File

@@ -1,4 +1,4 @@
USE_EXTERNAL_OLLAMA_HOST=true
OLLAMA_HOST=http://192.168.29.229:11434/
OLLAMA_HOST=http://192.168.29.224:11434/
REQUEST_TIMEOUT_SECONDS=120
NUMBER_RETRIES_FOR_MODEL_PULL=3