diff --git a/src/chatgpt.ts b/src/chatgpt.ts index 3c84a86..a193f4d 100644 --- a/src/chatgpt.ts +++ b/src/chatgpt.ts @@ -219,7 +219,6 @@ class Chat { model: this.model, messages, stream, - logprobs, presence_penalty: this.presence_penalty, frequency_penalty: this.frequency_penalty, }; @@ -237,6 +236,9 @@ class Chat { type: "json_object", }; } + if (logprobs) { + body["logprobs"] = true; + } // parse toolsString to function call format const ts = this.toolsString.trim();