qtype 0.0.10__py3-none-any.whl → 0.0.12__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.
- qtype/application/__init__.py +12 -0
- qtype/application/commons/__init__.py +7 -0
- qtype/{converters → application/converters}/tools_from_module.py +2 -2
- qtype/application/converters/types.py +33 -0
- qtype/{dsl/document.py → application/documentation.py} +2 -0
- qtype/application/facade.py +160 -0
- qtype/base/__init__.py +14 -0
- qtype/base/exceptions.py +49 -0
- qtype/base/logging.py +39 -0
- qtype/base/types.py +29 -0
- qtype/commands/convert.py +64 -49
- qtype/commands/generate.py +59 -4
- qtype/commands/run.py +109 -72
- qtype/commands/serve.py +42 -28
- qtype/commands/validate.py +25 -42
- qtype/commands/visualize.py +51 -37
- qtype/dsl/__init__.py +9 -0
- qtype/dsl/base_types.py +8 -0
- qtype/dsl/custom_types.py +6 -4
- qtype/dsl/model.py +185 -50
- qtype/dsl/validator.py +9 -4
- qtype/interpreter/api.py +96 -40
- qtype/interpreter/auth/__init__.py +3 -0
- qtype/interpreter/auth/aws.py +234 -0
- qtype/interpreter/auth/cache.py +67 -0
- qtype/interpreter/auth/generic.py +103 -0
- qtype/interpreter/batch/flow.py +95 -0
- qtype/interpreter/batch/sql_source.py +95 -0
- qtype/interpreter/batch/step.py +63 -0
- qtype/interpreter/batch/types.py +41 -0
- qtype/interpreter/batch/utils.py +179 -0
- qtype/interpreter/conversions.py +21 -10
- qtype/interpreter/resource_cache.py +4 -2
- qtype/interpreter/steps/decoder.py +13 -9
- qtype/interpreter/steps/llm_inference.py +7 -9
- qtype/interpreter/steps/prompt_template.py +1 -1
- qtype/interpreter/streaming_helpers.py +3 -3
- qtype/interpreter/typing.py +47 -11
- qtype/interpreter/ui/404/index.html +1 -1
- qtype/interpreter/ui/404.html +1 -1
- qtype/interpreter/ui/index.html +1 -1
- qtype/interpreter/ui/index.txt +1 -1
- qtype/loader.py +15 -16
- qtype/semantic/generate.py +91 -39
- qtype/semantic/model.py +183 -52
- qtype/semantic/resolver.py +4 -4
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/METADATA +5 -1
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/RECORD +58 -44
- qtype/commons/generate.py +0 -93
- qtype/converters/types.py +0 -66
- qtype/semantic/errors.py +0 -4
- /qtype/{commons → application/commons}/tools.py +0 -0
- /qtype/{commons → application/converters}/__init__.py +0 -0
- /qtype/{converters → application/converters}/tools_from_api.py +0 -0
- /qtype/{converters → interpreter/batch}/__init__.py +0 -0
- /qtype/interpreter/ui/_next/static/{Jb2murBlt2XkN6punrQbE → OT8QJQW3J70VbDWWfrEMT}/_buildManifest.js +0 -0
- /qtype/interpreter/ui/_next/static/{Jb2murBlt2XkN6punrQbE → OT8QJQW3J70VbDWWfrEMT}/_ssgManifest.js +0 -0
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/WHEEL +0 -0
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/entry_points.txt +0 -0
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/licenses/LICENSE +0 -0
- {qtype-0.0.10.dist-info → qtype-0.0.12.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qtype
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: DSL for Generative AI Prototyping
|
|
5
5
|
Author-email: Lou Kratz <lou.kratz+qtype@bazaarvoice.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -17,6 +17,7 @@ Requires-Dist: fsspec>=2025.5.1
|
|
|
17
17
|
Requires-Dist: pydantic-yaml>=1.5.1
|
|
18
18
|
Requires-Dist: mkdocs-awesome-pages-plugin>=2.10.1
|
|
19
19
|
Requires-Dist: mermaid-py>=0.8.0
|
|
20
|
+
Requires-Dist: pip-system-certs>=5.2
|
|
20
21
|
Provides-Extra: interpreter
|
|
21
22
|
Requires-Dist: arize-phoenix-otel>=0.12.1; extra == "interpreter"
|
|
22
23
|
Requires-Dist: boto3>=1.34.0; extra == "interpreter"
|
|
@@ -27,8 +28,11 @@ Requires-Dist: llama-index-llms-bedrock-converse>=0.7.4; extra == "interpreter"
|
|
|
27
28
|
Requires-Dist: llama-index-llms-bedrock>=0.3.8; extra == "interpreter"
|
|
28
29
|
Requires-Dist: llama-index>=0.12.45; extra == "interpreter"
|
|
29
30
|
Requires-Dist: openinference-instrumentation-llama-index>=4.3.4; extra == "interpreter"
|
|
31
|
+
Requires-Dist: pandas>=2.2.3; extra == "interpreter"
|
|
30
32
|
Requires-Dist: psycopg2-binary>=2.9.10; extra == "interpreter"
|
|
33
|
+
Requires-Dist: pyathena[sqlalchemy]>=3.18.0; extra == "interpreter"
|
|
31
34
|
Requires-Dist: python-magic>=0.4.27; extra == "interpreter"
|
|
35
|
+
Requires-Dist: sqlalchemy>=2.0.42; extra == "interpreter"
|
|
32
36
|
Requires-Dist: uvicorn[standard]>=0.35.0; extra == "interpreter"
|
|
33
37
|
Dynamic: license-file
|
|
34
38
|
|
|
@@ -1,60 +1,75 @@
|
|
|
1
1
|
qtype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
qtype/cli.py,sha256=XSVtfzpjTbQBQ60iyb5oupwi-mFpGH5jT8H1bJQdjis,4697
|
|
3
|
-
qtype/loader.py,sha256=
|
|
3
|
+
qtype/loader.py,sha256=5yqD19-ke5iBemeO1XC-o77y8WzNHWh3YKKs2cEY3MU,12782
|
|
4
|
+
qtype/application/__init__.py,sha256=WS3x0b0NRt-nRmj1trsytlvMpQS5KN7Hi6THGfY8bKE,230
|
|
5
|
+
qtype/application/documentation.py,sha256=_ftD344BS7xca6zxjAoiUzTyBrLTtH4iDXUkN4OO4Hs,4992
|
|
6
|
+
qtype/application/facade.py,sha256=GQ05OFs_FL5m-l8wAf05tujwUnoO5ciEX0vGozLlMcI,5660
|
|
7
|
+
qtype/application/commons/__init__.py,sha256=QyWAB2cvimM4DxNo2oBFCGkfBikH-ZeMBMGWmJcq4Uc,135
|
|
8
|
+
qtype/application/commons/tools.py,sha256=pJFY5mPiFErXVFLw2GtiFoWnS8xCNaDVtk-opkoB-zs,5004
|
|
9
|
+
qtype/application/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
qtype/application/converters/tools_from_api.py,sha256=qsycjLGZDnawND8JtK97avAEJcpAm5FGs8nDgePXzbc,774
|
|
11
|
+
qtype/application/converters/tools_from_module.py,sha256=zNyJdgMButHOmgXy0m1OKVPDUhl-4ZaSrSRsQBcSjvA,8017
|
|
12
|
+
qtype/application/converters/types.py,sha256=MNH0WOkY2ijGV17kLZIsp8mcHbfgUgLitpagKSaSYSU,1184
|
|
13
|
+
qtype/base/__init__.py,sha256=4jwcB8cDHzDNF3NBv8WqHNk3sDZDNvUFNjx2CKZ-pyY,283
|
|
14
|
+
qtype/base/exceptions.py,sha256=NR6-p6FnIabFPid9xIUTTeNhCYoIw8sbxEzaWQ11a4o,1155
|
|
15
|
+
qtype/base/logging.py,sha256=eqStjILlmhNryYRqUiyTdDHoUoiLKSY8J0GevvzvTKQ,1075
|
|
16
|
+
qtype/base/types.py,sha256=2kV4xnXYD_D0_xWhZbrrSlwAy14TtTyNuzbX5chqeVg,603
|
|
4
17
|
qtype/commands/__init__.py,sha256=Qo4M07zm5I63r8STxDjvt5fhP1jygdXTsExNGELkefc,257
|
|
5
|
-
qtype/commands/convert.py,sha256=
|
|
6
|
-
qtype/commands/generate.py,sha256=
|
|
7
|
-
qtype/commands/run.py,sha256=
|
|
8
|
-
qtype/commands/serve.py,sha256=
|
|
9
|
-
qtype/commands/validate.py,sha256=
|
|
10
|
-
qtype/commands/visualize.py,sha256=
|
|
11
|
-
qtype/
|
|
12
|
-
qtype/
|
|
13
|
-
qtype/
|
|
14
|
-
qtype/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
qtype/converters/tools_from_api.py,sha256=qsycjLGZDnawND8JtK97avAEJcpAm5FGs8nDgePXzbc,774
|
|
16
|
-
qtype/converters/tools_from_module.py,sha256=WHVhafK2i7p9gPva9-8Efov8v63-abhPxBvF6O9c2mE,7974
|
|
17
|
-
qtype/converters/types.py,sha256=RDK-4IuaY7MFencjC3Fb1N6lECTiUTEddanmAG9dV50,2228
|
|
18
|
-
qtype/dsl/__init__.py,sha256=FJ7T-bOEwfu96Vj5UuwHHTgYL5kGw1qyAk087DwRJFs,35
|
|
19
|
-
qtype/dsl/base_types.py,sha256=Q1ssAb4_ikgvKOt602dzNUC7ZEqyEghXe9N7CuvvxCM,665
|
|
20
|
-
qtype/dsl/custom_types.py,sha256=ycY8xSLcZC5fG0kO5EbrvSMJfNQyE-OFbakAQ3H92Q0,2812
|
|
21
|
-
qtype/dsl/document.py,sha256=X_X7b_xlUU48MWoIF12HOMtecy1hX2b6JERpQgHhvfI,4933
|
|
18
|
+
qtype/commands/convert.py,sha256=ihYftUsnpBYxLZdtRZDV-J0s0pZDEl8EJ6gfEexGTFo,3167
|
|
19
|
+
qtype/commands/generate.py,sha256=783o4trRPGxkav8GfbGoYbycuNt-Ajk0Z5YBUnHBEI4,5677
|
|
20
|
+
qtype/commands/run.py,sha256=XQyuKW1igVU8AJ3vUcqIb0dRjoqdrenHvJ2Cv5j0Vy4,5105
|
|
21
|
+
qtype/commands/serve.py,sha256=KPp6vUOCIACFRkXyA5VwpK32NhrLIv_AxP7_WmqHz0o,2529
|
|
22
|
+
qtype/commands/validate.py,sha256=ERPa8dqfUPJzqHSV8UbDeA9MMjmSZxlfYYFL2gRnpaM,2259
|
|
23
|
+
qtype/commands/visualize.py,sha256=r_HeWeEoADXhMDBAuMcBXBdi8mvcB9pAH5a1YysJsAU,2992
|
|
24
|
+
qtype/dsl/__init__.py,sha256=EolSauOwNTWah8IKBkwikxLIsA0WIekvEkHhfQdnTE0,297
|
|
25
|
+
qtype/dsl/base_types.py,sha256=_Mw-r6TEbXwJeO0nThOiUyEL1S1_Q7Vtk4WWtCzGyNg,907
|
|
26
|
+
qtype/dsl/custom_types.py,sha256=t6odgKHQcLfJsoEqnqChOoqJ0rQrgFpeGPVS9ogMvOI,2920
|
|
22
27
|
qtype/dsl/domain_types.py,sha256=T0fVhdTyTrdtH4oOYvaRb7fstcReiwTQFCFYbDzPeew,1656
|
|
23
|
-
qtype/dsl/model.py,sha256=
|
|
24
|
-
qtype/dsl/validator.py,sha256=
|
|
28
|
+
qtype/dsl/model.py,sha256=xhvTYyuNIerypQ-Dog5ncr80a1-iy7tketLbEtCKvN0,24542
|
|
29
|
+
qtype/dsl/validator.py,sha256=w3JZvBoFBGfmFJhFNYm6knmaY9IKVtPc3HVKcAvjQL8,18213
|
|
25
30
|
qtype/interpreter/__init__.py,sha256=IaRF90JLFbsTLKz9LTOMI_Pz4xwVaEyXPNaXV7sLou8,43
|
|
26
|
-
qtype/interpreter/api.py,sha256=
|
|
27
|
-
qtype/interpreter/conversions.py,sha256=
|
|
31
|
+
qtype/interpreter/api.py,sha256=8yAWFE_Vrue_gfyAA7eohwgdFNBMma2oTgEQYz5UCRU,7576
|
|
32
|
+
qtype/interpreter/conversions.py,sha256=SFkALpQc2qIApYe7ICuQp6eSuB0YLsE9-gJT_B0e2cU,6072
|
|
28
33
|
qtype/interpreter/exceptions.py,sha256=Il8IF0UAtYWQXwvOVQCY-csfRzC1iOejHM1G-nF5EfY,288
|
|
29
34
|
qtype/interpreter/flow.py,sha256=2u1wRahNFQaRRklnU4uW7_UKSD73-uZe_WiYlKitXQg,1233
|
|
30
|
-
qtype/interpreter/resource_cache.py,sha256=
|
|
35
|
+
qtype/interpreter/resource_cache.py,sha256=U7gFQGSzkcCETbBgLJIBWjuDOVvGdGEYhZWntbhSH2A,1072
|
|
31
36
|
qtype/interpreter/step.py,sha256=6rLznFCc8FT0edCbeA7mUYCz8NHhZzTIBpXTxrlG9eE,2084
|
|
32
|
-
qtype/interpreter/streaming_helpers.py,sha256=
|
|
37
|
+
qtype/interpreter/streaming_helpers.py,sha256=RlYFAwEFaczC5DGM60KAMZMgGOUgNyopY-CyNFkZybQ,4448
|
|
33
38
|
qtype/interpreter/telemetry.py,sha256=p1nmup-V_TBM64giYySewpjJOF5_FZgK_KTE5ad38Uk,632
|
|
34
|
-
qtype/interpreter/typing.py,sha256=
|
|
39
|
+
qtype/interpreter/typing.py,sha256=HlEGsum7DSTgfNlsjWEb0RFM3EgaI_otBpUqwovTiyo,4687
|
|
40
|
+
qtype/interpreter/auth/__init__.py,sha256=L98AxaSizb6LMdXEr8FGe9MBtPBnfCeWxjI0oi7sg_o,62
|
|
41
|
+
qtype/interpreter/auth/aws.py,sha256=rNCf0njllNxIQwsl9_oZIDrYJ2Z-udICtCmT08GCD3o,7681
|
|
42
|
+
qtype/interpreter/auth/cache.py,sha256=uVyJ_jkbprRdlvbnm1DVIaYyTDLEsPXvi3xjuRneH2k,1825
|
|
43
|
+
qtype/interpreter/auth/generic.py,sha256=UFVbyX8kuqKqm_9ZtiHub8YZbwwnoOye6ln7ddY_jIE,3326
|
|
44
|
+
qtype/interpreter/batch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
+
qtype/interpreter/batch/flow.py,sha256=MzlZcqygOP3I-vQj9ESDKkko39zoSY-POIRhJ6gheAg,3118
|
|
46
|
+
qtype/interpreter/batch/sql_source.py,sha256=8Nu2TwSvKA8uSlQE9PEtehaTwuhM2Nk595h1eUGPrnc,3241
|
|
47
|
+
qtype/interpreter/batch/step.py,sha256=PLfIRxTahVHmgIVG10mDmr7MGU2M2A-zEq53mxaLJJ8,1907
|
|
48
|
+
qtype/interpreter/batch/types.py,sha256=3EMzsaFrEtcY2FFvMHvbRm54n34EMoe-mtJV68LAkKg,1098
|
|
49
|
+
qtype/interpreter/batch/utils.py,sha256=Q_AptPjy8e-B9d6ML9We9wuLG-fS5LgVCM3HgmNDRDA,6038
|
|
35
50
|
qtype/interpreter/chat/chat_api.py,sha256=-YAIyVATRbHR3sCqH-iOwsR73sv6UnVCHZXzVWlkSNA,9042
|
|
36
51
|
qtype/interpreter/chat/file_conversions.py,sha256=7_XWDFQwWVoYgA-mY4EknhOJrMKeybDzqA3VBJM5Psw,1751
|
|
37
52
|
qtype/interpreter/chat/vercel.py,sha256=yKjFFk2wXDbtvaDTXlES9d9mvLVPXu-g_iXDjKfOlIM,7261
|
|
38
53
|
qtype/interpreter/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
54
|
qtype/interpreter/steps/agent.py,sha256=Yg56YjTlrwc4oJ-f7ZBazF4ii2oJX8zMhETHF0-ArAU,4008
|
|
40
55
|
qtype/interpreter/steps/condition.py,sha256=E86aRWQpjz18QuKwcGyoIPoOKAvTDZgnpg9qXw6xYas,1128
|
|
41
|
-
qtype/interpreter/steps/decoder.py,sha256=
|
|
42
|
-
qtype/interpreter/steps/llm_inference.py,sha256=
|
|
43
|
-
qtype/interpreter/steps/prompt_template.py,sha256=
|
|
56
|
+
qtype/interpreter/steps/decoder.py,sha256=toKiZHpM3_y6imV8xQXmAOvGGFhqJzXaWlM1HLIyOzw,2993
|
|
57
|
+
qtype/interpreter/steps/llm_inference.py,sha256=k7OD40QT95AfjMjAk-5nxCjYCnDe4RdNgIV0Cqn5R8A,5419
|
|
58
|
+
qtype/interpreter/steps/prompt_template.py,sha256=tK1j6DTUMvlDMcJZDGQ2lLgwq_LkaICIq0U5u-QK_WU,1597
|
|
44
59
|
qtype/interpreter/steps/search.py,sha256=wyVFwg5wVXytsm2JyNPwkuBAWpxEunP-dAiqhDZyii4,660
|
|
45
60
|
qtype/interpreter/steps/tool.py,sha256=zAL9us_KRrcaw_sktD1z2pm0Z2W9ruMd3rrjqk7TI_k,1996
|
|
46
|
-
qtype/interpreter/ui/404.html,sha256=
|
|
61
|
+
qtype/interpreter/ui/404.html,sha256=K5zBsOVZB0Lh7R4BogHR_h4NU4sbBSP97ZL5dwlWiM0,6869
|
|
47
62
|
qtype/interpreter/ui/favicon.ico,sha256=K4rS0zRVqPc2_DqOv48L3qiEitTA20iigzvQ-c13WTI,25931
|
|
48
63
|
qtype/interpreter/ui/file.svg,sha256=K2eBLDJcGZoCU2zb7qDFk6cvcH0yO3LuPgjbqwZ1O9Q,391
|
|
49
64
|
qtype/interpreter/ui/globe.svg,sha256=thS5vxg5JZV2YayFFJj-HYAp_UOmL7_thvniYkpX588,1035
|
|
50
|
-
qtype/interpreter/ui/index.html,sha256=
|
|
51
|
-
qtype/interpreter/ui/index.txt,sha256=
|
|
65
|
+
qtype/interpreter/ui/index.html,sha256=7VzTqVFXjI3NKv4wMtwUGMcDOMJxBevJ9d7XQpzcGbU,6391
|
|
66
|
+
qtype/interpreter/ui/index.txt,sha256=Hs_t7FgIDjYIrtDdhY4tUmwwjRtCk9FAG07S-FmafP8,3611
|
|
52
67
|
qtype/interpreter/ui/next.svg,sha256=VZld-tbstJRaHoVt3KA8XhaqW_E_0htN9qdK55NXvPw,1375
|
|
53
68
|
qtype/interpreter/ui/vercel.svg,sha256=8IEzey_uY1tFW2MnVAaj5_OdagFOJa2Q2rWmfmKhKsQ,128
|
|
54
69
|
qtype/interpreter/ui/window.svg,sha256=ZEdoxKrrR2e84pM0TusMEl-4BKlNgBRAQkByIC2F46E,385
|
|
55
|
-
qtype/interpreter/ui/404/index.html,sha256=
|
|
56
|
-
qtype/interpreter/ui/_next/static/
|
|
57
|
-
qtype/interpreter/ui/_next/static/
|
|
70
|
+
qtype/interpreter/ui/404/index.html,sha256=K5zBsOVZB0Lh7R4BogHR_h4NU4sbBSP97ZL5dwlWiM0,6869
|
|
71
|
+
qtype/interpreter/ui/_next/static/OT8QJQW3J70VbDWWfrEMT/_buildManifest.js,sha256=j1u6BhF-PCQQBDiSp0UbEYyjZ1-hjTIIosO4Tx9e3KI,544
|
|
72
|
+
qtype/interpreter/ui/_next/static/OT8QJQW3J70VbDWWfrEMT/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
|
58
73
|
qtype/interpreter/ui/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js,sha256=LZF4GSB27wWEGfcZ8svgftIhKsR-dbSEPQOMFE1UMZk,172729
|
|
59
74
|
qtype/interpreter/ui/_next/static/chunks/736-7fc606e244fedcb1.js,sha256=yNH_WyfbOoWw0NRsePJlqmHvPCmDN3w2244GCXmOfVc,337788
|
|
60
75
|
qtype/interpreter/ui/_next/static/chunks/964-ed4ab073db645007.js,sha256=v5dtcpE2ZECkVNy0i9L7x835eE3qyfQ3yUQ95r1dTb8,166060
|
|
@@ -78,14 +93,13 @@ qtype/interpreter/ui/_next/static/media/9610d9e46709d722-s.woff2,sha256=N08hXnJf
|
|
|
78
93
|
qtype/interpreter/ui/_next/static/media/ba015fad6dcf6784-s.woff2,sha256=92BKU6ACUPZttLR91EMnzipD9u3shQ1SF7uAI4gZ790,15292
|
|
79
94
|
qtype/semantic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
95
|
qtype/semantic/base_types.py,sha256=wfUlT0gV3_Mk1xLLI64SSXCB9GFmn29yz5adTaHrsOI,1540
|
|
81
|
-
qtype/semantic/
|
|
82
|
-
qtype/semantic/
|
|
83
|
-
qtype/semantic/
|
|
84
|
-
qtype/semantic/resolver.py,sha256=D3CmRmr_ACL54ZCbc9HxXCuCZ37bNtSzlPLMpOeeOcw,3439
|
|
96
|
+
qtype/semantic/generate.py,sha256=4xYDSz7sJG-py4MqLP1ePZjm5uwvAmOxsNRfF1NZFWY,15369
|
|
97
|
+
qtype/semantic/model.py,sha256=pFFUuLgKIKac9-vgPkv3m9wL5hjaGGuNrcUptnKgt3o,15256
|
|
98
|
+
qtype/semantic/resolver.py,sha256=rhePhY1m4h-qYZucIcBcu0DMocjlOs5OVSbhR5HZ2xo,3404
|
|
85
99
|
qtype/semantic/visualize.py,sha256=8eHKgiPOqbJIEd7LUQ1PiSO0RF6GUrnBQue9tV6EbMU,16924
|
|
86
|
-
qtype-0.0.
|
|
87
|
-
qtype-0.0.
|
|
88
|
-
qtype-0.0.
|
|
89
|
-
qtype-0.0.
|
|
90
|
-
qtype-0.0.
|
|
91
|
-
qtype-0.0.
|
|
100
|
+
qtype-0.0.12.dist-info/licenses/LICENSE,sha256=1KA5EgYBSR0O6nCH2HEvk6Di53YKJ9r_VCR7G8G8qAY,11341
|
|
101
|
+
qtype-0.0.12.dist-info/METADATA,sha256=o4iYQxFZQyK9By7ozLQJx8ZVmlL_1Pez4ilCbrfLAq8,4589
|
|
102
|
+
qtype-0.0.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
103
|
+
qtype-0.0.12.dist-info/entry_points.txt,sha256=5y4vj8RLvgl2tXSj-Hm7v5-Tn3kP4-UonjNoN-mfaQE,41
|
|
104
|
+
qtype-0.0.12.dist-info/top_level.txt,sha256=ONroH5B0mZ51jr7NSWCK0weFwwCO7wBLmyVS1YqNU14,6
|
|
105
|
+
qtype-0.0.12.dist-info/RECORD,,
|
qtype/commons/generate.py
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import argparse
|
|
2
|
-
import logging
|
|
3
|
-
|
|
4
|
-
from pydantic import BaseModel
|
|
5
|
-
from pydantic_yaml import to_yaml_str
|
|
6
|
-
|
|
7
|
-
from qtype.converters.tools_from_module import tools_from_module
|
|
8
|
-
from qtype.dsl.model import Application, Model, ModelList
|
|
9
|
-
|
|
10
|
-
logger = logging.getLogger(__name__)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _write_yaml_file(data: BaseModel, output_path: str) -> None:
|
|
14
|
-
"""
|
|
15
|
-
Write a Pydantic model to a YAML file.
|
|
16
|
-
|
|
17
|
-
Args:
|
|
18
|
-
data: The Pydantic model instance to write.
|
|
19
|
-
output_path: The path where the YAML file will be saved.
|
|
20
|
-
"""
|
|
21
|
-
result = to_yaml_str(data, exclude_unset=True, exclude_none=True)
|
|
22
|
-
with open(output_path, "w") as f:
|
|
23
|
-
f.write(result)
|
|
24
|
-
logger.info(f"Data exported to {output_path}")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def dump_built_in_tools(args: argparse.Namespace) -> None:
|
|
28
|
-
tools, types = tools_from_module("qtype.commons.tools")
|
|
29
|
-
if not tools:
|
|
30
|
-
logger.error("No tools found in the commons library.")
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
doc = Application(
|
|
34
|
-
id="qtype-common-tools",
|
|
35
|
-
description="Common Tools for QType",
|
|
36
|
-
tools=list(tools),
|
|
37
|
-
types=types,
|
|
38
|
-
)
|
|
39
|
-
output_path = f"{args.prefix}/tools.qtype.yaml"
|
|
40
|
-
_write_yaml_file(doc, output_path)
|
|
41
|
-
logging.info(f"Built-in tools exported to {output_path}")
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def dump_aws_bedrock_models(args: argparse.Namespace) -> None:
|
|
45
|
-
"""
|
|
46
|
-
Export AWS Bedrock models to a YAML file.
|
|
47
|
-
|
|
48
|
-
Args:
|
|
49
|
-
args: Command line arguments containing the output prefix.
|
|
50
|
-
"""
|
|
51
|
-
try:
|
|
52
|
-
import boto3
|
|
53
|
-
|
|
54
|
-
client = boto3.client("bedrock")
|
|
55
|
-
models = client.list_foundation_models()
|
|
56
|
-
|
|
57
|
-
# generate a model list from the AWS Bedrock models
|
|
58
|
-
# the return type of list_foundation_models is
|
|
59
|
-
|
|
60
|
-
model_list = ModelList(
|
|
61
|
-
[
|
|
62
|
-
Model(
|
|
63
|
-
id=model_summary["modelId"],
|
|
64
|
-
provider="aws-bedrock",
|
|
65
|
-
)
|
|
66
|
-
for model_summary in models.get("modelSummaries", [])
|
|
67
|
-
]
|
|
68
|
-
)
|
|
69
|
-
output_path = f"{args.prefix}/aws.bedrock.models.qtype.yaml"
|
|
70
|
-
_write_yaml_file(model_list, output_path)
|
|
71
|
-
logging.info(f"AWS Bedrock Models exported to {output_path}")
|
|
72
|
-
|
|
73
|
-
logger.info("Exporting AWS Bedrock models...")
|
|
74
|
-
# Placeholder for actual implementation
|
|
75
|
-
# This function should gather AWS Bedrock models and export them similarly to dump_built_in_tools
|
|
76
|
-
logger.info("AWS Bedrock models exported successfully.")
|
|
77
|
-
except ImportError:
|
|
78
|
-
logger.error(
|
|
79
|
-
"boto3 is not installed. Please install it to use AWS Bedrock model export."
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def dump_commons_library(args: argparse.Namespace) -> None:
|
|
84
|
-
"""
|
|
85
|
-
Export the commons library tools to a YAML file.
|
|
86
|
-
|
|
87
|
-
Args:
|
|
88
|
-
args: Command line arguments containing the output prefix.
|
|
89
|
-
"""
|
|
90
|
-
logger.info("Exporting commons library tools...")
|
|
91
|
-
dump_built_in_tools(args)
|
|
92
|
-
dump_aws_bedrock_models(args)
|
|
93
|
-
logger.info("Commons library tools export complete.")
|
qtype/converters/types.py
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
from datetime import date, datetime, time
|
|
2
|
-
|
|
3
|
-
from qtype.dsl.base_types import PrimitiveTypeEnum
|
|
4
|
-
|
|
5
|
-
"""
|
|
6
|
-
Mapping of QType primitive types to Python types for internal representations.
|
|
7
|
-
"""
|
|
8
|
-
PRIMITIVE_TO_PYTHON_TYPE = {
|
|
9
|
-
PrimitiveTypeEnum.audio: bytes,
|
|
10
|
-
PrimitiveTypeEnum.boolean: bool,
|
|
11
|
-
PrimitiveTypeEnum.bytes: bytes,
|
|
12
|
-
PrimitiveTypeEnum.date: str, # Use str for date representation
|
|
13
|
-
PrimitiveTypeEnum.datetime: str, # Use str for datetime representation
|
|
14
|
-
PrimitiveTypeEnum.int: int,
|
|
15
|
-
PrimitiveTypeEnum.file: bytes, # Use bytes for file content
|
|
16
|
-
PrimitiveTypeEnum.float: float,
|
|
17
|
-
PrimitiveTypeEnum.image: bytes, # Use bytes for image data
|
|
18
|
-
PrimitiveTypeEnum.text: str,
|
|
19
|
-
PrimitiveTypeEnum.time: str, # Use str for time representation
|
|
20
|
-
PrimitiveTypeEnum.video: bytes, # Use bytes for video data
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
PYTHON_TYPE_TO_PRIMITIVE_TYPE = {
|
|
24
|
-
bytes: PrimitiveTypeEnum.file,
|
|
25
|
-
bool: PrimitiveTypeEnum.boolean,
|
|
26
|
-
str: PrimitiveTypeEnum.text,
|
|
27
|
-
int: PrimitiveTypeEnum.int,
|
|
28
|
-
float: PrimitiveTypeEnum.float,
|
|
29
|
-
date: PrimitiveTypeEnum.date,
|
|
30
|
-
datetime: PrimitiveTypeEnum.datetime,
|
|
31
|
-
time: PrimitiveTypeEnum.time,
|
|
32
|
-
# TODO: decide on internal representation for images, video, and audio, or use annotation/hinting
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
# def create_custom_type(model_cls: Type[BaseModel],) -> CustomType:
|
|
36
|
-
# """
|
|
37
|
-
# Create a CustomType from a Pydantic BaseModel.
|
|
38
|
-
|
|
39
|
-
# Args:
|
|
40
|
-
# type: The Pydantic BaseModel class.
|
|
41
|
-
|
|
42
|
-
# Returns:
|
|
43
|
-
# A CustomType instance representing the model.
|
|
44
|
-
# """
|
|
45
|
-
|
|
46
|
-
# properties = {}
|
|
47
|
-
# for field_name, field_info in model_cls.model_fields.items():
|
|
48
|
-
# # Use the annotation (the type hint) for the field
|
|
49
|
-
# field_type = field_info.annotation
|
|
50
|
-
# if field_type is None:
|
|
51
|
-
# raise TypeError(
|
|
52
|
-
# f"Field '{field_name}' in '{model_name}' must have a type hint."
|
|
53
|
-
# )
|
|
54
|
-
# origin = get_origin(field_type)
|
|
55
|
-
|
|
56
|
-
# if origin is Union:
|
|
57
|
-
# # Assume the union means it's optional
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# return CustomType(
|
|
61
|
-
# id=type.__name__,
|
|
62
|
-
# properties={
|
|
63
|
-
# name: python_type_to_variable_type(field.type_)
|
|
64
|
-
# for name, field in type.__fields__.items()
|
|
65
|
-
# },
|
|
66
|
-
# )
|
qtype/semantic/errors.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/qtype/interpreter/ui/_next/static/{Jb2murBlt2XkN6punrQbE → OT8QJQW3J70VbDWWfrEMT}/_buildManifest.js
RENAMED
|
File without changes
|
/qtype/interpreter/ui/_next/static/{Jb2murBlt2XkN6punrQbE → OT8QJQW3J70VbDWWfrEMT}/_ssgManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|