Class: PromptObjects::Primitives::Think

Inherits:
PromptObjects::Primitive show all
Defined in:
lib/prompt_objects/primitives/think.rb

Overview

Optional standard-library capability for visible reasoning notes. Prompt Objects must declare this tool explicitly when its trace is useful.

Instance Attribute Summary

Attributes inherited from Capability

#state

Instance Method Summary collapse

Methods inherited from PromptObjects::Primitive

#initialize

Methods inherited from Capability

#descriptor, execution_policy, execution_policy_definition, #execution_policy_definition, #execution_policy_signature, #initialize, #resolved_execution_policy

Constructor Details

This class inherits a constructor from PromptObjects::Primitive

Instance Method Details

#descriptionObject



14
15
16
# File 'lib/prompt_objects/primitives/think.rb', line 14

def description
  "Record a visible reasoning note before acting. Use only when an explicit thinking trace helps the human follow the work."
end

#nameObject



10
11
12
# File 'lib/prompt_objects/primitives/think.rb', line 10

def name
  "think"
end

#parametersObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/prompt_objects/primitives/think.rb', line 18

def parameters
  {
    type: "object",
    properties: {
      thought: {
        type: "string",
        description: "Reasoning to show in the conversation"
      }
    },
    required: ["thought"]
  }
end

#receive(message, context:) ⇒ Object



31
32
33
# File 'lib/prompt_objects/primitives/think.rb', line 31

def receive(message, context:)
  "Thought recorded."
end