Class: Agents::EchoGptAgent

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

Overview

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

Instance Attribute Summary

Attributes inherited from Agent

#actions

Instance Method Summary collapse

Methods inherited from Agent

#initialize, #register, #unregister

Constructor Details

This class inherits a constructor from Agents::Agent

Instance Method Details

#handle(request:) ⇒ Object

Parameters:



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

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