examples/airline/configs/agents.rb in ruby-openai-swarm-0.4.0.1 vs examples/airline/configs/agents.rb in ruby-openai-swarm-0.4.0.2
- old
+ new
@@ -42,22 +42,22 @@
end
# Define agents
def triage_agent
@triage_agent ||= OpenAISwarm::Agent.new(
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
name: "Triage Agent",
instructions: method(:triage_instructions),
functions: [
method(:transfer_to_flight_modification),
method(:transfer_to_lost_baggage)]
)
end
def flight_modification
@flight_modification ||= OpenAISwarm::Agent.new(
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
name: "Flight Modification Agent",
instructions: <<~INSTRUCTIONS,
You are a Flight Modification Agent for a customer service airlines company.
You are an expert customer service agent deciding which sub-intent the user should be referred to.
You already know the intent is for flight modification-related questions. First, look at the message history and see if you can determine if the user wants to cancel or change their flight.
@@ -68,11 +68,11 @@
)
end
def flight_cancel
@flight_cancel ||= OpenAISwarm::Agent.new(
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
name: "Flight Cancel Traversal",
instructions: STARTER_PROMPT + FLIGHT_CANCELLATION_POLICY,
functions: [
method(:escalate_to_agent),
method(:initiate_refund),
@@ -83,11 +83,11 @@
)
end
def flight_change
@flight_change ||= OpenAISwarm::Agent.new(
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
name: "Flight Change Traversal",
instructions: STARTER_PROMPT + FLIGHT_CHANGE_POLICY,
functions: [
method(:escalate_to_agent),
method(:change_flight),
@@ -98,10 +98,10 @@
)
end
def lost_baggage
@lost_baggage ||= OpenAISwarm::Agent.new(
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
name: "Lost Baggage Traversal",
instructions: STARTER_PROMPT + LOST_BAGGAGE_POLICY,
functions: [
method(:escalate_to_agent),
method(:initiate_baggage_search),