usage Derived Type

type, private :: usage


Inherited by

type~~usage~~InheritedByGraph type~usage usage type~chatcompletion ChatCompletion type~chatcompletion->type~usage usage

Components

Type Visibility Attributes Name Initial
integer, public :: prompt_tokens = 0
integer, public :: completion_tokens = 0
integer, public :: total_tokens = 0

Type-Bound Procedures

procedure, private :: print_prompt_tokens

  • private impure elemental subroutine print_prompt_tokens(this)

    Author
    Seyed Ali Ghasemi

    Arguments

    Type IntentOptional Attributes Name
    class(usage), intent(inout) :: this

procedure, private :: print_completion_tokens

  • private impure elemental subroutine print_completion_tokens(this)

    Author
    Seyed Ali Ghasemi

    Arguments

    Type IntentOptional Attributes Name
    class(usage), intent(inout) :: this

procedure, private :: print_total_tokens

  • private impure elemental subroutine print_total_tokens(this)

    Author
    Seyed Ali Ghasemi

    Arguments

    Type IntentOptional Attributes Name
    class(usage), intent(inout) :: this

procedure, public :: print => print_usage

  • private impure elemental subroutine print_usage(this)

    Author
    Seyed Ali Ghasemi

    Arguments

    Type IntentOptional Attributes Name
    class(usage), intent(inout) :: this

Source Code

   type usage
      integer :: prompt_tokens=0
      integer :: completion_tokens=0
      integer :: total_tokens=0
   contains
      procedure, private :: print_prompt_tokens
      procedure, private :: print_completion_tokens
      procedure, private :: print_total_tokens
      procedure :: print => print_usage
   end type usage