load_presence_penalty Subroutine

private impure elemental subroutine load_presence_penalty(this)

Uses

    • json_module
  • proc~~load_presence_penalty~~UsesGraph proc~load_presence_penalty foropenai_ChatCompletion::ChatCompletion%load_presence_penalty json_module json_module proc~load_presence_penalty->json_module

Type Bound

ChatCompletion

Arguments

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

Calls

proc~~load_presence_penalty~~CallsGraph proc~load_presence_penalty foropenai_ChatCompletion::ChatCompletion%load_presence_penalty destroy destroy proc~load_presence_penalty->destroy get get proc~load_presence_penalty->get initialize initialize proc~load_presence_penalty->initialize load_file load_file proc~load_presence_penalty->load_file

Called by

proc~~load_presence_penalty~~CalledByGraph proc~load_presence_penalty foropenai_ChatCompletion::ChatCompletion%load_presence_penalty proc~load_chatcompletion_data foropenai_ChatCompletion::ChatCompletion%load_ChatCompletion_data proc~load_chatcompletion_data->proc~load_presence_penalty proc~set_chatcompletion_data foropenai_ChatCompletion::ChatCompletion%set_ChatCompletion_data proc~set_chatcompletion_data->proc~load_chatcompletion_data proc~conversation foropenai_ChatCompletion::ChatCompletion%conversation proc~conversation->proc~set_chatcompletion_data program~test_chatcompletion test_ChatCompletion program~test_chatcompletion->proc~set_chatcompletion_data

Source Code

   elemental impure subroutine load_presence_penalty(this)
      use json_module, only: json_file
      class(ChatCompletion), intent(inout) :: this
      type(json_file)                      :: json
      real                                 :: tmp
      logical                              :: found
      call json%initialize()
      call json%load_file(trim(this%file_name))
      call json%get("ChatCompletion.presence_penalty", tmp, found=found)
      if (found) this%presence_penalty = tmp
      call json%destroy()
   end subroutine load_presence_penalty