ChatCompletion_messages Derived Type

type, private :: ChatCompletion_messages


Inherited by

type~~chatcompletion_messages~~InheritedByGraph type~chatcompletion_messages ChatCompletion_messages type~chatcompletion ChatCompletion type~chatcompletion->type~chatcompletion_messages messages

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: role
character(len=:), public, allocatable :: content
character(len=:), public, allocatable :: name

Type-Bound Procedures

procedure, private :: deallocate_role

procedure, private :: deallocate_content

procedure, private :: deallocate_name

procedure, public :: finalize => deallocate_ChatCompletion_messages

procedure, public :: set => set_message

  • private pure elemental subroutine set_message(this, role, content, name)

    Author
    Seyed Ali Ghasemi

    Arguments

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

procedure, private :: set_role

  • private pure elemental subroutine set_role(this, role)

    Author
    Seyed Ali Ghasemi

    Arguments

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

procedure, private :: set_content

  • private pure elemental subroutine set_content(this, content)

    Author
    Seyed Ali Ghasemi

    Arguments

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

procedure, private :: set_name

  • private pure elemental subroutine set_name(this, name)

    Author
    Seyed Ali Ghasemi

    Arguments

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

Source Code

   type :: ChatCompletion_messages
      character(len=:), allocatable :: role
      character(len=:), allocatable :: content
      character(len=:), allocatable :: name
   contains
      procedure, private :: deallocate_role
      procedure, private :: deallocate_content
      procedure, private :: deallocate_name
      procedure :: finalize => deallocate_ChatCompletion_messages
      procedure :: set => set_message
      procedure, private :: set_role
      procedure, private :: set_content
      procedure, private :: set_name
   end type ChatCompletion_messages