Compare commits

...

3 Commits

Author SHA1 Message Date
74b60b4e95 fix: logprobs in vision model not permit 2024-02-24 09:47:44 +08:00
24aba9ae07 fix: old version logprobs to false 2024-02-23 19:46:09 +08:00
4b1f81f72b fix: build 2024-02-23 19:04:41 +08:00
3 changed files with 3 additions and 4 deletions

View File

@@ -217,7 +217,6 @@ export function App() {
message.token = calculate_token_length(message.content);
}
if (ret.cost === undefined) ret.cost = 0;
if (ret.logprobs === undefined) ret.logprobs = true;
return ret;
};

View File

@@ -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();

View File

@@ -1,5 +1,3 @@
import React from "react";
const logprobToColor = (logprob: number) => {
// 将logprob转换为百分比
const percent = Math.exp(logprob) * 100;