feat: 增加模型token限制并添加AWS登录提示信息
增加Gemini和Antigravity模型的输入输出token限制,同时在AWS登录表单中添加必要的提示信息,确保用户正确配置授权文件
This commit is contained in:
parent
029d97236b
commit
3ec219bcc7
4 changed files with 11 additions and 3 deletions
|
|
@ -432,8 +432,8 @@ export class AntigravityApiService {
|
|||
version: '1.0.0',
|
||||
displayName: displayName,
|
||||
description: `Antigravity model: ${modelId}`,
|
||||
inputTokenLimit: 32768,
|
||||
outputTokenLimit: 8192,
|
||||
inputTokenLimit: 1024000,
|
||||
outputTokenLimit: 65535,
|
||||
supportedGenerationMethods: ['generateContent', 'streamGenerateContent'],
|
||||
object: 'model',
|
||||
created: now,
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ export class GeminiApiService {
|
|||
return {
|
||||
name: `models/${modelId}`, version: "1.0.0", displayName: displayName,
|
||||
description: `A generative model for text and chat generation. ID: ${modelId}`,
|
||||
inputTokenLimit: 32768, outputTokenLimit: 8192,
|
||||
inputTokenLimit: 1024000, outputTokenLimit: 65535,
|
||||
supportedGenerationMethods: ["generateContent", "streamGenerateContent"],
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -809,6 +809,7 @@ function addDynamicConfigFields(form, providerType) {
|
|||
`;
|
||||
} else if (isOAuthFilePath1) {
|
||||
// OAuth凭据文件路径字段,添加上传按钮
|
||||
const isKiroField = field1.id.includes('Kiro');
|
||||
fields += `
|
||||
<div class="form-group">
|
||||
<label>${field1.label}</label>
|
||||
|
|
@ -818,6 +819,7 @@ function addDynamicConfigFields(form, providerType) {
|
|||
<i class="fas fa-upload"></i>
|
||||
</button>
|
||||
</div>
|
||||
${isKiroField ? '<small class="form-text"><i class="fas fa-info-circle"></i> 使用 AWS 登录方式时,请确保授权文件中包含 <code>clientId</code> 和 <code>clientSecret</code> 字段</small>' : ''}
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
|
|
@ -850,6 +852,7 @@ function addDynamicConfigFields(form, providerType) {
|
|||
`;
|
||||
} else if (isOAuthFilePath2) {
|
||||
// OAuth凭据文件路径字段,添加上传按钮
|
||||
const isKiroField = field2.id.includes('Kiro');
|
||||
fields += `
|
||||
<div class="form-group">
|
||||
<label>${field2.label}</label>
|
||||
|
|
@ -859,6 +862,7 @@ function addDynamicConfigFields(form, providerType) {
|
|||
<i class="fas fa-upload"></i>
|
||||
</button>
|
||||
</div>
|
||||
${isKiroField ? '<small class="form-text"><i class="fas fa-info-circle"></i> 使用 AWS 登录方式时,请确保授权文件中包含 <code>clientId</code> 和 <code>clientSecret</code> 字段</small>' : ''}
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -599,6 +599,10 @@
|
|||
<i class="fas fa-upload"></i>
|
||||
</button>
|
||||
</div>
|
||||
<small class="form-text">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
使用 AWS 登录方式时,请确保授权文件中包含 <code>clientId</code> 和 <code>clientSecret</code> 字段
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue