You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since our focus is on beginners, would different method names be better?
#add_system, #add_user, #add_assistant instead of #system, #user, #assistant? The latter are concise but can be confused for an assignment rather than pushing new messages into an array (I've made this mistake myself, trying something like c.user = "hi" instead of c.user("hi")).
Or, just one: #add_message, or maybe #add to make it easier to type:
chat.add("Content goes here",role: "system")# role defaults to "user"
Since our focus is on beginners, would different method names be better?
#add_system,#add_user,#add_assistantinstead of#system,#user,#assistant? The latter are concise but can be confused for an assignment rather than pushing new messages into an array (I've made this mistake myself, trying something likec.user = "hi"instead ofc.user("hi")).Or, just one:
#add_message, or maybe#addto make it easier to type:Having just one method to add a message, rather than three role-based ones, would align with the goals written here: Change multiturn image example ai-chat#12
Rather than
#assistant!, maybe:#sendbecause it is reserved. Not#send!because it is too close to the reserved one.#generate#complete#submit#ai#call#post#next#execute!version of one of the above?