aiverify-moonshot 0.4.10__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/METADATA +24 -26
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/RECORD +37 -36
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/WHEEL +1 -1
- moonshot/integrations/cli/benchmark/cookbook.py +8 -11
- moonshot/integrations/cli/benchmark/recipe.py +1 -5
- moonshot/integrations/cli/cli_errors.py +3 -0
- moonshot/integrations/cli/common/connectors.py +22 -10
- moonshot/integrations/web_api/app.py +1 -1
- moonshot/integrations/web_api/schemas/endpoint_create_dto.py +1 -0
- moonshot/integrations/web_api/services/endpoint_service.py +1 -0
- moonshot/src/api/api_bookmark.py +16 -5
- moonshot/src/api/api_connector.py +3 -3
- moonshot/src/api/api_connector_endpoint.py +6 -3
- moonshot/src/api/api_context_strategy.py +2 -2
- moonshot/src/api/api_cookbook.py +6 -6
- moonshot/src/api/api_dataset.py +5 -5
- moonshot/src/api/api_environment_variables.py +3 -0
- moonshot/src/api/api_metrics.py +1 -1
- moonshot/src/api/api_prompt_template.py +9 -0
- moonshot/src/api/api_recipe.py +3 -3
- moonshot/src/api/api_red_teaming.py +4 -8
- moonshot/src/api/api_result.py +10 -6
- moonshot/src/api/api_run.py +3 -3
- moonshot/src/api/api_runner.py +7 -6
- moonshot/src/api/api_session.py +11 -7
- moonshot/src/bookmark/bookmark.py +12 -5
- moonshot/src/connectors/connector.py +127 -62
- moonshot/src/connectors/connector_prompt_arguments.py +15 -5
- moonshot/src/connectors/connector_response.py +15 -0
- moonshot/src/connectors_endpoints/connector_endpoint.py +32 -20
- moonshot/src/connectors_endpoints/connector_endpoint_arguments.py +4 -1
- moonshot/src/messages_constants.py +85 -3
- moonshot/src/redteaming/attack/attack_module.py +34 -7
- moonshot/src/runs/run_arguments.py +43 -20
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/licenses/AUTHORS.md +0 -0
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/licenses/LICENSE.md +0 -0
- {aiverify_moonshot-0.4.10.dist-info → aiverify_moonshot-0.5.0.dist-info}/licenses/NOTICES.md +0 -0
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: aiverify-moonshot
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: AI Verify advances Gen AI testing with Project Moonshot.
|
|
5
5
|
Project-URL: Repository, https://github.com/aiverify-foundation/moonshot
|
|
6
6
|
Project-URL: Documentation, https://aiverify-foundation.github.io/moonshot/
|
|
7
7
|
Project-URL: Issues, https://github.com/aiverify-foundation/moonshot/issues
|
|
8
8
|
Author-email: AI Verify Foundation <info@aiverify.sg>
|
|
9
9
|
License: Apache-2.0
|
|
10
|
-
License-File: AUTHORS.md
|
|
11
|
-
License-File: LICENSE.md
|
|
12
|
-
License-File: NOTICES.md
|
|
13
10
|
Classifier: Development Status :: 3 - Alpha
|
|
14
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
12
|
Classifier: Programming Language :: Python :: 3
|
|
16
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
14
|
Requires-Python: >=3.11
|
|
18
|
-
Requires-Dist: datasets
|
|
19
|
-
Requires-Dist: ijson
|
|
20
|
-
Requires-Dist: jinja2
|
|
21
|
-
Requires-Dist: numpy
|
|
22
|
-
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: datasets>=2.21.0
|
|
16
|
+
Requires-Dist: ijson>=3.3.0
|
|
17
|
+
Requires-Dist: jinja2>=3.1.4
|
|
18
|
+
Requires-Dist: numpy>=1.26.4
|
|
19
|
+
Requires-Dist: pandas>=2.2.2
|
|
23
20
|
Requires-Dist: pydantic==2.8.2
|
|
24
|
-
Requires-Dist: pyparsing
|
|
25
|
-
Requires-Dist: python-dotenv
|
|
26
|
-
Requires-Dist: python-slugify
|
|
27
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: pyparsing>=3.1.4
|
|
22
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
23
|
+
Requires-Dist: python-slugify>=8.0.4
|
|
24
|
+
Requires-Dist: tenacity>=8.5.0
|
|
25
|
+
Requires-Dist: xxhash>=3.5.0
|
|
28
26
|
Provides-Extra: all
|
|
29
|
-
Requires-Dist: cmd2
|
|
30
|
-
Requires-Dist: dependency-injector
|
|
31
|
-
Requires-Dist: fastapi
|
|
32
|
-
Requires-Dist: rich
|
|
33
|
-
Requires-Dist: typing-extensions
|
|
34
|
-
Requires-Dist: uvicorn
|
|
27
|
+
Requires-Dist: cmd2>=2.4.3; extra == 'all'
|
|
28
|
+
Requires-Dist: dependency-injector>=4.41.0; extra == 'all'
|
|
29
|
+
Requires-Dist: fastapi>=0.112.2; extra == 'all'
|
|
30
|
+
Requires-Dist: rich>=13.8.0; extra == 'all'
|
|
31
|
+
Requires-Dist: typing-extensions>=4.12.2; extra == 'all'
|
|
32
|
+
Requires-Dist: uvicorn>=0.30.6; extra == 'all'
|
|
35
33
|
Provides-Extra: cli
|
|
36
|
-
Requires-Dist: cmd2
|
|
37
|
-
Requires-Dist: rich
|
|
34
|
+
Requires-Dist: cmd2>=2.4.3; extra == 'cli'
|
|
35
|
+
Requires-Dist: rich>=13.8.0; extra == 'cli'
|
|
38
36
|
Provides-Extra: web-api
|
|
39
|
-
Requires-Dist: dependency-injector
|
|
40
|
-
Requires-Dist: fastapi
|
|
41
|
-
Requires-Dist: typing-extensions
|
|
42
|
-
Requires-Dist: uvicorn
|
|
37
|
+
Requires-Dist: dependency-injector>=4.41.0; extra == 'web-api'
|
|
38
|
+
Requires-Dist: fastapi>=0.112.2; extra == 'web-api'
|
|
39
|
+
Requires-Dist: typing-extensions>=4.12.2; extra == 'web-api'
|
|
40
|
+
Requires-Dist: uvicorn>=0.30.6; extra == 'web-api'
|
|
43
41
|
Description-Content-Type: text/markdown
|
|
44
42
|
|
|
45
43
|
<div align="center">
|
|
46
44
|
|
|
47
45
|

|
|
48
46
|
|
|
49
|
-
**Version 0.
|
|
47
|
+
**Version 0.5.0**
|
|
50
48
|
|
|
51
49
|
A simple and modular tool to evaluate any LLM application.
|
|
52
50
|
|
|
@@ -6,19 +6,19 @@ moonshot/integrations/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
6
6
|
moonshot/integrations/cli/__main__.py,sha256=0VnYSj2AayvDCZ3uXpldPcjMHt2Yd7BWojWzFOGSSl4,679
|
|
7
7
|
moonshot/integrations/cli/active_session_cfg.py,sha256=n8hOFxFjvz26qbEFY4q7iPUZYrGLoeCmXJxmOb_xWUE,20
|
|
8
8
|
moonshot/integrations/cli/cli.py,sha256=9tnzcxcSOjblxCUpyh3pK0ke0bLs3s-63OxXtYoZI2g,2769
|
|
9
|
-
moonshot/integrations/cli/cli_errors.py,sha256=
|
|
9
|
+
moonshot/integrations/cli/cli_errors.py,sha256=jJ15ngnVJjSByamtOE2Cx79k1mOJnAl36NbCjpPppeM,23672
|
|
10
10
|
moonshot/integrations/cli/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
moonshot/integrations/cli/benchmark/benchmark.py,sha256=QUxr6DU11-XeH6Y3j1uPsZsotshgy64G_cWNf0Rn2_U,6303
|
|
12
|
-
moonshot/integrations/cli/benchmark/cookbook.py,sha256=
|
|
12
|
+
moonshot/integrations/cli/benchmark/cookbook.py,sha256=rT4gK88LhATFxsAxWWYExtPVT09oWPHJtJ1HQkLT3yU,29444
|
|
13
13
|
moonshot/integrations/cli/benchmark/datasets.py,sha256=Uq5XMNWUp775sz9jCZUZHHmkumPFI7cHVRueHgWm70Q,8965
|
|
14
14
|
moonshot/integrations/cli/benchmark/metrics.py,sha256=SHs-hIa4CIPyOJtxK2U4D6IRHy3ZNsRtZlAMGvF9Qxw,8310
|
|
15
|
-
moonshot/integrations/cli/benchmark/recipe.py,sha256=
|
|
15
|
+
moonshot/integrations/cli/benchmark/recipe.py,sha256=uAYTBu1EwcCBdf9Iut6eboZ6nBt5_hDwBhru50mZer0,32407
|
|
16
16
|
moonshot/integrations/cli/benchmark/result.py,sha256=TGlIuDkPB1Cfu1u2uyDsWtgQxTOoNdGDzc0vCnGC1zk,11152
|
|
17
17
|
moonshot/integrations/cli/benchmark/run.py,sha256=HBztvG_Zkg1ZAWsFv0QDE43FaEmx92vTWc4h1U3VesU,7438
|
|
18
18
|
moonshot/integrations/cli/benchmark/runner.py,sha256=Y4Vt6Qqn9QzsM6eLUM9m2_XKkW3ctu-2jMTSei_TDPU,7098
|
|
19
19
|
moonshot/integrations/cli/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
moonshot/integrations/cli/common/common.py,sha256=RjlIqV82DHVi5CeUjOkC1xYlVAq4mxelDD9MN4Tj4jU,3302
|
|
21
|
-
moonshot/integrations/cli/common/connectors.py,sha256=
|
|
21
|
+
moonshot/integrations/cli/common/connectors.py,sha256=bmdZfDHKhii3ejZb5tkT0WnoSYtAGKPk8CpBgIvI5PY,20017
|
|
22
22
|
moonshot/integrations/cli/common/dataset.py,sha256=zkVGtIJIozJPPs_Qc__Hnw1tAh_pcvYV5gqf_eOaGXQ,12749
|
|
23
23
|
moonshot/integrations/cli/common/display_helper.py,sha256=8rVowW33XK0j0C_X_H1jUbFlFk1Y2WpzxmIUE3Ca5Co,1459
|
|
24
24
|
moonshot/integrations/cli/common/prompt_template.py,sha256=2cXWeHh16EUvzYFre7juMxT2R0x3kqDJVucH0bKLmCU,6351
|
|
@@ -34,7 +34,7 @@ moonshot/integrations/cli/utils/process_data.py,sha256=QVL5vp2_8ZgGicmCAdeYEHkeb
|
|
|
34
34
|
moonshot/integrations/web_api/.env.dev,sha256=0z5_Ut8rF-UqFZtgjkH2qoqORhD5_nSs2w_OeX2SteI,182
|
|
35
35
|
moonshot/integrations/web_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
moonshot/integrations/web_api/__main__.py,sha256=MdnLi_ZF-olAAEJwTPU1iGYFYwo-fNWNT2qfchkH3y4,2050
|
|
37
|
-
moonshot/integrations/web_api/app.py,sha256=
|
|
37
|
+
moonshot/integrations/web_api/app.py,sha256=Dxq5Tt8_W3Xn8UHzcbU1pDx7QJJvByIVjg1KbgMxRT4,3651
|
|
38
38
|
moonshot/integrations/web_api/container.py,sha256=DVkJG_qm7ItcG6tgMYOqIj07wpKhPWOOfy6-bEv72y4,5915
|
|
39
39
|
moonshot/integrations/web_api/logging_conf.py,sha256=t3EGRV6tZhV732KXe8_Tiy0fiwVAWxZX5Tt8VTgrrfg,3388
|
|
40
40
|
moonshot/integrations/web_api/log/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -59,7 +59,7 @@ moonshot/integrations/web_api/schemas/cookbook_create_dto.py,sha256=00SPVw7lEpfY
|
|
|
59
59
|
moonshot/integrations/web_api/schemas/cookbook_response_model.py,sha256=J_DkyuWwNNy6_G1QT6JY-qIr0zhMkQd208wXhTA-Tao,342
|
|
60
60
|
moonshot/integrations/web_api/schemas/dataset_create_dto.py,sha256=Jr_EbIgqR7K__LQXpXSocfYLE6oN7pGRFzWcDVcFaus,963
|
|
61
61
|
moonshot/integrations/web_api/schemas/dataset_response_dto.py,sha256=s5x4-UXEWccWhK42E0FPXiHG6VqjuFuph-2t5atEkg4,171
|
|
62
|
-
moonshot/integrations/web_api/schemas/endpoint_create_dto.py,sha256=
|
|
62
|
+
moonshot/integrations/web_api/schemas/endpoint_create_dto.py,sha256=WS8AfRybrweoOgZx6K6jiNy1Z6J3IZS1PUNnrRxGKyM,678
|
|
63
63
|
moonshot/integrations/web_api/schemas/endpoint_response_model.py,sha256=OmmM2uaPSgB2aqPFfkhseKkI5OKCKilXR19gDmwFlLc,321
|
|
64
64
|
moonshot/integrations/web_api/schemas/prompt_response_model.py,sha256=S9PwxJERY1ppDaUKLlL9_skHcYcURIIvFnRZj24hLnE,303
|
|
65
65
|
moonshot/integrations/web_api/schemas/prompt_template_response_model.py,sha256=V7znK-QjQVUXUbsmEy5hZHzjnHYCN1kDtvOxgyxF83k,195
|
|
@@ -81,7 +81,7 @@ moonshot/integrations/web_api/services/bookmark_service.py,sha256=jI9nXs1hjzO0CL
|
|
|
81
81
|
moonshot/integrations/web_api/services/context_strategy_service.py,sha256=6YKnnG8JlE_1nlnr4Hq7rgz-sxI6oQglK0STaWPFQxQ,710
|
|
82
82
|
moonshot/integrations/web_api/services/cookbook_service.py,sha256=Hi6xKmChS6-fOKXoHqjOkM0cUvNCV3XaNJNVoXMbK0U,7942
|
|
83
83
|
moonshot/integrations/web_api/services/dataset_service.py,sha256=ZWb3FqyDkA0C9qhlQ3X_zR0ohAlwlLsJi-mgKLvXpnI,2407
|
|
84
|
-
moonshot/integrations/web_api/services/endpoint_service.py,sha256=
|
|
84
|
+
moonshot/integrations/web_api/services/endpoint_service.py,sha256=N5SXNAh44UNeBpMhA9baL0VZoTx4sHzpy4y7-Ch8O4E,2395
|
|
85
85
|
moonshot/integrations/web_api/services/metric_service.py,sha256=xWC5Dk8aiU7tuHsxYedTTrEkbA3Ug1pV2nbaBas6cAg,456
|
|
86
86
|
moonshot/integrations/web_api/services/prompt_template_service.py,sha256=5ds7pKDB2R0_0slVDwsCRIpIVdsgpqhI-3wQqSYcpuE,1226
|
|
87
87
|
moonshot/integrations/web_api/services/recipe_service.py,sha256=Z6cZqwFOVFaksoXK_K05rp5wdZX4qrgMFbw_6fSpjYo,6551
|
|
@@ -96,33 +96,34 @@ moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback
|
|
|
96
96
|
moonshot/integrations/web_api/temp/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
97
|
moonshot/integrations/web_api/types/types.py,sha256=AN0Xf61lx2c5AFAYoXA8mVL5iufVBpwYlIPdo8gv-ls,2395
|
|
98
98
|
moonshot/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
|
-
moonshot/src/messages_constants.py,sha256=
|
|
99
|
+
moonshot/src/messages_constants.py,sha256=usbvwitgRdOVY0ARdBbh9uiLNUb6WCdCuSoa64tVMhM,6936
|
|
100
100
|
moonshot/src/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
|
-
moonshot/src/api/api_bookmark.py,sha256=
|
|
102
|
-
moonshot/src/api/api_connector.py,sha256=
|
|
103
|
-
moonshot/src/api/api_connector_endpoint.py,sha256=
|
|
104
|
-
moonshot/src/api/api_context_strategy.py,sha256=
|
|
105
|
-
moonshot/src/api/api_cookbook.py,sha256=
|
|
106
|
-
moonshot/src/api/api_dataset.py,sha256=
|
|
107
|
-
moonshot/src/api/api_environment_variables.py,sha256=
|
|
108
|
-
moonshot/src/api/api_metrics.py,sha256=
|
|
109
|
-
moonshot/src/api/api_prompt_template.py,sha256=
|
|
110
|
-
moonshot/src/api/api_recipe.py,sha256=
|
|
111
|
-
moonshot/src/api/api_red_teaming.py,sha256=
|
|
112
|
-
moonshot/src/api/api_result.py,sha256=
|
|
113
|
-
moonshot/src/api/api_run.py,sha256=
|
|
114
|
-
moonshot/src/api/api_runner.py,sha256=
|
|
115
|
-
moonshot/src/api/api_session.py,sha256=
|
|
116
|
-
moonshot/src/bookmark/bookmark.py,sha256=
|
|
101
|
+
moonshot/src/api/api_bookmark.py,sha256=gg7uJU7ixZtmJ99S3xdgQgcznkY8SjoJaTBkSsnoWrM,3442
|
|
102
|
+
moonshot/src/api/api_connector.py,sha256=Q_of-aHPuWkbefMJq4uXctJl89G2Tt6J_HfSuf1hE6g,2234
|
|
103
|
+
moonshot/src/api/api_connector_endpoint.py,sha256=lwfhlWNBJ6QotqffmURtjRmxfzbBlSIAZupeSpMt9VU,5584
|
|
104
|
+
moonshot/src/api/api_context_strategy.py,sha256=uRIfNjKJ_Wk9nSrvbPRfrdQLpG0K6kH9rl5tmmHui40,2151
|
|
105
|
+
moonshot/src/api/api_cookbook.py,sha256=KzGCcJjpAs92FZBloojLbmi5nqK3hd_zX8m5jYWKMMM,5715
|
|
106
|
+
moonshot/src/api/api_dataset.py,sha256=i2KwnZ-6fTm_tyn8cRw8iesrGi7_Nh0-1bFuN7m0TVo,4066
|
|
107
|
+
moonshot/src/api/api_environment_variables.py,sha256=wRx6rm95ItyL_uKUAYfSjcPZNbRxKl1GGS4PpWcTE1s,712
|
|
108
|
+
moonshot/src/api/api_metrics.py,sha256=x5DiysTYQsMmcAS2y2XpgvrPobZk7GT2rhO-MaIRun4,1603
|
|
109
|
+
moonshot/src/api/api_prompt_template.py,sha256=HQUl7-HGcxA620cY0vDqqo7CoY9uONkXIOlolduIgbE,1959
|
|
110
|
+
moonshot/src/api/api_recipe.py,sha256=_TJUc8vJqxu5Uti3q2GSQ2uJdj8hqNBFSvBi2NaDnyQ,6135
|
|
111
|
+
moonshot/src/api/api_red_teaming.py,sha256=GBBy4yDAbDuUyeANkGorZJENWceNIzfg30TuiF-Av3Q,2004
|
|
112
|
+
moonshot/src/api/api_result.py,sha256=xZHex_K_PbSr-65LPLr5up4lvu313-VJroR4BBR5JQk,2849
|
|
113
|
+
moonshot/src/api/api_run.py,sha256=ToPYIeTPd2OaOqd20UQ_ie2BQPqLw5aZ_RwRwv9oGpU,2983
|
|
114
|
+
moonshot/src/api/api_runner.py,sha256=spN7ogBGQN7I-c1u_UeKZ7vg02AtCuAl3dFG8CSayQU,4257
|
|
115
|
+
moonshot/src/api/api_session.py,sha256=w-mc_sj3ElQa6FPQqWbK2bFgGTu1ECwYm3tN41xFkes,11130
|
|
116
|
+
moonshot/src/bookmark/bookmark.py,sha256=Gf9wZ5wmJUmatHChr0_3tVyUbPMfpCVeEfujQQjIv18,11867
|
|
117
117
|
moonshot/src/bookmark/bookmark_arguments.py,sha256=cB5m2zB8255WVdacmC2-ZYNyaoK4-gOM_Qwb_JDR-34,1449
|
|
118
118
|
moonshot/src/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
119
|
moonshot/src/configs/env_variables.py,sha256=eF__UJN37LCzIB4pv_T7G-kQHlOa657QA7IpL1d_0MM,7150
|
|
120
120
|
moonshot/src/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
|
-
moonshot/src/connectors/connector.py,sha256
|
|
122
|
-
moonshot/src/connectors/connector_prompt_arguments.py,sha256=
|
|
121
|
+
moonshot/src/connectors/connector.py,sha256=-2-vp6hPWigdEOwkHAz1SSTGwGsaraZHzHnb_9aD5HI,16272
|
|
122
|
+
moonshot/src/connectors/connector_prompt_arguments.py,sha256=aJX5Jwd9bxWWLhIntXBu5Iu3NKsOcud-dfdBJVgKK58,751
|
|
123
|
+
moonshot/src/connectors/connector_response.py,sha256=kIByU-H7A0NXRxk1Y2XPGZHSJNKzJj6BNkzXqdyZyb0,403
|
|
123
124
|
moonshot/src/connectors_endpoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
124
|
-
moonshot/src/connectors_endpoints/connector_endpoint.py,sha256=
|
|
125
|
-
moonshot/src/connectors_endpoints/connector_endpoint_arguments.py,sha256=
|
|
125
|
+
moonshot/src/connectors_endpoints/connector_endpoint.py,sha256=3U4030gKhvDt4e7VD3lac2FG0kxGJ0DSLPTAUKYOPEk,10018
|
|
126
|
+
moonshot/src/connectors_endpoints/connector_endpoint_arguments.py,sha256=0v9mUHki4l22CK8o8UjATAsFDza9Lutbh4QplLiDXs8,2434
|
|
126
127
|
moonshot/src/cookbooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
128
|
moonshot/src/cookbooks/cookbook.py,sha256=LjmbJtFwIPhupQlx6LjjIQLMfpwcWZKurduS8MBgqHI,9661
|
|
128
129
|
moonshot/src/cookbooks/cookbook_arguments.py,sha256=iVp3x1-wi_RL7peTSr5TWbXnjuB_w7Uj29kJrQg48Y0,1210
|
|
@@ -139,7 +140,7 @@ moonshot/src/recipes/recipe.py,sha256=PE4mimP7Y7lDanXib2uMrd9KpLWOxRdg0Cps5rLRQx
|
|
|
139
140
|
moonshot/src/recipes/recipe_arguments.py,sha256=9LdVJidB6Sci941QvnudBznvx9_NVCl8r-HvzSZInlY,3914
|
|
140
141
|
moonshot/src/redteaming/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
142
|
moonshot/src/redteaming/attack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
|
-
moonshot/src/redteaming/attack/attack_module.py,sha256=
|
|
143
|
+
moonshot/src/redteaming/attack/attack_module.py,sha256=R2nfAKiPlEpgtWPHPANyciBxfiKg4YCEusvOg8p-EYM,27905
|
|
143
144
|
moonshot/src/redteaming/attack/attack_module_arguments.py,sha256=L8H6poNj7xNWLUr6jfuSkwE7TNV0aTPaZBal4OvL7IA,1225
|
|
144
145
|
moonshot/src/redteaming/attack/context_strategy.py,sha256=KiAw85Pl8tuTzQ2d3CkZrjn3Ddp7BnlT5Gc67TTnq4M,4821
|
|
145
146
|
moonshot/src/redteaming/context_strategy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -158,7 +159,7 @@ moonshot/src/runners/runner_arguments.py,sha256=Bg4OPSmgr9jZKNAwPH0T3epEHw-6qGrf
|
|
|
158
159
|
moonshot/src/runners/runner_type.py,sha256=jOfnAnaCYp-rPTRJXhM8hin_dinlR0sMwmimQXvLcJ0,100
|
|
159
160
|
moonshot/src/runs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
161
|
moonshot/src/runs/run.py,sha256=3Y_256IfOv5zpeujVPsA5YdX7uZjGMRvg0VencUwgLw,14339
|
|
161
|
-
moonshot/src/runs/run_arguments.py,sha256=
|
|
162
|
+
moonshot/src/runs/run_arguments.py,sha256=rYMyAJrMYNwQq1yPSEXFv7fe6h17ZH37DXKEOixYEko,7450
|
|
162
163
|
moonshot/src/runs/run_progress.py,sha256=d1BcNo6Kp4vA165TDx_xebl8JDo92aV-YutPxsgCOxE,6495
|
|
163
164
|
moonshot/src/runs/run_status.py,sha256=TRtizcDzPxf6aQ2c3OovM6IQKJ0VCBhqDWvn7UBw5Zg,251
|
|
164
165
|
moonshot/src/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -171,9 +172,9 @@ moonshot/src/utils/import_modules.py,sha256=T9zTN59PFnvY2rjyWhSV9KSIAHxWV1pyBemF
|
|
|
171
172
|
moonshot/src/utils/log.py,sha256=YNgD7Eh2OT36XlmVBKCGUTAh9TRp4Akfe4kDdvHASgs,2502
|
|
172
173
|
moonshot/src/utils/pagination.py,sha256=5seymyRoqyENIhKllAatr1T91kMCGFslcvRnJHyMSvc,814
|
|
173
174
|
moonshot/src/utils/timeit.py,sha256=TvuF0w8KWhp0oZFY0cUU3UY0xlGKjchb0OkfYfgVTlc,866
|
|
174
|
-
aiverify_moonshot-0.
|
|
175
|
-
aiverify_moonshot-0.
|
|
176
|
-
aiverify_moonshot-0.
|
|
177
|
-
aiverify_moonshot-0.
|
|
178
|
-
aiverify_moonshot-0.
|
|
179
|
-
aiverify_moonshot-0.
|
|
175
|
+
aiverify_moonshot-0.5.0.dist-info/METADATA,sha256=yYa9FI2r9gbSgj9FkaSHIAe12Q2navSqPBXn25Lj9RY,12344
|
|
176
|
+
aiverify_moonshot-0.5.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
177
|
+
aiverify_moonshot-0.5.0.dist-info/licenses/AUTHORS.md,sha256=mmAbe3i3sT8JZHJMBhxp3i1xRehV0g7WB4T_eyIBuBs,59
|
|
178
|
+
aiverify_moonshot-0.5.0.dist-info/licenses/LICENSE.md,sha256=53izDRmJZZCjpYGfyLqlxnGQN-aNWBxasuzuMXC5Ias,11347
|
|
179
|
+
aiverify_moonshot-0.5.0.dist-info/licenses/NOTICES.md,sha256=vS1zZYAnGjCJdwQ13xv3b2zc30wOS98ZnCKluT-AhHs,123266
|
|
180
|
+
aiverify_moonshot-0.5.0.dist-info/RECORD,,
|
|
@@ -256,11 +256,7 @@ def run_cookbook(args) -> None:
|
|
|
256
256
|
if isinstance(args.random_seed, bool) or not isinstance(args.random_seed, int):
|
|
257
257
|
raise TypeError(ERROR_BENCHMARK_RUN_COOKBOOK_RANDOM_SEED_VALIDATION)
|
|
258
258
|
|
|
259
|
-
if (
|
|
260
|
-
not isinstance(args.system_prompt, str)
|
|
261
|
-
or not args.system_prompt
|
|
262
|
-
or args.system_prompt is None
|
|
263
|
-
):
|
|
259
|
+
if not isinstance(args.system_prompt, str) or args.system_prompt is None:
|
|
264
260
|
raise TypeError(ERROR_BENCHMARK_RUN_COOKBOOK_SYS_PROMPT_VALIDATION)
|
|
265
261
|
|
|
266
262
|
if (
|
|
@@ -467,7 +463,10 @@ def _display_view_cookbook(cookbook_info):
|
|
|
467
463
|
recipes_list = api_read_recipes(recipes)
|
|
468
464
|
if recipes_list:
|
|
469
465
|
table = Table(
|
|
470
|
-
title=
|
|
466
|
+
title=f'Cookbook "{name}"',
|
|
467
|
+
show_lines=True,
|
|
468
|
+
expand=True,
|
|
469
|
+
header_style="bold",
|
|
471
470
|
)
|
|
472
471
|
table.add_column("No.", width=2)
|
|
473
472
|
table.add_column("Recipe", justify="left", width=78)
|
|
@@ -482,7 +481,6 @@ def _display_view_cookbook(cookbook_info):
|
|
|
482
481
|
datasets,
|
|
483
482
|
prompt_templates,
|
|
484
483
|
metrics,
|
|
485
|
-
attack_strategies,
|
|
486
484
|
grading_scale,
|
|
487
485
|
stats,
|
|
488
486
|
) = recipe.values()
|
|
@@ -494,9 +492,6 @@ def _display_view_cookbook(cookbook_info):
|
|
|
494
492
|
"Prompt Templates", prompt_templates
|
|
495
493
|
)
|
|
496
494
|
metrics_info = display_view_list_format("Metrics", metrics)
|
|
497
|
-
attack_strategies_info = display_view_list_format(
|
|
498
|
-
"Attack Strategies", attack_strategies
|
|
499
|
-
)
|
|
500
495
|
grading_scale_info = _display_view_grading_scale_format(
|
|
501
496
|
"Grading Scale", grading_scale
|
|
502
497
|
)
|
|
@@ -506,7 +501,9 @@ def _display_view_cookbook(cookbook_info):
|
|
|
506
501
|
f"[red]id: {id}[/red]\n\n[blue]{name}[/blue]\n{description}\n\n"
|
|
507
502
|
f"{tags_info}\n\n{categories_info}\n\n{grading_scale_info}\n\n{stats_info}"
|
|
508
503
|
)
|
|
509
|
-
contains_info =
|
|
504
|
+
contains_info = (
|
|
505
|
+
f"{datasets_info}\n\n{prompt_templates_info}\n\n{metrics_info}"
|
|
506
|
+
)
|
|
510
507
|
|
|
511
508
|
table.add_section()
|
|
512
509
|
table.add_row(str(recipe_id), recipe_info, contains_info)
|
|
@@ -337,11 +337,7 @@ def run_recipe(args) -> None:
|
|
|
337
337
|
if isinstance(args.random_seed, bool) or not isinstance(args.random_seed, int):
|
|
338
338
|
raise TypeError(ERROR_BENCHMARK_RUN_RECIPE_RANDOM_SEED_VALIDATION)
|
|
339
339
|
|
|
340
|
-
if (
|
|
341
|
-
not isinstance(args.system_prompt, str)
|
|
342
|
-
or not args.system_prompt
|
|
343
|
-
or args.system_prompt is None
|
|
344
|
-
):
|
|
340
|
+
if not isinstance(args.system_prompt, str) or args.system_prompt is None:
|
|
345
341
|
raise TypeError(ERROR_BENCHMARK_RUN_RECIPE_SYS_PROMPT_VALIDATION)
|
|
346
342
|
|
|
347
343
|
if (
|
|
@@ -348,6 +348,9 @@ ERROR_COMMON_ADD_ENDPOINT_MAX_CALLS_PER_SECOND_VALIDATION = "The 'max_calls_per_
|
|
|
348
348
|
ERROR_COMMON_ADD_ENDPOINT_MAX_CONCURRENCY_VALIDATION = (
|
|
349
349
|
"The 'max_concurrency' argument must be a non-empty positive integer and not None."
|
|
350
350
|
)
|
|
351
|
+
ERROR_COMMON_ADD_ENDPOINT_MODEL_VALIDATION = (
|
|
352
|
+
"The 'model' argument must be a string and not None."
|
|
353
|
+
)
|
|
351
354
|
ERROR_COMMON_ADD_ENDPOINT_PARAMS_VALIDATION = (
|
|
352
355
|
"The 'params' argument must be a string representation of a dictionary."
|
|
353
356
|
)
|
|
@@ -17,6 +17,7 @@ from moonshot.integrations.cli.cli_errors import (
|
|
|
17
17
|
ERROR_COMMON_ADD_ENDPOINT_CONNECTOR_TYPE_VALIDATION,
|
|
18
18
|
ERROR_COMMON_ADD_ENDPOINT_MAX_CALLS_PER_SECOND_VALIDATION,
|
|
19
19
|
ERROR_COMMON_ADD_ENDPOINT_MAX_CONCURRENCY_VALIDATION,
|
|
20
|
+
ERROR_COMMON_ADD_ENDPOINT_MODEL_VALIDATION,
|
|
20
21
|
ERROR_COMMON_ADD_ENDPOINT_NAME_VALIDATION,
|
|
21
22
|
ERROR_COMMON_ADD_ENDPOINT_PARAMS_VALIDATION,
|
|
22
23
|
ERROR_COMMON_ADD_ENDPOINT_TOKEN_VALIDATION,
|
|
@@ -56,6 +57,7 @@ def add_endpoint(args) -> None:
|
|
|
56
57
|
token (str): The access token for the API.
|
|
57
58
|
max_calls_per_second (int): The maximum number of API calls allowed per second.
|
|
58
59
|
max_concurrency (int): The maximum number of concurrent API calls.
|
|
60
|
+
model (str): The model used by the endpoint.
|
|
59
61
|
params (str): A string representation of a dictionary containing additional parameters for the connector.
|
|
60
62
|
|
|
61
63
|
Returns:
|
|
@@ -94,6 +96,9 @@ def add_endpoint(args) -> None:
|
|
|
94
96
|
):
|
|
95
97
|
raise TypeError(ERROR_COMMON_ADD_ENDPOINT_MAX_CONCURRENCY_VALIDATION)
|
|
96
98
|
|
|
99
|
+
if not isinstance(args.model, str) or args.model is None:
|
|
100
|
+
raise TypeError(ERROR_COMMON_ADD_ENDPOINT_MODEL_VALIDATION)
|
|
101
|
+
|
|
97
102
|
try:
|
|
98
103
|
params_dict = literal_eval(args.params)
|
|
99
104
|
except Exception:
|
|
@@ -108,6 +113,7 @@ def add_endpoint(args) -> None:
|
|
|
108
113
|
args.token,
|
|
109
114
|
args.max_calls_per_second,
|
|
110
115
|
args.max_concurrency,
|
|
116
|
+
args.model,
|
|
111
117
|
params_dict,
|
|
112
118
|
)
|
|
113
119
|
print(f"[add_endpoint]: Endpoint ({new_endpoint_id}) created.")
|
|
@@ -123,9 +129,9 @@ def list_endpoints(args) -> list | None:
|
|
|
123
129
|
moonshot.api module. It then displays the endpoints using the _display_endpoints function.
|
|
124
130
|
|
|
125
131
|
Args:
|
|
126
|
-
args: A namespace object from argparse. It should have
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
args: A namespace object from argparse. It should have the following optional attributes:
|
|
133
|
+
find (str): Optional field to find endpoint(s) with a keyword.
|
|
134
|
+
pagination (str): Optional field to paginate endpoints.
|
|
129
135
|
|
|
130
136
|
Returns:
|
|
131
137
|
list | None: A list of ConnectorEndpoint or None if there is no result.
|
|
@@ -176,9 +182,9 @@ def list_connector_types(args) -> list | None:
|
|
|
176
182
|
moonshot.api module. It then displays the connector types using the _display_connector_types function.
|
|
177
183
|
|
|
178
184
|
Args:
|
|
179
|
-
args: A namespace object from argparse. It should have
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
args: A namespace object from argparse. It should have the following optional attributes:
|
|
186
|
+
find (str): Optional field to find connector type(s) with a keyword.
|
|
187
|
+
pagination (str): Optional field to paginate connector types.
|
|
182
188
|
|
|
183
189
|
Returns:
|
|
184
190
|
list | None: A list of Connector or None if there is no result.
|
|
@@ -373,7 +379,8 @@ def _display_endpoints(endpoints_list):
|
|
|
373
379
|
|
|
374
380
|
Args:
|
|
375
381
|
endpoints_list (list): A list of endpoints. Each endpoint is a dictionary with keys 'id', 'name',
|
|
376
|
-
'connector_type', 'uri', 'token', 'max_calls_per_second', 'max_concurrency', '
|
|
382
|
+
'connector_type', 'uri', 'token', 'max_calls_per_second', 'max_concurrency', 'model', 'params',
|
|
383
|
+
and 'created_date'.
|
|
377
384
|
|
|
378
385
|
Returns:
|
|
379
386
|
None
|
|
@@ -391,7 +398,8 @@ def _display_endpoints(endpoints_list):
|
|
|
391
398
|
table.add_column("Uri", justify="left", width=10)
|
|
392
399
|
table.add_column("Token", justify="left", width=10)
|
|
393
400
|
table.add_column("Max Calls Per Second", justify="left", width=5)
|
|
394
|
-
table.add_column("Max
|
|
401
|
+
table.add_column("Max Concurrency", justify="left", width=5)
|
|
402
|
+
table.add_column("Model", justify="left", width=5)
|
|
395
403
|
table.add_column("Params", justify="left", width=30)
|
|
396
404
|
table.add_column("Created Date", justify="left", width=8)
|
|
397
405
|
|
|
@@ -404,6 +412,7 @@ def _display_endpoints(endpoints_list):
|
|
|
404
412
|
token,
|
|
405
413
|
max_calls_per_second,
|
|
406
414
|
max_concurrency,
|
|
415
|
+
model,
|
|
407
416
|
params,
|
|
408
417
|
created_date,
|
|
409
418
|
*other_args,
|
|
@@ -419,6 +428,7 @@ def _display_endpoints(endpoints_list):
|
|
|
419
428
|
token,
|
|
420
429
|
str(max_calls_per_second),
|
|
421
430
|
str(max_concurrency),
|
|
431
|
+
str(model),
|
|
422
432
|
escape(str(params)),
|
|
423
433
|
created_date,
|
|
424
434
|
)
|
|
@@ -432,7 +442,7 @@ def _display_endpoints(endpoints_list):
|
|
|
432
442
|
add_endpoint_args = cmd2.Cmd2ArgumentParser(
|
|
433
443
|
description="Add a new endpoint. The 'name' argument will be slugified to create a unique identifier.",
|
|
434
444
|
epilog="Example:\n add_endpoint openai-connector 'OpenAI GPT3.5 Turbo 1106' "
|
|
435
|
-
"MY_URI ADD_YOUR_TOKEN_HERE 1 1 \"{'temperature': 0.5
|
|
445
|
+
"MY_URI ADD_YOUR_TOKEN_HERE 1 1 'gpt-3.5-turbo-1106' \"{'temperature': 0.5}\"",
|
|
436
446
|
)
|
|
437
447
|
add_endpoint_args.add_argument(
|
|
438
448
|
"connector_type",
|
|
@@ -450,6 +460,7 @@ add_endpoint_args.add_argument(
|
|
|
450
460
|
add_endpoint_args.add_argument(
|
|
451
461
|
"max_concurrency", type=int, help="Max concurrency of the new endpoint"
|
|
452
462
|
)
|
|
463
|
+
add_endpoint_args.add_argument("model", type=str, help="Model of the new endpoint")
|
|
453
464
|
add_endpoint_args.add_argument("params", type=str, help="Params of the new endpoint")
|
|
454
465
|
|
|
455
466
|
# Update endpoint arguments
|
|
@@ -457,11 +468,12 @@ update_endpoint_args = cmd2.Cmd2ArgumentParser(
|
|
|
457
468
|
description="Update an endpoint.",
|
|
458
469
|
epilog=(
|
|
459
470
|
"Available keys:\n"
|
|
460
|
-
" name:
|
|
471
|
+
" name: Name of the endpoint\n"
|
|
461
472
|
" uri: URI of the endpoint\n"
|
|
462
473
|
" token: Token of the endpoint\n"
|
|
463
474
|
" max_calls_per_second: Rate limit for max calls per second\n"
|
|
464
475
|
" max_concurrency: Rate limit for max concurrency\n"
|
|
476
|
+
" model: Model of the endpoint\n"
|
|
465
477
|
" params: Extra arguments for the endpoint\n\n"
|
|
466
478
|
"Example:\n"
|
|
467
479
|
" update_endpoint openai-gpt4 \"[('name', 'my-special-openai-endpoint'), "
|
|
@@ -71,7 +71,7 @@ def create_app(cfg: providers.Configuration) -> CustomFastAPI:
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
app: CustomFastAPI = CustomFastAPI(
|
|
74
|
-
title="Project Moonshot", version="0.
|
|
74
|
+
title="Project Moonshot", version="0.5.0", **app_kwargs
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
if cfg.cors.enabled():
|
|
@@ -17,5 +17,6 @@ class EndpointUpdateDTO(ConnectorEndpointPydanticModel):
|
|
|
17
17
|
token: Optional[str] = None
|
|
18
18
|
max_calls_per_second: Optional[int] = None
|
|
19
19
|
max_concurrency: Optional[int] = None
|
|
20
|
+
model: Optional[str] = None
|
|
20
21
|
params: Optional[dict] = None
|
|
21
22
|
created_date: Optional[str] = None
|
|
@@ -13,6 +13,7 @@ class EndpointService(BaseService):
|
|
|
13
13
|
connector_type=endpoint_data.connector_type,
|
|
14
14
|
uri=endpoint_data.uri,
|
|
15
15
|
token=endpoint_data.token,
|
|
16
|
+
model=endpoint_data.model,
|
|
16
17
|
max_calls_per_second=endpoint_data.max_calls_per_second,
|
|
17
18
|
max_concurrency=endpoint_data.max_concurrency,
|
|
18
19
|
params=endpoint_data.params,
|
moonshot/src/api/api_bookmark.py
CHANGED
|
@@ -21,10 +21,15 @@ def api_insert_bookmark(
|
|
|
21
21
|
Args:
|
|
22
22
|
name (str): The unique name of the bookmark.
|
|
23
23
|
prompt (str): The associated prompt text for the bookmark.
|
|
24
|
+
prepared_prompt (str): The prepared prompt text for the bookmark.
|
|
24
25
|
response (str): The corresponding response text for the bookmark.
|
|
25
|
-
context_strategy (str): The strategy used for context management in the bookmark.
|
|
26
|
-
prompt_template (str): The template used for generating the prompt.
|
|
27
|
-
attack_module (str): The attack module linked with the bookmark.
|
|
26
|
+
context_strategy (str, optional): The strategy used for context management in the bookmark. Defaults to "".
|
|
27
|
+
prompt_template (str, optional): The template used for generating the prompt. Defaults to "".
|
|
28
|
+
attack_module (str, optional): The attack module linked with the bookmark. Defaults to "".
|
|
29
|
+
metric (str, optional): The metric associated with the bookmark. Defaults to "".
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
dict: A dictionary containing the details of the newly inserted bookmark.
|
|
28
33
|
"""
|
|
29
34
|
# Create a new BookmarkArguments object
|
|
30
35
|
bookmark_args = BookmarkArguments(
|
|
@@ -57,10 +62,10 @@ def api_get_bookmark(bookmark_name: str) -> dict:
|
|
|
57
62
|
Retrieves the details of a specific bookmark by its name.
|
|
58
63
|
|
|
59
64
|
Args:
|
|
60
|
-
bookmark_name (
|
|
65
|
+
bookmark_name (str): The name of the bookmark to retrieve.
|
|
61
66
|
|
|
62
67
|
Returns:
|
|
63
|
-
dict: The bookmark details corresponding to the provided
|
|
68
|
+
dict: The bookmark details corresponding to the provided name.
|
|
64
69
|
"""
|
|
65
70
|
return Bookmark().get_bookmark(bookmark_name)
|
|
66
71
|
|
|
@@ -71,6 +76,9 @@ def api_delete_bookmark(bookmark_name: str) -> dict:
|
|
|
71
76
|
|
|
72
77
|
Args:
|
|
73
78
|
bookmark_name (str): The name of the bookmark to be removed.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
dict: A dictionary containing the details of the deleted bookmark.
|
|
74
82
|
"""
|
|
75
83
|
return Bookmark().delete_bookmark(bookmark_name)
|
|
76
84
|
|
|
@@ -78,6 +86,9 @@ def api_delete_bookmark(bookmark_name: str) -> dict:
|
|
|
78
86
|
def api_delete_all_bookmark() -> dict:
|
|
79
87
|
"""
|
|
80
88
|
Removes all bookmarks from the database.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
dict: A dictionary indicating the result of the delete operation.
|
|
81
92
|
"""
|
|
82
93
|
return Bookmark().delete_all_bookmark()
|
|
83
94
|
|
|
@@ -13,8 +13,8 @@ def api_create_connector_from_endpoint(ep_id: str) -> Connector:
|
|
|
13
13
|
Creates a connector based on the provided endpoint ID.
|
|
14
14
|
|
|
15
15
|
This function retrieves the endpoint arguments using the provided endpoint ID and then creates a connector
|
|
16
|
-
based on those arguments. It utilizes the
|
|
17
|
-
arguments and then calls the
|
|
16
|
+
based on those arguments. It utilizes the ConnectorEndpoint's read method to fetch the endpoint
|
|
17
|
+
arguments and then calls the Connector's create method to initialize and return the connector.
|
|
18
18
|
|
|
19
19
|
Args:
|
|
20
20
|
ep_id (str): The ID of the endpoint for which to create a connector.
|
|
@@ -49,7 +49,7 @@ def api_get_all_connector_type() -> list[str]:
|
|
|
49
49
|
"""
|
|
50
50
|
Retrieves a list of all available connector types.
|
|
51
51
|
|
|
52
|
-
This function calls the
|
|
52
|
+
This function calls the Connector's get_available_items method to retrieve a list of all available
|
|
53
53
|
connector types. It returns the list of connector types.
|
|
54
54
|
|
|
55
55
|
Returns:
|
|
@@ -17,6 +17,7 @@ def api_create_endpoint(
|
|
|
17
17
|
token: str,
|
|
18
18
|
max_calls_per_second: int,
|
|
19
19
|
max_concurrency: int,
|
|
20
|
+
model: str,
|
|
20
21
|
params: dict,
|
|
21
22
|
) -> str:
|
|
22
23
|
"""
|
|
@@ -33,6 +34,7 @@ def api_create_endpoint(
|
|
|
33
34
|
token (str): The token for authentication with the connector.
|
|
34
35
|
max_calls_per_second (int): The maximum number of calls allowed per second.
|
|
35
36
|
max_concurrency (int): The maximum number of concurrent calls allowed.
|
|
37
|
+
model (str): The model used by the connector.
|
|
36
38
|
params (dict): Additional parameters for the connector.
|
|
37
39
|
|
|
38
40
|
Returns:
|
|
@@ -51,6 +53,7 @@ def api_create_endpoint(
|
|
|
51
53
|
token=token,
|
|
52
54
|
max_calls_per_second=max_calls_per_second,
|
|
53
55
|
max_concurrency=max_concurrency,
|
|
56
|
+
model=model,
|
|
54
57
|
params=params,
|
|
55
58
|
created_date="",
|
|
56
59
|
)
|
|
@@ -136,7 +139,7 @@ def api_get_all_endpoint() -> list[dict]:
|
|
|
136
139
|
"""
|
|
137
140
|
Retrieves a list of all available endpoints.
|
|
138
141
|
|
|
139
|
-
This function calls the
|
|
142
|
+
This function calls the ConnectorEndpoint's get_available_items method to retrieve a list of all available
|
|
140
143
|
endpoints and their details. It then converts each ConnectorEndpointArguments object into a dictionary for easier
|
|
141
144
|
consumption by the caller.
|
|
142
145
|
|
|
@@ -151,8 +154,8 @@ def api_get_all_endpoint_name() -> list[str]:
|
|
|
151
154
|
"""
|
|
152
155
|
Retrieves a list of all endpoint names.
|
|
153
156
|
|
|
154
|
-
This function calls the
|
|
155
|
-
endpoint names. It extracts the names from the tuple returned by
|
|
157
|
+
This function calls the ConnectorEndpoint's get_available_items method to retrieve a list of all available
|
|
158
|
+
endpoint names. It extracts the names from the tuple returned by get_available_items, which contains a list
|
|
156
159
|
of endpoint names and a list of ConnectorEndpointArguments objects.
|
|
157
160
|
|
|
158
161
|
Returns:
|
|
@@ -10,7 +10,7 @@ def api_get_all_context_strategies() -> list[str]:
|
|
|
10
10
|
"""
|
|
11
11
|
Retrieves and returns the names of all context strategies currently available.
|
|
12
12
|
|
|
13
|
-
This API endpoint interfaces with the `ContextStrategy.
|
|
13
|
+
This API endpoint interfaces with the `ContextStrategy.get_all_context_strategies` method to fetch a list
|
|
14
14
|
of all context strategy names. It's designed for clients that need to know what context strategies are available for
|
|
15
15
|
use in sessions or other components of the system.
|
|
16
16
|
|
|
@@ -48,7 +48,7 @@ def api_get_all_context_strategy_metadata() -> list[dict]:
|
|
|
48
48
|
returns a list of metadata dictionaries.
|
|
49
49
|
|
|
50
50
|
Returns:
|
|
51
|
-
list[dict]: A list of dictionaries, each representing the details of a context strategy metadata.
|
|
51
|
+
list[dict]: A list of dictionaries, each representing the details of a context strategy's metadata.
|
|
52
52
|
"""
|
|
53
53
|
|
|
54
54
|
return [
|