Skip to main content

GPT4-Mobile

gpt4-mobile.js
// ==UserScript==
// @name ChatGPT开启不限次数的GPT4-Mobile
// @namespace https://chat.openai.com/
// @description 取自iOS客户端的GPT4模型, 和GPT4一样仅限Plus会员使用
// @version 0.3
// @match https://chat.openai.com/*
// @run-at document-start
// @author braumye
// @grant unsafeWindow
// @license MIT
// ==/UserScript==

(function () {
const originFetch = fetch;
window.unsafeWindow.fetch = (url, options) => {
return originFetch(url, options).then(async (response) => {
if (url.indexOf('/backend-api/models') === -1) {
return response;
}
const responseClone = response.clone();
let res = await responseClone.json();
res.models = res.models.map(m => {
m.tags = m.tags.filter(t => {
return t !== 'mobile';
});
if (m.slug === 'gpt-4-mobile') {
res.categories.push({
browsing_model: null,
category: "gpt_4",
code_interpreter_model: null,
default_model: "gpt-4-mobile",
human_category_name: "GPT-4-Mobile",
plugins_model: null,
subscription_level: "plus",
});
}
return m;
});

return new Response(JSON.stringify(res), response);
});
};
})();