Support long responses and additional fixes #104
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, responses are generated by randomly selecting one sentence from a predefined list. As a result, even when max_token is set to a large value, long messages are never returned.
The suggestion to use a lorem ipsum generator was declined because the library we identified can produce only up to 191 words; any request for a larger word count causes it to panic.
New behavior:
max_tokensormax_completion_tokensis set to value higher than the input tokens number, ifmax_tokensormax_completion_tokensis lower - the input will be trimmed. Useful for testing where we need to know exact response in advance.max_tokensormax_completion_tokensis specified, sentences are selected from the predefined collection until the token count reaches the limitAdditional changes:
max_tokenandmax_completion_tokenas request arrived and return 400 status if it's invalid