mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 16:15:50 +00:00
ci: auto build & obfuscate [2026-05-16 19:16:28] (Jenkins #21)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import Options from './Options.js';
|
||||
import { detectVendorSync, getRegistry } from '../../../utils/api-vendor.js';
|
||||
|
||||
getRegistry().catch(() => {});
|
||||
|
||||
/**
|
||||
* RequestBody (DTO)
|
||||
@@ -24,7 +27,10 @@ export class RequestBody {
|
||||
*/
|
||||
toPayload() {
|
||||
const { apiUrl, apiKey, model, maxTokens, temperature, params, fakeStream } = this.options;
|
||||
const isGoogle = apiUrl && apiUrl.includes('googleapis.com');
|
||||
const detectedVendor = detectVendorSync(apiUrl);
|
||||
const isGoogle = detectedVendor
|
||||
? detectedVendor === 'google'
|
||||
: Boolean(apiUrl && apiUrl.includes('googleapis.com'));
|
||||
|
||||
// 基础字段 (Base Fields)
|
||||
const payload = {
|
||||
@@ -71,4 +77,4 @@ export class RequestBody {
|
||||
}
|
||||
}
|
||||
|
||||
export default RequestBody;
|
||||
export default RequestBody;
|
||||
|
||||
Reference in New Issue
Block a user