From c2ee0376412b8cca93d83bc5e8ac0bf786558244 Mon Sep 17 00:00:00 2001 From: GCSLaoLi Date: Tue, 14 May 2024 12:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D4o=20=E5=86=85=E7=BD=AEarkose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/docker-compose.yml | 2 +- api/api.go | 2 +- api/index.go | 76 +- api/next.go | 2 +- api/session.go | 2 +- api/var.go | 2175 +++++++++++++++++ arkose/arkose.go | 14 + arkose/proxyarkose.go | 50 + backend-api/backend-api.go | 5 +- backend-api/me.go | 2 +- config.yaml | 5 +- config/config.go | 22 +- frontend/src/cool/config/proxy.ts | 13 +- .../src/modules/chatgpt/views/FKArkos.vue | 2 +- .../src/modules/chatgpt/views/session.vue | 55 +- frontend/stats.html | 2 +- main.go | 1 + modules/chatgpt/service/chatgpt_session.go | 4 +- modules/chatgpt/tasks/refresh_session.go | 2 +- public-api/proxypublic.go | 3 +- .../template/Xhs7HSGBjb9hZenQPhykC/chat.html | 1 + .../Xhs7HSGBjb9hZenQPhykC/discovery.html | 1 + .../Xhs7HSGBjb9hZenQPhykC/editor.html | 1 + .../template/Xhs7HSGBjb9hZenQPhykC/g.html | 1 + .../template/Xhs7HSGBjb9hZenQPhykC/gc.html | 1 + .../template/Xhs7HSGBjb9hZenQPhykC/gpts.html | 1 + .../template/Xhs7HSGBjb9hZenQPhykC/mine.html | 1 + .../template/Xhs7HSGBjb9hZenQPhykC/slug.html | 1 + 28 files changed, 2343 insertions(+), 104 deletions(-) create mode 100644 api/var.go create mode 100644 arkose/arkose.go create mode 100644 arkose/proxyarkose.go create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/chat.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/discovery.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/editor.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/g.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/gc.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/gpts.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/mine.html create mode 100644 resource/template/Xhs7HSGBjb9hZenQPhykC/slug.html diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 82cb506..54535ab 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: mysql: image: mysql:8 - command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci restart: always # network_mode: host volumes: diff --git a/api/api.go b/api/api.go index f772603..f09abc8 100644 --- a/api/api.go +++ b/api/api.go @@ -72,7 +72,7 @@ func Api2backend(r *ghttp.Request) { } officialAccessToken := utility.AccessTokenFormSession(officialSession) - UpStream := config.CHATPROXY(ctx) + UpStream := config.CHATPROXY u, _ := url.Parse(UpStream) proxy := httputil.NewSingleHostReverseProxy(u) proxy.ErrorHandler = func(writer http.ResponseWriter, request *http.Request, e error) { diff --git a/api/index.go b/api/index.go index d2a2d42..061aaa1 100644 --- a/api/index.go +++ b/api/index.go @@ -18,45 +18,8 @@ func Index(r *ghttp.Request) { return } model := r.Get("model").String() - props := ` - { - "props": { - "pageProps": { - "user": { - "id": "user-xyhelper", - "name": "admin@closeai.com", - "email": "admin@closeai.com", - "image": "/avatars.png", - "picture": "/avatars.png", - "idp": "auth0", - "iat": 2699699364, - "mfa": false, - "groups": [], - "intercom_hash": "30fd0a0ada1c07ce526be7c3d54c22904b80fa7e2713d978630e979e4315cf67" - }, - "serviceStatus": {}, - "userCountry": "US", - "serviceAnnouncement": { - "paid": {}, - "public": {} - }, - "serverPrimedAllowBrowserStorageValue": true, - "canManageBrowserStorage": false, - "ageVerificationDeadline": null, - "showCookieConsentBanner": false - }, - "__N_SSP": true - }, - "page": "/[[...default]]", - "query": {}, - "buildId": "wtXFegAXt6bfbujLr1e7S", - "assetPrefix": "", - "isFallback": false, - "gssp": true, - "scriptLoader": [] -}` - propsJson := gjson.New(props) + propsJson := gjson.New(Props) if model != "" { propsJson.Set("query.model", model) } @@ -80,42 +43,9 @@ func C(r *ghttp.Request) { convId := r.GetRouter("convId").String() g.Log().Debug(r.GetCtx(), "convId", convId) - props := ` - { - "props": { - "pageProps": { - "user": { - "id": "user-xyhelper", - "name": "admin@closeai.com", - "email": "admin@closeai.com", - "image": "/avatars.png", - "picture": "/avatars.png", - "idp": "auth0", - "iat": 2699699364, - "mfa": false, - "groups": [] - }, - "serviceStatus": {}, - "userCountry": "US", - "serviceAnnouncement": { "paid": {}, "public": {} }, - "serverPrimedAllowBrowserStorageValue": true, - "canManageBrowserStorage": false, - "ageVerificationDeadline": null, - "showCookieConsentBanner": false - }, - "__N_SSP": true - }, - "page": "/[[...default]]", - "query": { "default": ["c", "98d86ec9-fa8b-42ba-98e8-ffd6c1d6cae4"] }, - "buildId": "wtXFegAXt6bfbujLr1e7S", - "assetPrefix": "", - "isFallback": false, - "gssp": true, - "scriptLoader": [] - } - ` - propsJson := gjson.New(props) + propsJson := gjson.New(Props) + propsJson.Set("query.default.0", "c") propsJson.Set("query.default.1", convId) propsJson.Set("buildId", config.BuildId) propsJson.Set("assetPrefix", config.AssetPrefix) diff --git a/api/next.go b/api/next.go index 6cf4d08..1ca1595 100644 --- a/api/next.go +++ b/api/next.go @@ -18,7 +18,7 @@ func ProxyNext(r *ghttp.Request) { ctx := r.Context() officalSession := gjson.New(r.Session.MustGet("offical-session")) refreshCookie := officalSession.Get("refreshCookie").String() - u, _ := url.Parse(config.CHATPROXY(ctx)) + u, _ := url.Parse(config.CHATPROXY) proxy := httputil.NewSingleHostReverseProxy(u) proxy.ErrorHandler = func(writer http.ResponseWriter, request *http.Request, e error) { writer.WriteHeader(http.StatusBadGateway) diff --git a/api/session.go b/api/session.go index 5f98dfa..73982db 100644 --- a/api/session.go +++ b/api/session.go @@ -29,7 +29,7 @@ func Session(r *ghttp.Request) { return } officialSession := gjson.New(record["officialSession"].String()) - getSessionUrl := config.CHATPROXY(ctx) + "/getsession" + getSessionUrl := config.CHATPROXY + "/getsession" refreshCookie := officialSession.Get("refreshCookie").String() sessionVar := g.Client().SetHeader("authkey", config.AUTHKEY(ctx)).PostVar(ctx, getSessionUrl, g.Map{ "username": record["email"].String(), diff --git a/api/var.go b/api/var.go new file mode 100644 index 0000000..2e7c314 --- /dev/null +++ b/api/var.go @@ -0,0 +1,2175 @@ +package api + +var ( + Props = ` + { + "props": { + "pageProps": { + "user": { + "id": "user-xyhelper", + "name": "admin@closeai.biz", + "email": "admin@closeai.biz", + "image": "https://s.gravatar.com/avatar/558db47f25d89a95df170b4bde9fd72f?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fli.png", + "picture": "https://s.gravatar.com/avatar/558db47f25d89a95df170b4bde9fd72f?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fli.png", + "idp": "auth0", + "iat": 1715650700, + "mfa": false, + "groups": [], + "intercom_hash": "30fd0a0ada1c07ce526be7c3d54c22904b80fa7e2713d978630e979e4315cf67" + }, + "serviceStatus": {}, + "serviceAnnouncement": { + "public": {}, + "paid": {} + }, + "userCountry": "US", + "userRegion": "New York", + "userRegionCode": "NY", + "cfConnectingIp": "8.8.8.8", + "cfIpCity": "Buffalo", + "cfTimezone": "America/New_York", + "userLocale": "en", + "statsig": { + "payload": { + "feature_gates": { + "29898433": { + "name": "29898433", + "value": true, + "rule_id": "5hlR2AjP7h2nJXOxZHKzKH:100.00:2", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "48895201": { + "name": "48895201", + "value": false, + "rule_id": "3i3FRD5a2bDACgRX2SCksw", + "secondary_exposures": [] + }, + "73891701": { + "name": "73891701", + "value": true, + "rule_id": "4M51IcwRuyJAV7JLf2RvzR:100.00:1", + "secondary_exposures": [ + { + "gate": "segment:chatgpt_unpaid_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_paid_users", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "81143276": { + "name": "81143276", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "87687712": { + "name": "87687712", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "174366048": { + "name": "174366048", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:chatgpt_voice_team", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:friends_and_family_nda", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_paid_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_unpaid_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-web-voice-message-playback", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "211801712": { + "name": "211801712", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "226799327": { + "name": "226799327", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "437245079": { + "name": "437245079", + "value": true, + "rule_id": "1KKPtXmOjxZamlgM2DzXlg", + "secondary_exposures": [] + }, + "458009956": { + "name": "458009956", + "value": true, + "rule_id": "6LgEwykI8hHnFAQ5EkKTX2:100.00:1", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plusqa_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_free_preview_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_paid_testers", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "544659310": { + "name": "544659310", + "value": true, + "rule_id": "1Opz1br1XsEM6Uajp6F1XU:100.00:3", + "secondary_exposures": [] + }, + "607723475": { + "name": "607723475", + "value": false, + "rule_id": "2e0cON2LQDfCjkZQ6yzHg5", + "secondary_exposures": [] + }, + "716475478": { + "name": "716475478", + "value": true, + "rule_id": "48mToGJmOtQ5aRx9MCjOor", + "secondary_exposures": [] + }, + "716722001": { + "name": "716722001", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "730579107": { + "name": "730579107", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "740954505": { + "name": "740954505", + "value": false, + "rule_id": "2Ey97LJY7QymPfJfxULJwr:10.00:4", + "secondary_exposures": [ + { + "gate": "segment:anonymous_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "internal-employee-only-chatgpt-team", + "gateValue": "false", + "ruleID": "4nM2ehmgoDQIv69B0zohb6" + }, + { + "gate": "segment:enterprise", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plusqa_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_free_preview_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_paid_testers", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "771993664": { + "name": "771993664", + "value": true, + "rule_id": "1dDdxrXy1KadHtYusuGRgR", + "secondary_exposures": [] + }, + "857491970": { + "name": "857491970", + "value": true, + "rule_id": "2LpyNTIfbYC4R6XS6dfdIL", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "859327441": { + "name": "859327441", + "value": false, + "rule_id": "2kLMbBkcSZ8TkzHgzgbyKV", + "secondary_exposures": [] + }, + "874794369": { + "name": "874794369", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1026575464": { + "name": "1026575464", + "value": true, + "rule_id": "1f4cSeenpcmWQ9eMKKQhF5", + "secondary_exposures": [] + }, + "1056591003": { + "name": "1056591003", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:internal_oai_gptv_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_unpaid_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-mainline-model-transition-unpaid-sahara-v", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1070272635": { + "name": "1070272635", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:friends_and_family_nda", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:feather_memory_trainers", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1123641887": { + "name": "1123641887", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt_anon_chat_enabled", + "gateValue": "true", + "ruleID": "22nVhoL17eyMvGWgFrDfZe" + } + ] + }, + "1123642877": { + "name": "1123642877", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt_anon_chat_enabled", + "gateValue": "true", + "ruleID": "22nVhoL17eyMvGWgFrDfZe" + } + ] + }, + "1162285750": { + "name": "1162285750", + "value": false, + "rule_id": "5SD2EhDYytn75oTAjOCSiL", + "secondary_exposures": [] + }, + "1198030896": { + "name": "1198030896", + "value": true, + "rule_id": "2aaGr86KHS6GUSs6I9F2cV", + "secondary_exposures": [] + }, + "1426009137": { + "name": "1426009137", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:chatgpt_voice_team", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1568195116": { + "name": "1568195116", + "value": false, + "rule_id": "KKhehNjRxNHoIWKNkqpU2", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1654633603": { + "name": "1654633603", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:anonymous_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "internal-employee-only-chatgpt-team", + "gateValue": "false", + "ruleID": "4nM2ehmgoDQIv69B0zohb6" + }, + { + "gate": "segment:enterprise", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plusqa_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_free_preview_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:scallion_paid_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt_fruit_juice", + "gateValue": "false", + "ruleID": "2Ey97LJY7QymPfJfxULJwr:10.00:4" + } + ] + }, + "1703773460": { + "name": "1703773460", + "value": false, + "rule_id": "63qNN95X7P6VSHVff2nL76", + "secondary_exposures": [] + }, + "1820151945": { + "name": "1820151945", + "value": false, + "rule_id": "6trY8Zt53urtkxuGnQToZr", + "secondary_exposures": [] + }, + "1825130190": { + "name": "1825130190", + "value": true, + "rule_id": "Nef2uMceNUF9U3ZYwSbpD", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plusqa_testers", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1828361965": { + "name": "1828361965", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "1852364556": { + "name": "1852364556", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "1880477506": { + "name": "1880477506", + "value": true, + "rule_id": "7fFsLeJu6pyCq9tRWmX9em:100.00:6", + "secondary_exposures": [] + }, + "1883608273": { + "name": "1883608273", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "1923022511": { + "name": "1923022511", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:chatgpt_voice_team", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:friends_and_family_nda", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_paid_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_unpaid_users", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "1938289220": { + "name": "1938289220", + "value": false, + "rule_id": "1HDaU0d5mGA5CS4wzvOloC", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:contractors", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:sidekick_windows_contractors", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plusqa_testers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:friends_and_family_nda", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:enterprise", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:chatgpt_paid_users", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2000076788": { + "name": "2000076788", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:contractors", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2004295676": { + "name": "2004295676", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-sonic-internal", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-search-demo-ui", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2046333385": { + "name": "2046333385", + "value": false, + "rule_id": "4nM2ehmgoDQIv69B0zohb6", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2166885617": { + "name": "2166885617", + "value": false, + "rule_id": "1ORnWBMVyZ42eAp03fe5Nr", + "secondary_exposures": [] + }, + "2173548801": { + "name": "2173548801", + "value": true, + "rule_id": "22nVhoL17eyMvGWgFrDfZe", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2438078654": { + "name": "2438078654", + "value": true, + "rule_id": "VNBdYfNSNNUyDdMpaiaZ9:100.00:3", + "secondary_exposures": [] + }, + "2449630478": { + "name": "2449630478", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "2542814321": { + "name": "2542814321", + "value": false, + "rule_id": "6Usmt3Th0mkUkVQJ0oyeST:0.00:1", + "secondary_exposures": [] + }, + "2546838099": { + "name": "2546838099", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-sonic-internal", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2562876640": { + "name": "2562876640", + "value": true, + "rule_id": "326czTZeZ0RX0ypR0c5Bb6:100.00:15", + "secondary_exposures": [] + }, + "2689530298": { + "name": "2689530298", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2865702999": { + "name": "2865702999", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2865703032": { + "name": "2865703032", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2893926039": { + "name": "2893926039", + "value": false, + "rule_id": "1XOa3bw1GRog1lbmWKnaF9", + "secondary_exposures": [] + }, + "2947776398": { + "name": "2947776398", + "value": false, + "rule_id": "2YzNwxxdROEWn1lPwJbYtr", + "secondary_exposures": [] + }, + "3011278998": { + "name": "3011278998", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "3060586957": { + "name": "3060586957", + "value": false, + "rule_id": "1agh2VKHmwqbsORiGxd3v5", + "secondary_exposures": [] + }, + "3134329717": { + "name": "3134329717", + "value": false, + "rule_id": "2UWRV6bObClvvj8jLkP7kJ", + "secondary_exposures": [] + }, + "3254335143": { + "name": "3254335143", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "3320547351": { + "name": "3320547351", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "3376455464": { + "name": "3376455464", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "3455796462": { + "name": "3455796462", + "value": true, + "rule_id": "YbNn9kuhmMn3DdnzEDc6G", + "secondary_exposures": [] + }, + "3501550327": { + "name": "3501550327", + "value": false, + "rule_id": "HEU9zVkuwUfmXHhGcckPQ", + "secondary_exposures": [] + }, + "3511639124": { + "name": "3511639124", + "value": true, + "rule_id": "1y9t5DBS0nz9mqbQRCrmCP:100.00:5", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:plus_qa_-_gizmos", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:store_dogfooding", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:anonymous_users", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:gizmo_store_holdout_exceptions", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "3643162575": { + "name": "3643162575", + "value": false, + "rule_id": "default", + "secondary_exposures": [] + }, + "3700615661": { + "name": "3700615661", + "value": false, + "rule_id": "66covmutTYx82FWVUlZAqF", + "secondary_exposures": [] + }, + "3912844760": { + "name": "3912844760", + "value": false, + "rule_id": "default", + "secondary_exposures": [ + { + "gate": "segment:european_legal_restricted", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "3922145230": { + "name": "3922145230", + "value": false, + "rule_id": "14DZA2LumaPqAdCo52CrUB", + "secondary_exposures": [ + { + "gate": "segment:internal_ips", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "3941367332": { + "name": "3941367332", + "value": true, + "rule_id": "3tesvDaP0kRy0JAXNdSJJn:100.00:3", + "secondary_exposures": [ + { + "gate": "chatgpt_web_sharing_modal_simplified_targeting", + "gateValue": "true", + "ruleID": "48mToGJmOtQ5aRx9MCjOor" + } + ] + }, + "4226692983": { + "name": "4226692983", + "value": true, + "rule_id": "6sEu91zwlBGSKOqFiNpGlA:100.00:2", + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:enterprise", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:teams_plan", + "gateValue": "false", + "ruleID": "default" + } + ] + } + }, + "dynamic_configs": { + "75342665": { + "name": "75342665", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "75342698": { + "name": "75342698", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "101132775": { + "name": "101132775", + "value": { + "show_new_ui": true + }, + "group": "launchedGroup", + "rule_id": "launchedGroup", + "is_device_based": false, + "secondary_exposures": [], + "is_user_in_experiment": false, + "is_experiment_active": false + }, + "340466392": { + "name": "340466392", + "value": { + "google.com": [ + "google.com", + "googleapis.com", + "www.googleapis.com", + "oauth2.googleapis.com", + "cloudfunctions.net" + ], + "microsoftonline.com": [ + "microsoftonline.com", + "azurewebsites.net", + "graph.microsoft.com", + "microsoft.com", + "azure.com", + "sinequa.com" + ], + "adobelogin.com": [ + "adobe.com", + "adobelogin.com" + ], + "useflorian.com": [ + "useflorian.com", + "convex.site" + ], + "yahoo.com": [ + "yahooapis.com", + "yahoo.com" + ], + "visualstudio.com": [ + "visualstudio.com", + "azure.com" + ], + "atlassian.com": [ + "atlassian.net", + "atlassian.com" + ] + }, + "group": "default", + "rule_id": "default", + "is_device_based": true, + "secondary_exposures": [] + }, + "445876862": { + "name": "445876862", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled", + "is_no_auth_welcome_modal_enabled", + "no_auth_soft_rate_limit", + "no_auth_hard_rate_limit", + "should_show_no_auth_signup_banner" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "855925714": { + "name": "855925714", + "value": { + "should_simplify_modal": false, + "is_simplified_sharing_modal_enabled": false, + "is_social_share_options_enabled": false, + "is_update_shared_links_enabled": false, + "is_discoverability_toggle_enabled": false, + "show_copylink_state_if_no_updates": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_simplified_sharing_modal_enabled", + "is_social_share_options_enabled", + "is_update_shared_links_enabled", + "is_discoverability_toggle_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "889327355": { + "name": "889327355", + "value": { + "is-enabled": true + }, + "group": "layerAssignment", + "rule_id": "layerAssignment", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is-enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": true, + "is_in_layer": true + }, + "1193714591": { + "name": "1193714591", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1193714592": { + "name": "1193714592", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner", + "config" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1193714593": { + "name": "1193714593", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "prestart", + "rule_id": "prestart", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner", + "config", + "show_message_regenerate_model_selector_on_every_message" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1237904433": { + "name": "1237904433", + "value": { + "is-enabled": true + }, + "group": "launchedGroup", + "rule_id": "launchedGroup", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is-enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1277879515": { + "name": "1277879515", + "value": { + "show_ui": true + }, + "group": "launchedGroup", + "rule_id": "launchedGroup", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "segment:friends_and_family_nda", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:feather_memory_trainers", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-allow-memory-use-admin", + "gateValue": "false", + "ruleID": "default" + } + ], + "is_user_in_experiment": false, + "is_experiment_active": false + }, + "1312738797": { + "name": "1312738797", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "launchedGroup", + "rule_id": "launchedGroup", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "anon-is-spanish-translation-enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1476759596": { + "name": "1476759596", + "value": {}, + "group": "layerAssignment", + "rule_id": "layerAssignment", + "is_device_based": false, + "secondary_exposures": [], + "is_user_in_experiment": false, + "is_experiment_active": true + }, + "1547924522": { + "name": "1547924522", + "value": {}, + "group": "targetingGate", + "rule_id": "targetingGate", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt-paid-users", + "gateValue": "false", + "ruleID": "default" + } + ], + "is_user_in_experiment": false, + "is_experiment_active": false + }, + "1887692490": { + "name": "1887692490", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled", + "is_try_it_first_on_login_page_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "1908072088": { + "name": "1908072088", + "value": { + "blocking_modal": true, + "single_button_variant": true, + "dropdown_tooltip": false, + "conversation_model_switcher_badge": false + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [] + }, + "2144828235": { + "name": "2144828235", + "value": {}, + "group": "layerAssignment", + "rule_id": "layerAssignment", + "is_device_based": false, + "secondary_exposures": [], + "is_user_in_experiment": false, + "is_experiment_active": true + }, + "2176179500": { + "name": "2176179500", + "value": { + "should_enable_zh_tw": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "should_enable_zh_tw" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2331692225": { + "name": "2331692225", + "value": {}, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-browse-sahara", + "gateValue": "false", + "ruleID": "default" + } + ] + }, + "2370410632": { + "name": "2370410632", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2370410634": { + "name": "2370410634", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2575540972": { + "name": "2575540972", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2576123431": { + "name": "2576123431", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled", + "is_anon_chat_enabled_for_new_users_only" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2635734272": { + "name": "2635734272", + "value": { + "should_simplify_modal": false, + "is_simplified_sharing_modal_enabled": false, + "is_social_share_options_enabled": false, + "is_update_shared_links_enabled": false, + "is_discoverability_toggle_enabled": false, + "show_copylink_state_if_no_updates": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_simplified_sharing_modal_enabled", + "is_social_share_options_enabled", + "is_update_shared_links_enabled", + "is_discoverability_toggle_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2811617088": { + "name": "2811617088", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled", + "is_no_auth_welcome_modal_enabled", + "no_auth_soft_rate_limit", + "no_auth_hard_rate_limit", + "should_show_no_auth_signup_banner" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "2919366999": { + "name": "2919366999", + "value": { + "should_simplify_modal": false, + "is_simplified_sharing_modal_enabled": false, + "is_social_share_options_enabled": false, + "is_update_shared_links_enabled": false, + "is_discoverability_toggle_enabled": false, + "show_copylink_state_if_no_updates": true + }, + "group": "3fdACNmSdaY0SPpdEdJNZI", + "rule_id": "3fdACNmSdaY0SPpdEdJNZI", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_web_sharing_modal_simplified_targeting", + "gateValue": "true", + "ruleID": "48mToGJmOtQ5aRx9MCjOor" + } + ], + "explicit_parameters": [ + "show_copylink_state_if_no_updates" + ], + "is_user_in_experiment": true, + "is_experiment_active": true, + "is_in_layer": true + }, + "3168246095": { + "name": "3168246095", + "value": { + "gizmo_ids": [] + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [] + }, + "3299284219": { + "name": "3299284219", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner", + "show_message_regenerate_model_selector_on_every_message" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "3340924940": { + "name": "3340924940", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_anon_chat_enabled", + "should_show_anon_login_header_on_desktop" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "3414158273": { + "name": "3414158273", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "launchedGroup", + "rule_id": "launchedGroup", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_try_it_first_on_login_page_enabled", + "is_no_auth_welcome_back_modal_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "3414159263": { + "name": "3414159263", + "value": { + "is_anon_chat_enabled": true, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": true, + "is_no_auth_welcome_back_modal_enabled": true + }, + "group": "layerAssignment", + "rule_id": "layerAssignment", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [ + "is_no_auth_welcome_back_modal_enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": true, + "is_in_layer": true + }, + "3758099832": { + "name": "3758099832", + "value": {}, + "group": "prestart", + "rule_id": "prestart", + "is_device_based": false, + "secondary_exposures": [], + "is_user_in_experiment": false, + "is_experiment_active": false + }, + "3917128856": { + "name": "3917128856", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [ + "is_dynamic_model_enabled", + "show_message_regenerate_model_selector", + "is_conversation_model_switching_allowed", + "show_rate_limit_downgrade_banner", + "config" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + }, + "4204547666": { + "name": "4204547666", + "value": { + "is-enabled": true + }, + "group": "abandoned", + "rule_id": "abandoned", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "segment:internal_ips", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-localization-preview", + "gateValue": "false", + "ruleID": "14DZA2LumaPqAdCo52CrUB" + }, + { + "gate": "chatgpt-localization-allowlist", + "gateValue": "false", + "ruleID": "66covmutTYx82FWVUlZAqF" + } + ], + "explicit_parameters": [ + "is-enabled" + ], + "is_user_in_experiment": false, + "is_experiment_active": false, + "is_in_layer": true + } + }, + "layer_configs": { + "1238742812": { + "name": "1238742812", + "value": { + "should_enable_zh_tw": false + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [], + "undelegated_secondary_exposures": [] + }, + "1547743984": { + "name": "1547743984", + "value": { + "should_simplify_modal": false, + "is_simplified_sharing_modal_enabled": false, + "is_social_share_options_enabled": false, + "is_update_shared_links_enabled": false, + "is_discoverability_toggle_enabled": false, + "show_copylink_state_if_no_updates": true + }, + "group": "3fdACNmSdaY0SPpdEdJNZI", + "rule_id": "3fdACNmSdaY0SPpdEdJNZI", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_web_sharing_modal_simplified_targeting", + "gateValue": "true", + "ruleID": "48mToGJmOtQ5aRx9MCjOor" + } + ], + "explicit_parameters": [ + "show_copylink_state_if_no_updates" + ], + "allocated_experiment_name": "2919366999", + "is_experiment_active": true, + "is_user_in_experiment": true, + "undelegated_secondary_exposures": [] + }, + "2723963139": { + "name": "2723963139", + "value": { + "is_dynamic_model_enabled": false, + "show_message_model_info": false, + "show_message_regenerate_model_selector": true, + "is_conversation_model_switching_allowed": true, + "show_rate_limit_downgrade_banner": true, + "config": { + "impl": "rm_score", + "rm_gpt4_vs_sahara": "rm-model-switcher-1p-d36-0325", + "rm_renderer": "harmony_v4.0.13_8k_turbo_mm" + }, + "show_message_regenerate_model_selector_on_every_message": true, + "is_AG8PqS2q_enabled": false + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [], + "explicit_parameters": [], + "undelegated_secondary_exposures": [] + }, + "3048336830": { + "name": "3048336830", + "value": { + "is-enabled": true + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "segment:internal_ips", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-localization-preview", + "gateValue": "false", + "ruleID": "14DZA2LumaPqAdCo52CrUB" + }, + { + "gate": "chatgpt-localization-allowlist", + "gateValue": "false", + "ruleID": "66covmutTYx82FWVUlZAqF" + } + ], + "explicit_parameters": [], + "undelegated_secondary_exposures": [ + { + "gate": "segment:internal_ips", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "segment:employees", + "gateValue": "false", + "ruleID": "default" + }, + { + "gate": "chatgpt-localization-preview", + "gateValue": "false", + "ruleID": "14DZA2LumaPqAdCo52CrUB" + }, + { + "gate": "chatgpt-localization-allowlist", + "gateValue": "false", + "ruleID": "66covmutTYx82FWVUlZAqF" + } + ] + }, + "3637408529": { + "name": "3637408529", + "value": { + "is_anon_chat_enabled": false, + "anon_composer_display_variant": "default", + "anon-is-spanish-translation-enabled": true, + "should_show_anon_login_header_on_desktop": false, + "is_anon_chat_enabled_for_new_users_only": false, + "is_try_it_first_on_login_page_enabled": false, + "is_no_auth_welcome_modal_enabled": false, + "no_auth_soft_rate_limit": 1200, + "no_auth_hard_rate_limit": 1200, + "should_show_no_auth_signup_banner": false, + "is_no_auth_welcome_back_modal_enabled": false + }, + "group": "default", + "rule_id": "default", + "is_device_based": false, + "secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ], + "explicit_parameters": [], + "undelegated_secondary_exposures": [ + { + "gate": "chatgpt_anon_chat_holdout_20240227", + "gateValue": "false", + "ruleID": "disabled" + }, + { + "gate": "chatgpt_no_auth_holdout_gate_20240328", + "gateValue": "true", + "ruleID": "1f4cSeenpcmWQ9eMKKQhF5" + }, + { + "gate": "chatgpt_no_auth_holdout_20240328", + "gateValue": "false", + "ruleID": "14N13nfiNns0pJGxqO9VVj:2.00:1" + } + ] + } + }, + "sdkParams": {}, + "has_updates": true, + "generator": "statsig-node-sdk", + "time": 0, + "evaluated_keys": { + "userID": "user-xyhelper", + "customIDs": { + "WebAnonymousCookieID": "9d8b6e32-4f61-4371-8b15-91823f3016cd", + "DeviceId": "9d8b6e32-4f61-4371-8b15-91823f3016cd", + "stableID": "9d8b6e32-4f61-4371-8b15-91823f3016cd" + } + }, + "hash_used": "djb2", + "user_hash": "4099313694" + }, + "user": { + "country": "US", + "custom": { + "auth_status": "logged_in", + "has_logged_in_before": true, + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0", + "is_paid": false + }, + "customIDs": { + "WebAnonymousCookieID": "9d8b6e32-4f61-4371-8b15-91823f3016cd", + "DeviceId": "9d8b6e32-4f61-4371-8b15-91823f3016cd", + "stableID": "9d8b6e32-4f61-4371-8b15-91823f3016cd" + }, + "ip": "8.8.8.8", + "locale": "en", + "privateAttributes": { + "email": "admin@closeai.biz" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0", + "userID": "user-xyhelper" + } + }, + "authStatus": "logged_in", + "serverPrimedAllowBrowserStorageValue": true, + "showCookieConsentBanner": false, + "isStorageComplianceEnabled": false, + "ageVerificationDeadline": null, + "ageVerificationType": "none", + "logOutUser": false + }, + "__N_SSP": true + }, + "page": "/[[...default]]", + "query": {}, + "buildId": "FUn368sO8Yo1nq60-uOqJ", + "assetPrefix": "https://cdn.oaistatic.com", + "isFallback": false, + "isExperimentalCompile": false, + "gssp": true, + "scriptLoader": [] +}` +) diff --git a/arkose/arkose.go b/arkose/arkose.go new file mode 100644 index 0000000..1268df6 --- /dev/null +++ b/arkose/arkose.go @@ -0,0 +1,14 @@ +package arkose + +import "github.com/gogf/gf/v2/frame/g" + +func init() { + s := g.Server() + arkoseGroup := s.Group("/") + arkoseGroup.ALL("/v2/*", ProxyArkose) + arkoseGroup.ALL("/fc/*", ProxyArkose) + arkoseGroup.ALL("/cdn/fc/*any", ProxyArkose) + arkoseGroup.ALL("/rtig/image", ProxyArkose) + arkoseGroup.ALL("/params/sri/dapib/*", ProxyArkose) + arkoseGroup.ALL("/dapib/*any", ProxyArkose) +} diff --git a/arkose/proxyarkose.go b/arkose/proxyarkose.go new file mode 100644 index 0000000..4d576a3 --- /dev/null +++ b/arkose/proxyarkose.go @@ -0,0 +1,50 @@ +package arkose + +import ( + "chatgpt-mirror-server/config" + "net/http/httputil" + "net/url" + + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" +) + +var ( + UpStream = config.CHATPROXY + proxy *httputil.ReverseProxy + Remote *url.URL +) + +func init() { + remote, _ := url.Parse(UpStream) + Remote = remote + proxy = httputil.NewSingleHostReverseProxy(remote) +} + +func ProxyArkose(r *ghttp.Request) { + ctx := r.GetCtx() + path := r.RequestURI + // g.Log().Info(ctx, "ProxyArkose", path) + // isAdmin := r.Session.MustGet("isAdmin").Bool() + // if !isAdmin { + // carid := r.Session.MustGet("carid").String() + // _, err := utility.CheckCar(ctx, carid) + // if err != nil { + // g.Log().Error(ctx, err) + // r.Response.Status = 401 + // r.Response.WriteJson(g.Map{ + // "detail": "Authentication credentials were not provided.", + // }) + // return + // } + // } + + newreq := r.Request.Clone(ctx) + newreq.URL.Host = Remote.Host + newreq.URL.Scheme = Remote.Scheme + newreq.Host = Remote.Host + g.Log().Info(ctx, "ProxyArkose", path, "--->", newreq.URL.String()) + + proxy.ServeHTTP(r.Response.Writer.RawWriter(), newreq) + +} diff --git a/backend-api/backend-api.go b/backend-api/backend-api.go index 8dcecb6..e28b531 100644 --- a/backend-api/backend-api.go +++ b/backend-api/backend-api.go @@ -26,6 +26,9 @@ func init() { backendGroup.POST("/accounts/data_export", NotFound) // 禁用导出 backendGroup.POST("/payments/checkout", NotFound) // 禁用支付 backendGroup.ALL("/accounts/*/invites", NotFound) // 禁用邀请 + backendGroup.ALL("/accounts/*/users/*", NotFound) // 成员 + backendGroup.ALL("/accounts/transfer", NotFound) // 转移 + backendGroup.ALL("/accounts/logout_all", NotFound) // 登出 // backendGroup.GET("/accounts/check/*any", accounts.Check) backendGroup.GET("/me", Me) @@ -70,7 +73,7 @@ func ProxyAll(r *ghttp.Request) { AccessTokenCache.Set(ctx, userToken, officialAccessToken, time.Minute) } } - UpStream := config.CHATPROXY(ctx) + UpStream := config.CHATPROXY u, _ := url.Parse(UpStream) proxy := httputil.NewSingleHostReverseProxy(u) proxy.ErrorHandler = func(writer http.ResponseWriter, request *http.Request, e error) { diff --git a/backend-api/me.go b/backend-api/me.go index a78460e..b201aae 100644 --- a/backend-api/me.go +++ b/backend-api/me.go @@ -26,7 +26,7 @@ func Me(r *ghttp.Request) { } officialSession := gjson.New(record["officialSession"].String()) AccessToken := officialSession.Get("accessToken").String() - UpStream := config.CHATPROXY(ctx) + UpStream := config.CHATPROXY // 请求后端接口 res, err := g.Client().SetHeaderMap(map[string]string{ "Authorization": "Bearer " + AccessToken, diff --git a/config.yaml b/config.yaml index 3aa67fd..f41073f 100644 --- a/config.yaml +++ b/config.yaml @@ -45,7 +45,7 @@ modules: base: jwt: sso: false - secret: "cool-admin-go" + secret: "cool-admin-go-dev" token: expire: 7200 # 2*3600 refreshExpire: 1296000 # 24*3600*15 @@ -56,8 +56,7 @@ modules: enable: 1 # 接入网关地址 -CHATPROXY: "https://demo.xyhelper.cn" -# CHATPROXY: "https://chatproxy-dev.closeai.biz" +CHATPROXY: "https://chatproxy-dev.closeai.biz" # 接入网关的authkey AUTHKEY: "xyhelper" ONLYTOKEN: true diff --git a/config/config.go b/config/config.go index 6ab4867..ae5fe78 100644 --- a/config/config.go +++ b/config/config.go @@ -14,9 +14,9 @@ import ( "github.com/gogf/gf/v2/util/gconv" ) -func CHATPROXY(ctx g.Ctx) string { - return g.Cfg().MustGetWithEnv(ctx, "CHATPROXY").String() -} +// func CHATPROXY(ctx g.Ctx) string { +// return g.Cfg().MustGetWithEnv(ctx, "CHATPROXY").String() +// } func AUTHKEY(ctx g.Ctx) string { // g.Log().Debug(ctx, "config.AUTHKEY", g.Cfg().MustGetWithEnv(ctx, "AUTHKEY").String()) @@ -28,10 +28,11 @@ func USERTOKENLOCK(ctx g.Ctx) bool { } var ( + CHATPROXY = "https://chatproxy-dev.closeai.biz" DefaultModel = "text-davinci-002-render-sha" FreeModels = garray.NewStrArray() PlusModels = garray.NewStrArray() - ArkoseUrl = "https://tcr9i.closeai.biz/v2/" + ArkoseUrl = "/v2/" BuildId = "MCkVH1jJi3yNLkMToVDdU" CacheBuildId = "MCkVH1jJi3yNLkMToVDdU" AssetPrefix = "https://oaistatic-cdn.closeai.biz" @@ -57,10 +58,15 @@ func init() { PlusModels.Append("gpt-4-plugins") PlusModels.Append("gpt-4-mobile") PlusModels.Append("gpt-4-gizmo") - arkoseUrl := g.Cfg().MustGetWithEnv(ctx, "ARKOSE_URL") - if !arkoseUrl.IsEmpty() { - ArkoseUrl = arkoseUrl.String() + // arkoseUrl := g.Cfg().MustGetWithEnv(ctx, "ARKOSE_URL") + // if !arkoseUrl.IsEmpty() { + // ArkoseUrl = arkoseUrl.String() + // } + chatproxy := g.Cfg().MustGetWithEnv(ctx, "CHATPROXY").String() + if chatproxy != "" { + CHATPROXY = chatproxy } + g.Log().Info(ctx, "CHATPROXY:", CHATPROXY) assetPrefix := g.Cfg().MustGetWithEnv(ctx, "ASSET_PREFIX").String() if assetPrefix != "" { AssetPrefix = assetPrefix @@ -206,7 +212,7 @@ func GetEnvScript(ctx g.Ctx) string { // 检查是否有新版本 func CheckNewVersion(ctx g.Ctx) (buildId string) { - resVar := g.Client().GetVar(ctx, CHATPROXY(ctx)+"/ping") + resVar := g.Client().GetVar(ctx, CHATPROXY+"/ping") resJson := gjson.New(resVar) buildId = resJson.Get("buildId").String() diff --git a/frontend/src/cool/config/proxy.ts b/frontend/src/cool/config/proxy.ts index 962ff9a..d7dc70e 100644 --- a/frontend/src/cool/config/proxy.ts +++ b/frontend/src/cool/config/proxy.ts @@ -4,7 +4,18 @@ export const proxy = { changeOrigin: true, rewrite: (path: string) => path.replace(/^\/dev/, "") }, - + "/v2": { + target: "http://127.0.0.1:8001", + changeOrigin: true + }, + "/fc": { + target: "http://127.0.0.1:8001", + changeOrigin: true + }, + "/cdn": { + target: "http://127.0.0.1:8001", + changeOrigin: true + }, "/prod": { target: "https://show.cool-admin.com", changeOrigin: true, diff --git a/frontend/src/modules/chatgpt/views/FKArkos.vue b/frontend/src/modules/chatgpt/views/FKArkos.vue index 03209d1..4ca140a 100644 --- a/frontend/src/modules/chatgpt/views/FKArkos.vue +++ b/frontend/src/modules/chatgpt/views/FKArkos.vue @@ -38,7 +38,7 @@ export default defineComponent({ }, arkosUrl: { type: String, - default: "https://client-api.arkoselabs.com" + default: "" } }, data() { diff --git a/frontend/src/modules/chatgpt/views/session.vue b/frontend/src/modules/chatgpt/views/session.vue index 298db02..5de02f3 100644 --- a/frontend/src/modules/chatgpt/views/session.vue +++ b/frontend/src/modules/chatgpt/views/session.vue @@ -28,7 +28,7 @@ @@ -100,19 +100,42 @@ const Upsert = useUpsert({ if (!data.userID) { data.userID = 0; } - localStorage.removeItem("arkoseToken"); - window.myEnforcement.run(); + // localStorage.removeItem("arkoseToken"); + if (!data.officialSession) { + console.log("onOpened---------->", data.officialSession); + ElMessage({ + message: "请稍等,人机验证进行中.", + type: "warning" + }); + window.myEnforcement.run(); + } }, onSubmit(data, { done, close, next }) { // 自动生成uuid 作为userToken let arkoseToken = localStorage.getItem("arkoseToken"); + let w = window; + if (arkoseToken) { + localStorage.removeItem("arkoseToken"); + next({ ...data, arkoseToken }); done(); close(); } else { - alert("请刷新页面,重新验证"); - done(); + if (!data.officialSession) { + w.myEnforcement.run(); + ElMessage({ + message: "请稍等,人机验证进行中,验证完成后请重新点击确定保存.", + type: "warning" + }); + // alert("请先完成人机验证"); + + done(); + } else { + next(data); + done(); + close(); + } } } }); @@ -168,6 +191,8 @@ const Crud = useCrud(