openai-java icon indicating copy to clipboard operation
openai-java copied to clipboard

The message returned from the conversation is only partial.

Open Xxm-YX opened this issue 1 year ago • 1 comments

The message returned from the conversation is only partial,For example, returning a large block of code cannot be completed.

Xxm-YX avatar Jan 31 '24 04:01 Xxm-YX

you should consider altering the token limit of the request, so you get a more complete response. you should maybe also read the API documentation that clearly state this : https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens

basically take a look at ChatCompletionRequest.maxToken()

also the model you use have limits, lookup thoses.

Aelentel avatar Jan 31 '24 11:01 Aelentel