lib/boxcars/boxcar.rb in boxcars-0.2.1 vs lib/boxcars/boxcar.rb in boxcars-0.2.2

- old
+ new

@@ -76,9 +76,25 @@ rv = depart(*args, **kwargs) Boxcars.info "< Exiting #{name}#run", :gray, style: :bold rv end + # helpers for conversation prompt building + # assistant message + def self.assi(*strs) + [:assistant, strs.join] + end + + # system message + def self.syst(*strs) + [:system, strs.join] + end + + # user message + def self.user(*strs) + [:user, strs.join] + end + private # Get an answer from the boxcar. def run_boxcar(inputs:, return_only_outputs: false) inputs = our_inputs(inputs)