elemental impure subroutine set_ChatCompletion_data(this, file_name, &
url, model, user_name, temperature, presence_penalty, frequency_penalty, top_p, n, stream, max_tokens)
class(ChatCompletion), intent(inout) :: this
character(len=*), optional, intent(in) :: file_name
character(len=*), optional, intent(in) :: url
character(len=*), optional, intent(in) :: model
character(len=*), optional, intent(in) :: user_name
real, optional, intent(in) :: temperature
real, optional, intent(in) :: presence_penalty
real, optional, intent(in) :: frequency_penalty
real, optional, intent(in) :: top_p
integer, optional, intent(in) :: n
logical, optional, intent(in) :: stream
integer, optional, intent(in) :: max_tokens
if (present(url)) call this%set_url(url=url)
if (present(model)) call this%set_model(model=model)
if (present(user_name)) call this%set_user_name(user_name=user_name)
if (present(temperature)) call this%set_temperature(temperature=temperature)
if (present(presence_penalty)) call this%set_presence_penalty(presence_penalty=presence_penalty)
if (present(frequency_penalty)) call this%set_frequency_penalty(frequency_penalty=frequency_penalty)
if (present(top_p)) call this%set_top_p(top_p=top_p)
if (present(n)) call this%set_n(n=n)
if (present(stream)) call this%set_stream(stream=stream)
if (present(max_tokens)) call this%set_max_tokens(max_tokens=max_tokens)
if (present(file_name)) then
call this%set_file_name(file_name)
call this%load(file_name)
end if
end subroutine set_ChatCompletion_data