fix: 修复system_instruction到systemInstruction的转换并修正回调URL变量名
确保在请求体中正确处理system_instruction到systemInstruction的转换,同时修正回调URL变量名从localUrl到url以匹配实际使用场景
This commit is contained in:
parent
ae5fc1f5f7
commit
26e1da1470
2 changed files with 7 additions and 1 deletions
|
|
@ -625,6 +625,12 @@ function toGeminiApiResponse(antigravityResponse) {
|
|||
*/
|
||||
function ensureRolesInContents(requestBody, modelName) {
|
||||
delete requestBody.model;
|
||||
// delete requestBody.system_instruction;
|
||||
// delete requestBody.systemInstruction;
|
||||
if (requestBody.system_instruction) {
|
||||
requestBody.systemInstruction = requestBody.system_instruction;
|
||||
delete requestBody.system_instruction;
|
||||
}
|
||||
|
||||
// 提取现有的系统提示词
|
||||
let originalSystemPrompt = requestBody.systemInstruction;
|
||||
|
|
|
|||
|
|
@ -829,7 +829,7 @@ function showAuthModal(authUrl, authInfo) {
|
|||
// 通过服务端API处理手动输入的回调URL
|
||||
window.apiClient.post('/oauth/manual-callback', {
|
||||
provider: authInfo.provider,
|
||||
callbackUrl: localUrl.href,
|
||||
callbackUrl: url.href, //使用localhost访问
|
||||
authMethod: authInfo.authMethod
|
||||
})
|
||||
.then(response => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue