Skip to content

Commit

Permalink
OpenAI: added maxCompletionTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
langchain4j committed Sep 16, 2024
1 parent bb1556f commit dfd6c11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ OpenAiChatModel openAiChatModel(Properties properties) {
.topP(chatModelProperties.getTopP())
.stop(chatModelProperties.getStop())
.maxTokens(chatModelProperties.getMaxTokens())
.maxCompletionTokens(chatModelProperties.getMaxCompletionTokens())
.presencePenalty(chatModelProperties.getPresencePenalty())
.frequencyPenalty(chatModelProperties.getFrequencyPenalty())
.logitBias(chatModelProperties.getLogitBias())
Expand Down Expand Up @@ -57,6 +58,7 @@ OpenAiStreamingChatModel openAiStreamingChatModel(Properties properties) {
.topP(chatModelProperties.getTopP())
.stop(chatModelProperties.getStop())
.maxTokens(chatModelProperties.getMaxTokens())
.maxCompletionTokens(chatModelProperties.getMaxCompletionTokens())
.presencePenalty(chatModelProperties.getPresencePenalty())
.frequencyPenalty(chatModelProperties.getFrequencyPenalty())
.logitBias(chatModelProperties.getLogitBias())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ChatModelProperties {
Double topP;
List<String> stop;
Integer maxTokens;
Integer maxCompletionTokens;
Double presencePenalty;
Double frequencyPenalty;
Map<String, Integer> logitBias;
Expand Down

0 comments on commit dfd6c11

Please sign in to comment.