Skip to content

Commit efa3831

Browse files
committed
Adding topK for the Config Class ??
1 parent 687fe2e commit efa3831

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiChatCompletionConfig.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ public class OpenAiChatCompletionConfig {
4040
*/
4141
@Nullable BigDecimal topP;
4242

43+
/**
44+
* Controls the number of top tokens to consider for sampling.
45+
*
46+
* <p>Higher values (e.g. 50) allow the model to consider more tokens, while lower values (e.g. 1)
47+
* restrict it to the most probable token.
48+
*/
49+
@Nullable Integer topK;
50+
4351
/** Maximum number of tokens that can be generated for the completion. */
4452
@Nullable Integer maxTokens;
4553

0 commit comments

Comments
 (0)