Class: Agents::EchoGptClient

Inherits:
GptClient show all
Defined in:
lib/gpt_clients/echo_gpt_client.rb

Instance Method Summary collapse

Methods inherited from GptClient

#initialize

Constructor Details

This class inherits a constructor from Agents::GptClient

Instance Method Details

#chat(prompt: "", **args) ⇒ GPTResponse

Returns the input prompt as the output.

Parameters:

  • prompt (String) (defaults to: "")

Returns:

  • (GPTResponse)

    response The response will be the same as the prompt.



7
8
9
# File 'lib/gpt_clients/echo_gpt_client.rb', line 7

def chat(prompt: "", **args)
  GptResponse.new(prompt.to_s)
end