Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ChatCompletion_messages), | intent(inout) | :: | this | |||
character(len=*), | intent(in) | :: | role | |||
character(len=*), | intent(in) | :: | content | |||
character(len=*), | intent(in), | optional | :: | name |
elemental pure subroutine set_message(this, role, content, name) class(ChatCompletion_messages), intent(inout) :: this character(len=*), intent(in) :: role character(len=*), intent(in) :: content character(len=*), optional, intent(in) :: name this%role = trim(role) this%content = trim(content) if (present(name)) this%name = trim(name) end subroutine set_message