Skip to content

Commit

Permalink
o1-preview and o1-mini
Browse files Browse the repository at this point in the history
support added, exclude developer
  • Loading branch information
appatalks authored Dec 23, 2024
1 parent 8cbae59 commit cf31812
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/js/gpt-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ function trboSend() {
var cStoredMessages = localStorage.getItem("messages");
kMessages = cStoredMessages ? JSON.parse(cStoredMessages) : [];

// Exclude messages with the "developer" role see
// https://github.com/appatalks/chatgpt-html/issues/63#issuecomment-2492821202
if (sModel === 'o1-preview' || sModel === 'o1-mini') {
kMessages = kMessages.filter(msg => msg.role === 'user' || msg.role === 'assistant');
dTemperature = 1;
}

// API Payload
var data = {
model: sModel,
Expand Down

0 comments on commit cf31812

Please sign in to comment.