init_messages Subroutine

private pure elemental subroutine init_messages(this, n)

Type Bound

ChatCompletion

Arguments

Type IntentOptional Attributes Name
class(ChatCompletion), intent(inout) :: this
integer, intent(in) :: n

Called by

proc~~init_messages~~CalledByGraph proc~init_messages foropenai_ChatCompletion::ChatCompletion%init_messages proc~conversation foropenai_ChatCompletion::ChatCompletion%conversation proc~conversation->proc~init_messages program~test_chatcompletion test_ChatCompletion program~test_chatcompletion->proc~init_messages

Source Code

   elemental pure subroutine init_messages(this, n)
      class(ChatCompletion), intent(inout) :: this
      integer,               intent(in)    :: n
      if (.not. allocated(this%messages)) allocate(this%messages(n))
   end subroutine init_messages