Class: Agents::CalendarGptAgent
- Defined in:
- lib/agents/gpt_agents/calendar_gpt_agent.rb
Instance Attribute Summary collapse
-
#system_prompt ⇒ Object
readonly
Returns the value of attribute system_prompt.
Attributes inherited from GptAgent
Attributes inherited from Agent
Instance Method Summary collapse
- #handle(request:) ⇒ Object
-
#initialize(**args) ⇒ CalendarGptAgent
constructor
A new instance of CalendarGptAgent.
Methods inherited from GptAgent
Methods inherited from Agent
Constructor Details
#initialize(**args) ⇒ CalendarGptAgent
Returns a new instance of CalendarGptAgent.
5 6 7 8 9 10 11 |
# File 'lib/agents/gpt_agents/calendar_gpt_agent.rb', line 5 def initialize(**args) super(**args) @description = "I am an AI Assistant that specializes in Calendar and Scheduling Management for Appointments, meetings, etc." @system_prompt = <<~EOS You are a helpful assistant. EOS end |
Instance Attribute Details
#system_prompt ⇒ Object (readonly)
Returns the value of attribute system_prompt.
4 5 6 |
# File 'lib/agents/gpt_agents/calendar_gpt_agent.rb', line 4 def system_prompt @system_prompt end |
Instance Method Details
#handle(request:) ⇒ Object
13 14 15 |
# File 'lib/agents/gpt_agents/calendar_gpt_agent.rb', line 13 def handle(request:) gpt_client.chat system_prompt: system_prompt, prompt: request.request_text end |