load_organization Subroutine

private impure elemental subroutine load_organization(this, file_name)

Uses

    • json_module
  • proc~~load_organization~~UsesGraph proc~load_organization foropenai_base::openai%load_organization json_module json_module proc~load_organization->json_module

Type Bound

openai

Arguments

Type IntentOptional Attributes Name
class(openai), intent(inout) :: this
character(len=*), intent(in), optional :: file_name

Calls

proc~~load_organization~~CallsGraph proc~load_organization foropenai_base::openai%load_organization destroy destroy proc~load_organization->destroy get get proc~load_organization->get initialize initialize proc~load_organization->initialize load_file load_file proc~load_organization->load_file proc~set_file_name foropenai_base::openai%set_file_name proc~load_organization->proc~set_file_name

Called by

proc~~load_organization~~CalledByGraph proc~load_organization foropenai_base::openai%load_organization proc~load_base_data foropenai_base::openai%load_base_data proc~load_base_data->proc~load_organization proc~set_base_data foropenai_base::openai%set_base_data proc~set_base_data->proc~load_organization proc~conversation foropenai_ChatCompletion::ChatCompletion%conversation proc~conversation->proc~set_base_data program~test_base test_base program~test_base->proc~set_base_data program~test_chatcompletion test_ChatCompletion program~test_chatcompletion->proc~set_base_data program~test_imagegeneration test_ImageGeneration program~test_imagegeneration->proc~set_base_data program~test_transcription test_Transcription program~test_transcription->proc~set_base_data program~test_translation test_Translation program~test_translation->proc~set_base_data

Source Code

   elemental impure subroutine load_organization(this, file_name)
      use json_module, only: json_file
      class(openai),    intent(inout)        :: this
      character(len=*), intent(in), optional :: file_name
      type(json_file)                        :: json
      if (present(file_name)) call this%set_file_name(file_name)
      call json%initialize()
      call json%load_file(trim(this%file_name))
      call json%get("base.organization", this%organization)
      call json%destroy()
   end subroutine load_organization