diff --git a/apps/assets/const/protocol.py b/apps/assets/const/protocol.py index 1eff23a49..b2bf254e6 100644 --- a/apps/assets/const/protocol.py +++ b/apps/assets/const/protocol.py @@ -181,6 +181,11 @@ class Protocol(ChoicesMixin, models.TextChoices): 'type': 'str', 'default': 'type=submit', 'label': _('Submit selector') + }, + 'script': { + 'type': 'text', + 'default': '', + 'label': _('Script'), } } }, diff --git a/apps/assets/migrations/0120_auto_20230630_1613.py b/apps/assets/migrations/0120_auto_20230630_1613.py index aa884a217..a5205804b 100644 --- a/apps/assets/migrations/0120_auto_20230630_1613.py +++ b/apps/assets/migrations/0120_auto_20230630_1613.py @@ -12,7 +12,7 @@ def add_chatgpt_platform(apps, schema_editor): domain_enabled=False, su_enabled=False, comment='ChatGPT', created_by='System', updated_by='System', ) - platform.protocols.create(name='chatgpt', port=443, primary=True) + platform.protocols.create(name='chatgpt', port=443, primary=True, setting={'api_mode': 'gpt-3.5-turbo'}) automation_cls.objects.create(ansible_enabled=False, platform=platform) diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index b74c0fc53..f6b13ebb4 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -1399,7 +1399,7 @@ msgstr "忽略证书校验" #: assets/models/asset/gpt.py:8 msgid "Proxy" -msgstr "" +msgstr "代理" #: assets/models/asset/web.py:9 assets/serializers/asset/info/spec.py:16 msgid "Autofill" @@ -1727,7 +1727,7 @@ msgstr "" #: assets/serializers/asset/gpt.py:23 msgid "HTTP proxy" -msgstr "HTTP 代理" +msgstr "HTTP(s) 代理" #: assets/serializers/asset/info/gathered.py:6 msgid "Vendor" diff --git a/apps/terminal/connect_methods.py b/apps/terminal/connect_methods.py index a4901b93c..4a85c2d01 100644 --- a/apps/terminal/connect_methods.py +++ b/apps/terminal/connect_methods.py @@ -214,6 +214,12 @@ class ConnectMethodUtil: 'support': [Protocol.rdp], 'match': 'map' }, + TerminalType.kael: { + 'web_methods': [WebMethod.web_gui], + 'listen': [Protocol.http], + 'support': [Protocol.chatgpt], + 'match': 'm2m' + } } return protocols