adamrushy / OpenAISwift

This is a wrapper library around the ChatGPT and OpenAI HTTP API
MIT License
1.6k stars 242 forks source link

adding numChoices to sendCompletion #67

Open workingDog opened 1 year ago

workingDog commented 1 year ago

Thank you for creating such a useful Swift Package.

It would be great if you could tweak your code by adding a simple property, to allow for selecting the number of choices to the input of text sendCompletion(), similar to what you already have for sendImages() with numImages.

This would mean: in struct Command: Encodable add let numChoices: Int. In extension OpenAISwift add numChoices: Int = 1 to the end of sendCompletion(with prompt:...), similarly for sendCompletion(with prompt:...) async.

I feel that a formal pull request for such a minor update is not warranted.