test4.f90 Source File


This file depends on

sourcefile~~test4.f90~~EfferentGraph sourcefile~test4.f90 test4.f90 sourcefile~foropenai.f90 foropenai.f90 sourcefile~test4.f90->sourcefile~foropenai.f90 sourcefile~foropenai_base.f90 foropenai_base.f90 sourcefile~foropenai.f90->sourcefile~foropenai_base.f90 sourcefile~foropenai_chatcompletion.f90 foropenai_ChatCompletion.f90 sourcefile~foropenai.f90->sourcefile~foropenai_chatcompletion.f90 sourcefile~foropenai_imagegeneration.f90 foropenai_ImageGeneration.f90 sourcefile~foropenai.f90->sourcefile~foropenai_imagegeneration.f90 sourcefile~foropenai_transcription.f90 foropenai_Transcription.f90 sourcefile~foropenai.f90->sourcefile~foropenai_transcription.f90 sourcefile~foropenai_translation.f90 foropenai_Translation.f90 sourcefile~foropenai.f90->sourcefile~foropenai_translation.f90 sourcefile~foropenai_chatcompletion.f90->sourcefile~foropenai_base.f90 sourcefile~foropenai_imagegeneration.f90->sourcefile~foropenai_base.f90 sourcefile~foropenai_transcription.f90->sourcefile~foropenai_base.f90 sourcefile~foropenai_translation.f90->sourcefile~foropenai_base.f90

Source Code

program test_ImageGeneration

   use foropenai, only: ImageGeneration

   implicit none

   type(ImageGeneration) :: image

   call image%set_base_data(file_name='foropenai.json')
   call image%set(file_name='foropenai.json')

   call image%create(prompt='a cat with a computer')
   call image%print_prompt()
   call image%print_assistant_response()

   call image%finalize()

end program test_ImageGeneration