Class: Agents::EchoGptAgent

Inherits:
Agent
  • Object
show all
Defined in:
lib/agents/echo_gpt_agent.rb

Overview

An agent that echoes back the request text. Useful for testing.

Constant Summary

Constants inherited from Agent

Agent::DEFAULT_SYSTEM_PROMPT

Instance Attribute Summary

Attributes inherited from Agent

#actions, #children, #description, #gpt_client, #name, #system_prompt

Instance Method Summary collapse

Methods inherited from Agent

#build_prompt, #delegate_request, #initialize

Constructor Details

This class inherits a constructor from Agents::Agent

Instance Method Details

#handle(request:) ⇒ Object

Parameters:



8
9
10
# File 'lib/agents/echo_gpt_agent.rb', line 8

def handle(request:)
  GptResponse.new(request.request_text)
end