srcnalt / OpenAI-Unity

An unofficial OpenAI Unity Package that aims to help you use OpenAI API directly in Unity Game engine.
MIT License
672 stars 150 forks source link

How to increase the number of tokens/symbols in Response #17

Closed infinity-nft closed 1 year ago

infinity-nft commented 1 year ago

Hello I have a question. Regardless of the MaxTokens parameter, the response from OpenAI seems short. How can I increase the number of tokens/characters in Response?

srcnalt commented 1 year ago

Hi @infinity-nft, responses of the API depends on the prompt as well as MaxTokens param. I sometimes use Reply in maximum x words as a part of the prompt to shorten it. You might reverse that and add it to your prompt as Reply in minimum x words. Let me know if that works.