Skip to content

Commit eb6664b

Browse files
kaikreuzerCopilot
andcommitted
Use max_completion_tokens for OpenAI
Keep the existing maxTokens configuration key for backward compatibility while sending OpenAI-compatible chat completion payloads with max_completion_tokens. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Kai Kreuzer <kai@openhab.org>
1 parent 2676d1b commit eb6664b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • bundles/org.openhab.binding.chatgpt/src/main/java/org/openhab/binding/chatgpt/internal/api/dto

bundles/org.openhab.binding.chatgpt/src/main/java/org/openhab/binding/chatgpt/internal/api/dto/ChatRequestBody.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class ChatRequestBody {
2828
private Double temperature;
2929
@JsonProperty("top_p")
3030
private Double topP;
31-
@JsonProperty("max_tokens")
31+
@JsonProperty("max_completion_tokens")
3232
private Integer maxTokens;
3333
private String user;
3434
private List<ChatTools> tools;

0 commit comments

Comments
 (0)