set_ChatCompletion_data Subroutine

private impure elemental subroutine set_ChatCompletion_data(this, file_name, url, model, user_name, temperature, presence_penalty, frequency_penalty, top_p, n, stream, max_tokens)

Type Bound

ChatCompletion

Arguments

Type IntentOptional Attributes Name
class(ChatCompletion), intent(inout) :: this
character(len=*), intent(in), optional :: file_name
character(len=*), intent(in), optional :: url
character(len=*), intent(in), optional :: model
character(len=*), intent(in), optional :: user_name
real, intent(in), optional :: temperature
real, intent(in), optional :: presence_penalty
real, intent(in), optional :: frequency_penalty
real, intent(in), optional :: top_p
integer, intent(in), optional :: n
logical, intent(in), optional :: stream
integer, intent(in), optional :: max_tokens

Calls

proc~~set_chatcompletion_data~~CallsGraph proc~set_chatcompletion_data foropenai_ChatCompletion::ChatCompletion%set_ChatCompletion_data proc~load_chatcompletion_data foropenai_ChatCompletion::ChatCompletion%load_ChatCompletion_data proc~set_chatcompletion_data->proc~load_chatcompletion_data proc~set_file_name foropenai_base::openai%set_file_name proc~set_chatcompletion_data->proc~set_file_name proc~set_frequency_penalty foropenai_ChatCompletion::ChatCompletion%set_frequency_penalty proc~set_chatcompletion_data->proc~set_frequency_penalty proc~set_max_tokens foropenai_ChatCompletion::ChatCompletion%set_max_tokens proc~set_chatcompletion_data->proc~set_max_tokens proc~set_model~2 foropenai_ChatCompletion::ChatCompletion%set_model proc~set_chatcompletion_data->proc~set_model~2 proc~set_n foropenai_ChatCompletion::ChatCompletion%set_n proc~set_chatcompletion_data->proc~set_n proc~set_presence_penalty foropenai_ChatCompletion::ChatCompletion%set_presence_penalty proc~set_chatcompletion_data->proc~set_presence_penalty proc~set_stream foropenai_ChatCompletion::ChatCompletion%set_stream proc~set_chatcompletion_data->proc~set_stream proc~set_temperature~2 foropenai_ChatCompletion::ChatCompletion%set_temperature proc~set_chatcompletion_data->proc~set_temperature~2 proc~set_top_p foropenai_ChatCompletion::ChatCompletion%set_top_p proc~set_chatcompletion_data->proc~set_top_p proc~set_url~2 foropenai_ChatCompletion::ChatCompletion%set_url proc~set_chatcompletion_data->proc~set_url~2 proc~set_user_name foropenai_ChatCompletion::ChatCompletion%set_user_name proc~set_chatcompletion_data->proc~set_user_name proc~load_chatcompletion_data->proc~set_file_name proc~load_frequency_penalty foropenai_ChatCompletion::ChatCompletion%load_frequency_penalty proc~load_chatcompletion_data->proc~load_frequency_penalty proc~load_max_tokens foropenai_ChatCompletion::ChatCompletion%load_max_tokens proc~load_chatcompletion_data->proc~load_max_tokens proc~load_model~2 foropenai_ChatCompletion::ChatCompletion%load_model proc~load_chatcompletion_data->proc~load_model~2 proc~load_n foropenai_ChatCompletion::ChatCompletion%load_n proc~load_chatcompletion_data->proc~load_n proc~load_presence_penalty foropenai_ChatCompletion::ChatCompletion%load_presence_penalty proc~load_chatcompletion_data->proc~load_presence_penalty proc~load_stream foropenai_ChatCompletion::ChatCompletion%load_stream proc~load_chatcompletion_data->proc~load_stream proc~load_temperature~2 foropenai_ChatCompletion::ChatCompletion%load_temperature proc~load_chatcompletion_data->proc~load_temperature~2 proc~load_top_p foropenai_ChatCompletion::ChatCompletion%load_top_p proc~load_chatcompletion_data->proc~load_top_p proc~load_url~2 foropenai_ChatCompletion::ChatCompletion%load_url proc~load_chatcompletion_data->proc~load_url~2 proc~load_user_name foropenai_ChatCompletion::ChatCompletion%load_user_name proc~load_chatcompletion_data->proc~load_user_name destroy destroy proc~load_frequency_penalty->destroy get get proc~load_frequency_penalty->get initialize initialize proc~load_frequency_penalty->initialize load_file load_file proc~load_frequency_penalty->load_file proc~load_max_tokens->destroy proc~load_max_tokens->get proc~load_max_tokens->initialize proc~load_max_tokens->load_file proc~load_model~2->destroy proc~load_model~2->get proc~load_model~2->initialize proc~load_model~2->load_file proc~load_n->destroy proc~load_n->get proc~load_n->initialize proc~load_n->load_file proc~load_presence_penalty->destroy proc~load_presence_penalty->get proc~load_presence_penalty->initialize proc~load_presence_penalty->load_file proc~load_stream->destroy proc~load_stream->get proc~load_stream->initialize proc~load_stream->load_file proc~load_temperature~2->destroy proc~load_temperature~2->get proc~load_temperature~2->initialize proc~load_temperature~2->load_file proc~load_top_p->destroy proc~load_top_p->get proc~load_top_p->initialize proc~load_top_p->load_file proc~load_url~2->destroy proc~load_url~2->get proc~load_url~2->initialize proc~load_url~2->load_file proc~load_user_name->destroy proc~load_user_name->get proc~load_user_name->initialize proc~load_user_name->load_file

Called by

proc~~set_chatcompletion_data~~CalledByGraph proc~set_chatcompletion_data foropenai_ChatCompletion::ChatCompletion%set_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 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