Skip to content

Commit

Permalink
Fix using deprecated field
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Jan 22, 2025
1 parent 587a983 commit 56f8d7e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static void onMessage(ChatMessageReceiveEvent event) {

var requestModel = event.connection().metadata().getOrSet(PLAYER_CONVERSATIONS, () -> ChatCompletionCreateParams.builder()
.model(model)
.maxTokens(64) // 256 / 4 = 64
.maxCompletionTokens(64) // 256 / 4 = 64
.addMessage(ChatCompletionMessageParam.ofChatCompletionSystemMessageParam(ChatCompletionSystemMessageParam.builder()
.role(ChatCompletionSystemMessageParam.Role.SYSTEM)
.content(ChatCompletionSystemMessageParam.Content.ofTextContent(settingsSource.get(AIChatBotSettings.PROMPT)))
Expand Down

0 comments on commit 56f8d7e

Please sign in to comment.