Class: Agents::PromptlessGptAgent

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

Overview

An agent that does not add a prompt to the request, but simply passes it through. Use if your test _is _the prompt, for example.

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



5
6
7
# File 'lib/agents/promptless_gpt_agent.rb', line 5

def handle(request:)
  Response.new(response_text: gpt_client.chat(prompt: request.request_text))
end