Skip to content

Commit a16565f

Browse files
authored
Update azure-openai-chat.adoc
Update content to add spring.ai.openai.chat.options.maxCompletionTokens property
1 parent 96d6686 commit a16565f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ It's important to note that within an Azure OpenAI deployment, the "Deployment N
227227
The confusion around these terms stems from the intention to make the Azure OpenAI client library compatible with the original OpenAI endpoint.
228228
The deployment structures offered by Azure OpenAI and Sam Altman's OpenAI differ significantly.
229229
Deployments model name to provide as part of this completions request. | gpt-4o
230-
| spring.ai.azure.openai.chat.options.maxTokens | The maximum number of tokens to generate. | -
230+
| spring.ai.azure.openai.chat.options.maxTokens | (Deprecated in favour of `maxCompletionTokens`) The maximum number of tokens allowed for the generated answer. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with o1 series models. | -
231+
| spring.ai.openai.chat.options.maxCompletionTokens | An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. | -
231232
| spring.ai.azure.openai.chat.options.temperature | The sampling temperature to use that controls the apparent creativity of generated completions. Higher values will make output more random while lower values will make results more focused and deterministic. It is not recommended to modify temperature and top_p for the same completions request as the interaction of these two settings is difficult to predict. | 0.7
232233
| spring.ai.azure.openai.chat.options.topP | An alternative to sampling with temperature called nucleus sampling. This value causes the model to consider the results of tokens with the provided probability mass. | -
233234
| spring.ai.azure.openai.chat.options.logitBias | A map between GPT token IDs and bias scores that influences the probability of specific tokens appearing in a completions response. Token IDs are computed via external tokenizer tools, while bias scores reside in the range of -100 to 100 with minimum and maximum values corresponding to a full ban or exclusive selection of a token, respectively. The exact behavior of a given bias score varies by model. | -
@@ -408,7 +409,7 @@ var openAIClientBuilder = new OpenAIClientBuilder()
408409
var openAIChatOptions = AzureOpenAiChatOptions.builder()
409410
.deploymentName("gpt-4o")
410411
.temperature(0.4)
411-
.maxTokens(200)
412+
.maxCompletionTokens(200)
412413
.build();
413414
414415
var chatModel = AzureOpenAiChatModel.builder()

0 commit comments

Comments
 (0)