OpenAISwift icon indicating copy to clipboard operation
OpenAISwift copied to clipboard

Added user, temperature, topProbabilityMass, choices, stop, presencePenalty, frequencyPenalty parameters to ChatConversation and sendChat functions.

Open JosephChing opened this issue 1 year ago • 1 comments

Added the following to the ChatConversation, and both sendChat functions:

  • user
  • temperature
  • topProbabilityMass (top_p)
  • choices (n)
  • stop
  • presencePenalty (presence_penalty)
  • frequencyPenalty (frequency_penalty)

Corresponding strings have been added to the CodingKeys in ChatConversation. All added parameters are optional values, and do not have to be added when calling sendChat.

Note that the following parameters still need to be added:

  • stream
  • logit_bias

The stream parameter makes it so that tokens are sent as server-sent events. This may require the use of another library such as https://github.com/inaka/EventSource.

JosephChing avatar Mar 08 '23 06:03 JosephChing

@JosephChing thanks for the PR can you resolve conflicts? Thank you!

adamrushy avatar Mar 09 '23 07:03 adamrushy

@adamrushy Done!

JosephChing avatar Mar 09 '23 18:03 JosephChing