set_role Subroutine

private pure elemental subroutine set_role(this, role)

Type Bound

ChatCompletion_messages

Arguments

Type IntentOptional Attributes Name
class(ChatCompletion_messages), intent(inout) :: this
character(len=*), intent(in) :: role

Called by

proc~~set_role~~CalledByGraph proc~set_role foropenai_ChatCompletion::ChatCompletion_messages%set_role proc~conversation foropenai_ChatCompletion::ChatCompletion%conversation proc~conversation->proc~set_role

Source Code

   elemental pure subroutine set_role(this, role)
      class(ChatCompletion_messages), intent(inout) :: this
      character(len=*),               intent(in)    :: role
      this%role = trim(role)
   end subroutine set_role