Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/mars/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def initialize(name:, options: {}, tools: [], schema: nil, instructions: nil)
end

def run(input)
chat.ask(input).content
processed_input = before_run(input)
response = chat.ask(processed_input).content
after_run(response)
end

private
Expand All @@ -26,5 +28,13 @@ def chat
.with_tools(*tools)
.with_schema(schema)
end

def before_run(input)
input
end

def after_run(response)
response
end
end
end
Loading