From 74b60b4e95a5b431daed5a157c4b4fc01df8995b Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 24 Feb 2024 09:47:44 +0800 Subject: [PATCH] fix: logprobs in vision model not permit --- src/chatgpt.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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();