Compare commits
3 Commits
2224d2e5ed
...
74b60b4e95
| Author | SHA1 | Date | |
|---|---|---|---|
|
74b60b4e95
|
|||
|
24aba9ae07
|
|||
|
4b1f81f72b
|
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
const logprobToColor = (logprob: number) => {
|
||||
// 将logprob转换为百分比
|
||||
const percent = Math.exp(logprob) * 100;
|
||||
|
||||
Reference in New Issue
Block a user