set_api_key Subroutine

private pure elemental subroutine set_api_key(this, api_key)

Type Bound

openai

Arguments

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

Called by

proc~~set_api_key~~CalledByGraph proc~set_api_key foropenai_base::openai%set_api_key proc~set_api_key_env foropenai_base::openai%set_api_key_env proc~set_api_key_env->proc~set_api_key proc~set_base_data foropenai_base::openai%set_base_data proc~set_base_data->proc~set_api_key proc~set_base_data->proc~set_api_key_env 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 pure subroutine set_api_key(this, api_key)
      class(openai),    intent(inout) :: this
      character(len=*), intent(in)    :: api_key
      this%api_key = trim(api_key)
   end subroutine set_api_key