Interface ThinkOption

All Known Implementing Classes:
ThinkOption.ThinkBoolean, ThinkOption.ThinkLevel

public sealed interface ThinkOption permits ThinkOption.ThinkBoolean, ThinkOption.ThinkLevel
Defines the configuration contract for the "thinking" capability (Chain of Thought) in AgentScope's Ollama integration. This interface allows users to control how the underlying model exposes its internal reasoning process.

The configuration supports two distinct strategies:

  • ThinkOption.ThinkBoolean: A simple toggle to enable or disable thinking (suitable for models like DeepSeek R1).
  • ThinkOption.ThinkLevel: A granular control to set the depth of reasoning (e.g., "low", "medium", "high" for models like GPT-OSS).
  • Method Details

    • toJsonValue

      Object toJsonValue()
      Transforms the current option into a format compatible with the Ollama JSON API.
      Returns:
      A Boolean for toggle-based options, or a String for level-based options.