Method: OpenApiOpenAIClient::CreateCompletionRequest#max_tokens

Defined in:
lib/openapi_openai/models/create_completion_request.rb

#max_tokensObject

The maximum number of [tokens](/tokenizer) to generate in the completion. The token count of your prompt plus ‘max_tokens` cannot exceed the model’s context length. [Example Python code](github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb) for counting tokens.



26
27
28
# File 'lib/openapi_openai/models/create_completion_request.rb', line 26

def max_tokens
  @max_tokens
end