mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-28 22:08:38 +00:00
feat: grok Usage Guidelines Violation Fee (#2753)
* feat: grok Usage Guidelines Violation Fee ui setting * feat: grok Usage Guidelines Violation Fee consume log * fix: grok Usage Guidelines Violation Fee log detail
This commit is contained in:
@@ -18,9 +18,16 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
export function getLogOther(otherStr) {
|
||||
if (otherStr === undefined || otherStr === '') {
|
||||
otherStr = '{}';
|
||||
if (otherStr === undefined || otherStr === null || otherStr === '') {
|
||||
return {};
|
||||
}
|
||||
if (typeof otherStr === 'object') {
|
||||
return otherStr;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(otherStr);
|
||||
} catch (e) {
|
||||
console.error(`Failed to parse record.other: "${otherStr}".`, e);
|
||||
return null;
|
||||
}
|
||||
let other = JSON.parse(otherStr);
|
||||
return other;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user