arize-phoenix 7.0.1__py3-none-any.whl → 7.1.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.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

Files changed (28) hide show
  1. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/METADATA +2 -2
  2. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/RECORD +27 -27
  3. phoenix/server/api/auth.py +12 -0
  4. phoenix/server/api/context.py +1 -0
  5. phoenix/server/api/helpers/playground_clients.py +1 -0
  6. phoenix/server/api/mutations/api_key_mutations.py +3 -3
  7. phoenix/server/api/mutations/chat_mutations.py +3 -3
  8. phoenix/server/api/mutations/dataset_mutations.py +8 -8
  9. phoenix/server/api/mutations/span_annotations_mutations.py +3 -3
  10. phoenix/server/api/mutations/trace_annotations_mutations.py +3 -3
  11. phoenix/server/api/mutations/user_mutations.py +5 -5
  12. phoenix/server/api/subscriptions.py +3 -3
  13. phoenix/server/api/types/Trace.py +13 -0
  14. phoenix/server/static/.vite/manifest.json +36 -36
  15. phoenix/server/static/assets/{components-DKH6AzJw.js → components-DaxEPah8.js} +206 -117
  16. phoenix/server/static/assets/{index-DLV87qiO.js → index-DxfKd3lv.js} +2 -2
  17. phoenix/server/static/assets/{pages-CVY3Nv4Z.js → pages-CY7Swxhi.js} +292 -291
  18. phoenix/server/static/assets/vendor-DwOx_a-2.js +894 -0
  19. phoenix/server/static/assets/{vendor-arizeai-Buo4e1A6.js → vendor-arizeai-BWSsCZNG.js} +1 -1
  20. phoenix/server/static/assets/{vendor-codemirror-BuAQiUVf.js → vendor-codemirror-WrxmCiOZ.js} +1 -1
  21. phoenix/server/static/assets/{vendor-recharts-Cl9dK5tC.js → vendor-recharts-Bj7q9ORc.js} +1 -1
  22. phoenix/server/static/assets/{vendor-shiki-CazYUixL.js → vendor-shiki-RnWcZtzE.js} +1 -1
  23. phoenix/version.py +1 -1
  24. phoenix/server/static/assets/vendor-Cb3zlNNd.js +0 -894
  25. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/WHEEL +0 -0
  26. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/entry_points.txt +0 -0
  27. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/licenses/IP_NOTICE +0 -0
  28. {arize_phoenix-7.0.1.dist-info → arize_phoenix-7.1.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 7.0.1
3
+ Version: 7.1.0
4
4
  Summary: AI Observability and Evaluation
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -198,7 +198,7 @@ Phoenix container images are available via [Docker Hub](https://hub.docker.com/r
198
198
  | [Self-Hosting](https://docs.arize.com/phoenix/deployment) | ✅ |
199
199
  | Jupyter Notebooks | ✅ |
200
200
  | [Prompt Playground](https://docs.arize.com/phoenix/prompt-engineering/overview-prompts) | ✅ |
201
- | [Sessions](https://github.com/Arize-ai/phoenix/issues/2619) | In Progress 🚧 |
201
+ | [Sessions](https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-sessions) | |
202
202
  | Prompt Management | Coming soon ⏱️ |
203
203
 
204
204
  ## Tracing Integrations
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
6
6
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
7
  phoenix/services.py,sha256=kpW1WL0kiB8XJsO6XycvZVJ-lBkNoenhQ7atCvBoSe8,5365
8
8
  phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
9
- phoenix/version.py,sha256=co6LyaBArt-ahHXYZSdSER8TFZ2vVTb86CNG6X8Pxwc,22
9
+ phoenix/version.py,sha256=vrQk6cOG_uk0gOqN4qh7NRCxezXfvhv9tT7bwYHyTck,22
10
10
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
12
12
  phoenix/core/model.py,sha256=qBFraOtmwCCnWJltKNP18DDG0mULXigytlFsa6YOz6k,4837
@@ -91,13 +91,13 @@ phoenix/server/thread_server.py,sha256=Ea2AWreN1lwJsT2wYvGaRaiXrzBqH4kgkZpx0FO5O
91
91
  phoenix/server/types.py,sha256=Ur73LKRB3VlvBDN95gKJoDIdmauuR-r1rpO1rNHm9kA,7209
92
92
  phoenix/server/api/README.md,sha256=Pyq1PLPgTzXAswrfIhGXrjI3Skq8it2jTVnanT6Ba4Q,1162
93
93
  phoenix/server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
- phoenix/server/api/auth.py,sha256=OhWmv_Hl-K-yhJeUWXKRYYiUOIPo-rYSQXdm4fjeTJ8,901
95
- phoenix/server/api/context.py,sha256=oTSBervsrFYeKsln37Mc_fgBD5y5TktYdNVPZSzTJlU,5952
94
+ phoenix/server/api/auth.py,sha256=nywpmfMI1trZTbZRD3oBj4kFjzg_vnxDljcM431T1eY,1246
95
+ phoenix/server/api/context.py,sha256=5ecxcabdPnLovM5KCjcXLI1Km-HpzlQpnclG2JR5uTg,5977
96
96
  phoenix/server/api/exceptions.py,sha256=TA0JuY2YRnj35qGuMSQ8d0ToHum9gWm9W--3fSKHrX0,1171
97
97
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
98
98
  phoenix/server/api/queries.py,sha256=zRngYE72hxaeAg_1vsnSLwmqs_FSHrRNjQwi632_D-Y,27670
99
99
  phoenix/server/api/schema.py,sha256=tHyw2jTbue_-gu0fe9Sw7LUYtzJUCwp9SvccDgOkNPw,1696
100
- phoenix/server/api/subscriptions.py,sha256=NJXCWrbBERyTwmi3H_9jNpml4klIxs_kpynwXRoH9pc,23572
100
+ phoenix/server/api/subscriptions.py,sha256=vN5KI4K28N3PN621Fcy_ksnx_C80VxOCWgFqp7j96_E,23602
101
101
  phoenix/server/api/utils.py,sha256=quCBRcusc6PUq9tJq7M8PgwFZp7nXgVAxtbw8feribY,833
102
102
  phoenix/server/api/dataloaders/__init__.py,sha256=nt5Lbs34q05GSvNCT2IGrkRW0kg65L8h3bZelzgpkYg,3909
103
103
  phoenix/server/api/dataloaders/annotation_summaries.py,sha256=2sHmIDX7n8tuPeBTs9bMKtlMKWn_Ph9awTZqmwn2Owc,5505
@@ -134,7 +134,7 @@ phoenix/server/api/dataloaders/cache/__init__.py,sha256=SYoOM9n8FJaMdQarma5d1blu
134
134
  phoenix/server/api/dataloaders/cache/two_tier_cache.py,sha256=cmo8FUT3E91R139IEzh4yCga-6nTamc5KPXAfMrzNDM,2315
135
135
  phoenix/server/api/helpers/__init__.py,sha256=m2-xaSPqUiSs91k62JaRDjFNfl-1byxBfY-m_Vxw16U,272
136
136
  phoenix/server/api/helpers/dataset_helpers.py,sha256=AMlKY9_e0wnTrTSSQemM5NHfnpwARSytx-m9YK6f6bY,8421
137
- phoenix/server/api/helpers/playground_clients.py,sha256=zgpYRn7c8Yi6-0ZW7miKTDKnKor9nq4U40-mjgtqIGY,36164
137
+ phoenix/server/api/helpers/playground_clients.py,sha256=nmbmP2bO_u-dhfOG8Cd58FYwkCCTPEtRgICZHcjpUKs,36196
138
138
  phoenix/server/api/helpers/playground_registry.py,sha256=CPLMziFB2wmr-dfbx7VbzO2f8YIG_k5RftzvGXYGQ1w,2570
139
139
  phoenix/server/api/helpers/playground_spans.py,sha256=qGk7V7IZK7EkRE1mvZyROpLN5kgOahOZifFzUWmqYFc,16546
140
140
  phoenix/server/api/input_types/AddExamplesToDatasetInput.py,sha256=mIQz0S_z8YdrktKIY6RCvtNJ2yZF9pYvTGgasUsI-54,430
@@ -173,15 +173,15 @@ phoenix/server/api/input_types/TraceAnnotationSort.py,sha256=BzwiUnMh2VsgQYnhDlb
173
173
  phoenix/server/api/input_types/UserRoleInput.py,sha256=xxhFe0ITZOgRVEJbVem_W6F1Ip_H6xDENdQqMMx-kKE,129
174
174
  phoenix/server/api/input_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
175
175
  phoenix/server/api/mutations/__init__.py,sha256=1wClieLNA3_Tin4Ah67rkrQvwSSZAdPU0EPsRiUxyAA,1103
176
- phoenix/server/api/mutations/api_key_mutations.py,sha256=OmPipsmlQIb6DKvAgO58mZUwkYJihlJB2N4lTyeUlAA,6164
177
- phoenix/server/api/mutations/chat_mutations.py,sha256=X8Rq0_gBYX_Ey2U9EIuWuOt2JeTVAvnD69gY4NHrOQo,23039
178
- phoenix/server/api/mutations/dataset_mutations.py,sha256=OkVek-GtDf_1eloI7Sdz6W6l5FFmwU_41LJM8-fw3q4,26088
176
+ phoenix/server/api/mutations/api_key_mutations.py,sha256=diNBL06zrFCmzR-leYbL-AxDqN05-YtbzsnsAdew_K8,6194
177
+ phoenix/server/api/mutations/chat_mutations.py,sha256=FM5Dfdrc4N_1juL8yWKk3TVGo3qaLxfajKjxqm0MIgs,23069
178
+ phoenix/server/api/mutations/dataset_mutations.py,sha256=rOcdWUL4pwjOo6Y7NrrKnpRaEbEaamEVlS5sc-NOw3U,26168
179
179
  phoenix/server/api/mutations/experiment_mutations.py,sha256=p3CoLAa8nFPa3D759Y2A7De_PVJNGOL98mA3HoZBrRQ,3188
180
180
  phoenix/server/api/mutations/export_events_mutations.py,sha256=xoDnVWC7eA_8wNQP0-oyiHojyUZ0EhVVSrsAnztetC0,3993
181
181
  phoenix/server/api/mutations/project_mutations.py,sha256=u7kLvJbBFR418F9lMamiisZerF18E8h5wGKV4sDTF-g,2674
182
- phoenix/server/api/mutations/span_annotations_mutations.py,sha256=kvIOUjHRA6wNMh-bLe5B6bRszMw77HyFp3bxHTOL3yU,5940
183
- phoenix/server/api/mutations/trace_annotations_mutations.py,sha256=qwTnYt6A5BwXC7sn_TT0f2A2PO7M26C22aYMnA3MpYk,5915
184
- phoenix/server/api/mutations/user_mutations.py,sha256=YWgg1t5P0XVdxOMrhWpRqsCWi8NQR2zxerzuITC-UrY,13311
182
+ phoenix/server/api/mutations/span_annotations_mutations.py,sha256=sumBLUqRKlgMASWdWwYItmIJ2l7AyAp_PlIYeXYfguc,5970
183
+ phoenix/server/api/mutations/trace_annotations_mutations.py,sha256=sEcEt8hbMt8YMiRX5o3xcJ5rWWZbDeBPMNz2teZoi3U,5945
184
+ phoenix/server/api/mutations/user_mutations.py,sha256=vsTx1tZ7OxoOYte7nVqILymXwO85Cgt0QOIdRGOUJao,13361
185
185
  phoenix/server/api/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
186
186
  phoenix/server/api/openapi/main.py,sha256=yKdzJYI4cxy_1mFcK4_7YObIcuRviBIfwNjB23RG14k,461
187
187
  phoenix/server/api/openapi/schema.py,sha256=S1nPq4iR578fPESWDAHNv9nlgh_go6zwTalLkshoSKo,484
@@ -259,7 +259,7 @@ phoenix/server/api/types/SystemApiKey.py,sha256=2ym8EgsTBIvxx1l9xZ-2YMovz58ZwYb_
259
259
  phoenix/server/api/types/TemplateLanguage.py,sha256=6j_0uwO_GZIeCpR7sTOnxySXudT7qBSC6LFsjzbvW1o,160
260
260
  phoenix/server/api/types/TimeSeries.py,sha256=IIeGVRFdSMozYXxPg736DW_mKvj4-3WjYSYEnn4UEJc,5241
261
261
  phoenix/server/api/types/TokenUsage.py,sha256=g-PjAGVigpchQgkXAuC5sc53fn2YwAgfeXkGmFPi_TE,201
262
- phoenix/server/api/types/Trace.py,sha256=PG07x8h1VjYNkE40EK2SJHMW1TRWBoguJS6vPjmJOy8,5217
262
+ phoenix/server/api/types/Trace.py,sha256=Nwof2FlcZtCFnKTS5UqvNZBlY-VcN5QMK7Zm9xEQUrU,5597
263
263
  phoenix/server/api/types/TraceAnnotation.py,sha256=OW6A2zr1gomOuG0XQe55dk15XXX2DSM0DzatRbHWH5A,1256
264
264
  phoenix/server/api/types/UMAPPoints.py,sha256=49sWnxjcAJKRzqUY71Fa0tOPti5XjIIFT5cSg6oNu_U,1650
265
265
  phoenix/server/api/types/User.py,sha256=iTVUrI8U6-asOhBt1bOZNtoRAaRNC4WHgR1Uv2rHnWQ,1975
@@ -286,16 +286,16 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
286
286
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
287
287
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
288
288
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
289
- phoenix/server/static/.vite/manifest.json,sha256=H-INZnWsmbWImSRNUMxk97n_Gp3Q7kUXeNZme12yLPM,2163
290
- phoenix/server/static/assets/components-DKH6AzJw.js,sha256=RWkQPJgVGgZqEzBaCuKcxc19e24pfbjaEjwWdxbrkSY,316783
291
- phoenix/server/static/assets/index-DLV87qiO.js,sha256=F-cdG02QreiLbNUM0Vcp1PTBfjyaHH2XXzHamQ6syQY,8033
292
- phoenix/server/static/assets/pages-CVY3Nv4Z.js,sha256=QzdU8hUVKqys5cST3gmMy0bNjShoKGbL6btLMoT3cnc,669246
293
- phoenix/server/static/assets/vendor-Cb3zlNNd.js,sha256=4yHqkg-jnECjHY3bA_-aYIK8paH4j0vY5Vx0qkaW_OU,2061939
289
+ phoenix/server/static/.vite/manifest.json,sha256=dASJhLUwLkOKmaGUwiuHdmiMH_GZkrPQhERmV6OvJ2s,2163
290
+ phoenix/server/static/assets/components-DaxEPah8.js,sha256=GV3Mea9qXl18_S--F0Zw4BgnPlyyfdXV-657356jt8w,320171
291
+ phoenix/server/static/assets/index-DxfKd3lv.js,sha256=5uRq90XqUQyaxUlYkWeR04VNEOXhgccy2mtLfQoBmTY,8033
292
+ phoenix/server/static/assets/pages-CY7Swxhi.js,sha256=9XaSLhbNNnfK1EOek9kINb6DCl2iHI97W4t2NN_tc1A,670374
293
+ phoenix/server/static/assets/vendor-DwOx_a-2.js,sha256=BSQT2H6j3XW9U4TYNJ_dAQvroHbfRpHbfIuOoAQW_V0,2168792
294
294
  phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
295
- phoenix/server/static/assets/vendor-arizeai-Buo4e1A6.js,sha256=gDkYYjDuuj7Qt18ZzrQriCjh3pLiqQjyzdYPcrRnmLs,308489
296
- phoenix/server/static/assets/vendor-codemirror-BuAQiUVf.js,sha256=BwKGD-l2CFA_RJ6J908ykmJkbYR4STxh9Cq3VnIoitg,392748
297
- phoenix/server/static/assets/vendor-recharts-Cl9dK5tC.js,sha256=02BDRWrMBNjAqY68qazFHrrSIxR_0r1rSlcJChH-ZrU,282859
298
- phoenix/server/static/assets/vendor-shiki-CazYUixL.js,sha256=yo1zcws-X4sfuIlakSqCUAqp-ohj0OfjXdZC9nzu9oE,8980328
295
+ phoenix/server/static/assets/vendor-arizeai-BWSsCZNG.js,sha256=7aYt8L3aEr48jfoP4GLHy68Dq9uukkRxKnTB3fauZ_4,308489
296
+ phoenix/server/static/assets/vendor-codemirror-WrxmCiOZ.js,sha256=4mM58jCukFBKrqrCTl2QZ-apJv4wTQQVusWOxdNAyfA,392748
297
+ phoenix/server/static/assets/vendor-recharts-Bj7q9ORc.js,sha256=U0I8gAmVnd3X5EE1ye5-yaNSaYKmerpICbo1-oXlxa8,282859
298
+ phoenix/server/static/assets/vendor-shiki-RnWcZtzE.js,sha256=payARpCB4810gC7J5exnbQWbipfhNtukzQfszI8r2fw,8980328
299
299
  phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
300
300
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
301
301
  phoenix/server/templates/index.html,sha256=ram6sfy2obf_F053ay35V30v-mnRWZ86rK-PstXLy1c,4457
@@ -336,9 +336,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
336
336
  phoenix/utilities/re.py,sha256=x8Xbk-Wa6qDMAtUd_7JtZvKtrYEuMY-bchB0n163_5c,2006
337
337
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
338
338
  phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
339
- arize_phoenix-7.0.1.dist-info/METADATA,sha256=hjT57ZoWEIyhlMrkso_BQfZBbJxZYifA0mVAOOqF2Mg,23173
340
- arize_phoenix-7.0.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
341
- arize_phoenix-7.0.1.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
342
- arize_phoenix-7.0.1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
343
- arize_phoenix-7.0.1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
344
- arize_phoenix-7.0.1.dist-info/RECORD,,
339
+ arize_phoenix-7.1.0.dist-info/METADATA,sha256=W-mKXcqjxH5YgxMnSikUtwUsz_DbidfGqS35ldPSqUk,23172
340
+ arize_phoenix-7.1.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
341
+ arize_phoenix-7.1.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
342
+ arize_phoenix-7.1.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
343
+ arize_phoenix-7.1.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
344
+ arize_phoenix-7.1.0.dist-info/RECORD,,
@@ -20,6 +20,18 @@ class IsNotReadOnly(Authorization):
20
20
  return not info.context.read_only
21
21
 
22
22
 
23
+ class IsLocked(Authorization):
24
+ """
25
+ Disables mutations and subscriptions that create or update data but allows
26
+ queries and delete mutations.
27
+ """
28
+
29
+ message = "Operations that write or modify data are locked"
30
+
31
+ def has_permission(self, source: Any, info: Info, **kwargs: Any) -> bool:
32
+ return not info.context.locked
33
+
34
+
23
35
  MSG_ADMIN_ONLY = "Only admin can perform this action"
24
36
 
25
37
 
@@ -108,6 +108,7 @@ class Context(BaseContext):
108
108
  event_queue: CanPutItem[DmlEvent] = _NoOp()
109
109
  corpus: Optional[Model] = None
110
110
  read_only: bool = False
111
+ locked: bool = False
111
112
  auth_enabled: bool = False
112
113
  secret: Optional[str] = None
113
114
  token_store: Optional[TokenStore] = None
@@ -772,6 +772,7 @@ class AnthropicStreamingClient(PlaygroundStreamingClient):
772
772
  provider_key=GenerativeProviderKey.GEMINI,
773
773
  model_names=[
774
774
  PROVIDER_DEFAULT,
775
+ "gemini-2.0-flash-exp",
775
776
  "gemini-1.5-flash",
776
777
  "gemini-1.5-flash-8b",
777
778
  "gemini-1.5-pro",
@@ -8,7 +8,7 @@ from strawberry.relay import GlobalID
8
8
  from strawberry.types import Info
9
9
 
10
10
  from phoenix.db import enums, models
11
- from phoenix.server.api.auth import IsAdmin, IsNotReadOnly
11
+ from phoenix.server.api.auth import IsAdmin, IsLocked, IsNotReadOnly
12
12
  from phoenix.server.api.context import Context
13
13
  from phoenix.server.api.exceptions import Unauthorized
14
14
  from phoenix.server.api.queries import Query
@@ -60,7 +60,7 @@ class DeleteApiKeyMutationPayload:
60
60
 
61
61
  @strawberry.type
62
62
  class ApiKeyMutationMixin:
63
- @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin]) # type: ignore
63
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin, IsLocked]) # type: ignore
64
64
  async def create_system_api_key(
65
65
  self, info: Info[Context, None], input: CreateApiKeyInput
66
66
  ) -> CreateSystemApiKeyMutationPayload:
@@ -101,7 +101,7 @@ class ApiKeyMutationMixin:
101
101
  query=Query(),
102
102
  )
103
103
 
104
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
104
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
105
105
  async def create_user_api_key(
106
106
  self, info: Info[Context, None], input: CreateUserApiKeyInput
107
107
  ) -> CreateUserApiKeyMutationPayload:
@@ -25,7 +25,7 @@ from typing_extensions import assert_never
25
25
  from phoenix.datetime_utils import local_now, normalize_datetime
26
26
  from phoenix.db import models
27
27
  from phoenix.db.helpers import get_dataset_example_revisions
28
- from phoenix.server.api.auth import IsNotReadOnly
28
+ from phoenix.server.api.auth import IsLocked, IsNotReadOnly
29
29
  from phoenix.server.api.context import Context
30
30
  from phoenix.server.api.exceptions import BadRequest, CustomGraphQLError, NotFound
31
31
  from phoenix.server.api.helpers.dataset_helpers import get_dataset_example_output
@@ -120,7 +120,7 @@ class ChatCompletionOverDatasetMutationPayload:
120
120
 
121
121
  @strawberry.type
122
122
  class ChatCompletionMutationMixin:
123
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
123
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
124
124
  @classmethod
125
125
  async def chat_completion_over_dataset(
126
126
  cls,
@@ -275,7 +275,7 @@ class ChatCompletionMutationMixin:
275
275
  payload.examples.append(example_payload)
276
276
  return payload
277
277
 
278
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
278
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
279
279
  @classmethod
280
280
  async def chat_completion(
281
281
  cls, info: Info[Context, None], input: ChatCompletionInput
@@ -12,7 +12,7 @@ from strawberry.types import Info
12
12
 
13
13
  from phoenix.db import models
14
14
  from phoenix.db.helpers import get_eval_trace_ids_for_datasets, get_project_names_for_datasets
15
- from phoenix.server.api.auth import IsNotReadOnly
15
+ from phoenix.server.api.auth import IsLocked, IsNotReadOnly
16
16
  from phoenix.server.api.context import Context
17
17
  from phoenix.server.api.exceptions import BadRequest, NotFound
18
18
  from phoenix.server.api.helpers.dataset_helpers import (
@@ -44,7 +44,7 @@ class DatasetMutationPayload:
44
44
 
45
45
  @strawberry.type
46
46
  class DatasetMutationMixin:
47
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
47
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
48
48
  async def create_dataset(
49
49
  self,
50
50
  info: Info[Context, None],
@@ -67,7 +67,7 @@ class DatasetMutationMixin:
67
67
  info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
68
68
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
69
69
 
70
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
70
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
71
71
  async def patch_dataset(
72
72
  self,
73
73
  info: Info[Context, None],
@@ -96,7 +96,7 @@ class DatasetMutationMixin:
96
96
  info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
97
97
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
98
98
 
99
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
99
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
100
100
  async def add_spans_to_dataset(
101
101
  self,
102
102
  info: Info[Context, None],
@@ -205,7 +205,7 @@ class DatasetMutationMixin:
205
205
  info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
206
206
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
207
207
 
208
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
208
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
209
209
  async def add_examples_to_dataset(
210
210
  self, info: Info[Context, None], input: AddExamplesToDatasetInput
211
211
  ) -> DatasetMutationPayload:
@@ -331,7 +331,7 @@ class DatasetMutationMixin:
331
331
  info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
332
332
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
333
333
 
334
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
334
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
335
335
  async def delete_dataset(
336
336
  self,
337
337
  info: Info[Context, None],
@@ -362,7 +362,7 @@ class DatasetMutationMixin:
362
362
  info.context.event_queue.put(DatasetDeleteEvent((dataset.id,)))
363
363
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
364
364
 
365
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
365
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
366
366
  async def patch_dataset_examples(
367
367
  self,
368
368
  info: Info[Context, None],
@@ -454,7 +454,7 @@ class DatasetMutationMixin:
454
454
  info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
455
455
  return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
456
456
 
457
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
457
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
458
458
  async def delete_dataset_examples(
459
459
  self, info: Info[Context, None], input: DeleteDatasetExamplesInput
460
460
  ) -> DatasetMutationPayload:
@@ -6,7 +6,7 @@ from strawberry import UNSET
6
6
  from strawberry.types import Info
7
7
 
8
8
  from phoenix.db import models
9
- from phoenix.server.api.auth import IsNotReadOnly
9
+ from phoenix.server.api.auth import IsLocked, IsNotReadOnly
10
10
  from phoenix.server.api.context import Context
11
11
  from phoenix.server.api.input_types.CreateSpanAnnotationInput import CreateSpanAnnotationInput
12
12
  from phoenix.server.api.input_types.DeleteAnnotationsInput import DeleteAnnotationsInput
@@ -25,7 +25,7 @@ class SpanAnnotationMutationPayload:
25
25
 
26
26
  @strawberry.type
27
27
  class SpanAnnotationMutationMixin:
28
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
28
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
29
29
  async def create_span_annotations(
30
30
  self, info: Info[Context, None], input: list[CreateSpanAnnotationInput]
31
31
  ) -> SpanAnnotationMutationPayload:
@@ -59,7 +59,7 @@ class SpanAnnotationMutationMixin:
59
59
  query=Query(),
60
60
  )
61
61
 
62
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
62
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
63
63
  async def patch_span_annotations(
64
64
  self, info: Info[Context, None], input: list[PatchAnnotationInput]
65
65
  ) -> SpanAnnotationMutationPayload:
@@ -6,7 +6,7 @@ from strawberry import UNSET
6
6
  from strawberry.types import Info
7
7
 
8
8
  from phoenix.db import models
9
- from phoenix.server.api.auth import IsNotReadOnly
9
+ from phoenix.server.api.auth import IsLocked, IsNotReadOnly
10
10
  from phoenix.server.api.context import Context
11
11
  from phoenix.server.api.input_types.CreateTraceAnnotationInput import CreateTraceAnnotationInput
12
12
  from phoenix.server.api.input_types.DeleteAnnotationsInput import DeleteAnnotationsInput
@@ -25,7 +25,7 @@ class TraceAnnotationMutationPayload:
25
25
 
26
26
  @strawberry.type
27
27
  class TraceAnnotationMutationMixin:
28
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
28
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
29
29
  async def create_trace_annotations(
30
30
  self, info: Info[Context, None], input: list[CreateTraceAnnotationInput]
31
31
  ) -> TraceAnnotationMutationPayload:
@@ -59,7 +59,7 @@ class TraceAnnotationMutationMixin:
59
59
  query=Query(),
60
60
  )
61
61
 
62
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
62
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
63
63
  async def patch_trace_annotations(
64
64
  self, info: Info[Context, None], input: list[PatchAnnotationInput]
65
65
  ) -> TraceAnnotationMutationPayload:
@@ -22,7 +22,7 @@ from phoenix.auth import (
22
22
  validate_password_format,
23
23
  )
24
24
  from phoenix.db import enums, models
25
- from phoenix.server.api.auth import IsAdmin, IsNotReadOnly
25
+ from phoenix.server.api.auth import IsAdmin, IsLocked, IsNotReadOnly
26
26
  from phoenix.server.api.context import Context
27
27
  from phoenix.server.api.exceptions import Conflict, NotFound, Unauthorized
28
28
  from phoenix.server.api.input_types.UserRoleInput import UserRoleInput
@@ -81,7 +81,7 @@ class UserMutationPayload:
81
81
 
82
82
  @strawberry.type
83
83
  class UserMutationMixin:
84
- @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin]) # type: ignore
84
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin, IsLocked]) # type: ignore
85
85
  async def create_user(
86
86
  self,
87
87
  info: Info[Context, None],
@@ -112,7 +112,7 @@ class UserMutationMixin:
112
112
  raise Conflict(_user_operation_error_message(error))
113
113
  return UserMutationPayload(user=to_gql_user(user))
114
114
 
115
- @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin]) # type: ignore
115
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin, IsLocked]) # type: ignore
116
116
  async def patch_user(
117
117
  self,
118
118
  info: Info[Context, None],
@@ -155,7 +155,7 @@ class UserMutationMixin:
155
155
  await info.context.log_out(user.id)
156
156
  return UserMutationPayload(user=to_gql_user(user))
157
157
 
158
- @strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
158
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
159
159
  async def patch_viewer(
160
160
  self,
161
161
  info: Info[Context, None],
@@ -196,7 +196,7 @@ class UserMutationMixin:
196
196
  response.delete_cookie(PHOENIX_ACCESS_TOKEN_COOKIE_NAME)
197
197
  return UserMutationPayload(user=to_gql_user(user))
198
198
 
199
- @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin]) # type: ignore
199
+ @strawberry.mutation(permission_classes=[IsNotReadOnly, IsAdmin, IsLocked]) # type: ignore
200
200
  async def delete_users(
201
201
  self,
202
202
  info: Info[Context, None],
@@ -25,7 +25,7 @@ from typing_extensions import TypeAlias, assert_never
25
25
 
26
26
  from phoenix.datetime_utils import local_now, normalize_datetime
27
27
  from phoenix.db import models
28
- from phoenix.server.api.auth import IsNotReadOnly
28
+ from phoenix.server.api.auth import IsLocked, IsNotReadOnly
29
29
  from phoenix.server.api.context import Context
30
30
  from phoenix.server.api.exceptions import BadRequest, CustomGraphQLError, NotFound
31
31
  from phoenix.server.api.helpers.playground_clients import (
@@ -89,7 +89,7 @@ PLAYGROUND_PROJECT_NAME = "playground"
89
89
 
90
90
  @strawberry.type
91
91
  class Subscription:
92
- @strawberry.subscription(permission_classes=[IsNotReadOnly]) # type: ignore
92
+ @strawberry.subscription(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
93
93
  async def chat_completion(
94
94
  self, info: Info[Context, None], input: ChatCompletionInput
95
95
  ) -> AsyncIterator[ChatCompletionSubscriptionPayload]:
@@ -167,7 +167,7 @@ class Subscription:
167
167
  info.context.event_queue.put(SpanInsertEvent(ids=(playground_project_id,)))
168
168
  yield ChatCompletionSubscriptionResult(span=to_gql_span(db_span))
169
169
 
170
- @strawberry.subscription(permission_classes=[IsNotReadOnly]) # type: ignore
170
+ @strawberry.subscription(permission_classes=[IsNotReadOnly, IsLocked]) # type: ignore
171
171
  async def chat_completion_over_dataset(
172
172
  self, info: Info[Context, None], input: ChatCompletionOverDatasetInput
173
173
  ) -> AsyncIterator[ChatCompletionSubscriptionPayload]:
@@ -36,6 +36,19 @@ class Trace(Node):
36
36
  start_time: datetime
37
37
  end_time: datetime
38
38
 
39
+ @strawberry.field
40
+ async def latency_ms(
41
+ self,
42
+ info: Info[Context, None],
43
+ ) -> Optional[float]:
44
+ async with info.context.db() as session:
45
+ latency = await session.scalar(
46
+ select(
47
+ models.Trace.latency_ms,
48
+ ).where(models.Trace.id == self.id_attr)
49
+ )
50
+ return latency
51
+
39
52
  @strawberry.field
40
53
  async def project_id(self) -> GlobalID:
41
54
  from phoenix.server.api.types.Project import Project
@@ -1,32 +1,32 @@
1
1
  {
2
- "_components-DKH6AzJw.js": {
3
- "file": "assets/components-DKH6AzJw.js",
2
+ "_components-DaxEPah8.js": {
3
+ "file": "assets/components-DaxEPah8.js",
4
4
  "name": "components",
5
5
  "imports": [
6
- "_vendor-Cb3zlNNd.js",
7
- "_pages-CVY3Nv4Z.js",
8
- "_vendor-arizeai-Buo4e1A6.js",
9
- "_vendor-codemirror-BuAQiUVf.js",
6
+ "_vendor-DwOx_a-2.js",
7
+ "_pages-CY7Swxhi.js",
8
+ "_vendor-arizeai-BWSsCZNG.js",
9
+ "_vendor-codemirror-WrxmCiOZ.js",
10
10
  "_vendor-three-DwGkEfCM.js"
11
11
  ]
12
12
  },
13
- "_pages-CVY3Nv4Z.js": {
14
- "file": "assets/pages-CVY3Nv4Z.js",
13
+ "_pages-CY7Swxhi.js": {
14
+ "file": "assets/pages-CY7Swxhi.js",
15
15
  "name": "pages",
16
16
  "imports": [
17
- "_vendor-Cb3zlNNd.js",
18
- "_vendor-arizeai-Buo4e1A6.js",
19
- "_components-DKH6AzJw.js",
20
- "_vendor-recharts-Cl9dK5tC.js",
21
- "_vendor-codemirror-BuAQiUVf.js"
17
+ "_vendor-DwOx_a-2.js",
18
+ "_vendor-arizeai-BWSsCZNG.js",
19
+ "_components-DaxEPah8.js",
20
+ "_vendor-codemirror-WrxmCiOZ.js",
21
+ "_vendor-recharts-Bj7q9ORc.js"
22
22
  ]
23
23
  },
24
24
  "_vendor-!~{003}~.js": {
25
25
  "file": "assets/vendor-DxkFTwjz.css",
26
26
  "src": "_vendor-!~{003}~.js"
27
27
  },
28
- "_vendor-Cb3zlNNd.js": {
29
- "file": "assets/vendor-Cb3zlNNd.js",
28
+ "_vendor-DwOx_a-2.js": {
29
+ "file": "assets/vendor-DwOx_a-2.js",
30
30
  "name": "vendor",
31
31
  "imports": [
32
32
  "_vendor-three-DwGkEfCM.js"
@@ -35,33 +35,33 @@
35
35
  "assets/vendor-DxkFTwjz.css"
36
36
  ]
37
37
  },
38
- "_vendor-arizeai-Buo4e1A6.js": {
39
- "file": "assets/vendor-arizeai-Buo4e1A6.js",
38
+ "_vendor-arizeai-BWSsCZNG.js": {
39
+ "file": "assets/vendor-arizeai-BWSsCZNG.js",
40
40
  "name": "vendor-arizeai",
41
41
  "imports": [
42
- "_vendor-Cb3zlNNd.js"
42
+ "_vendor-DwOx_a-2.js"
43
43
  ]
44
44
  },
45
- "_vendor-codemirror-BuAQiUVf.js": {
46
- "file": "assets/vendor-codemirror-BuAQiUVf.js",
45
+ "_vendor-codemirror-WrxmCiOZ.js": {
46
+ "file": "assets/vendor-codemirror-WrxmCiOZ.js",
47
47
  "name": "vendor-codemirror",
48
48
  "imports": [
49
- "_vendor-Cb3zlNNd.js",
50
- "_vendor-shiki-CazYUixL.js"
49
+ "_vendor-DwOx_a-2.js",
50
+ "_vendor-shiki-RnWcZtzE.js"
51
51
  ]
52
52
  },
53
- "_vendor-recharts-Cl9dK5tC.js": {
54
- "file": "assets/vendor-recharts-Cl9dK5tC.js",
53
+ "_vendor-recharts-Bj7q9ORc.js": {
54
+ "file": "assets/vendor-recharts-Bj7q9ORc.js",
55
55
  "name": "vendor-recharts",
56
56
  "imports": [
57
- "_vendor-Cb3zlNNd.js"
57
+ "_vendor-DwOx_a-2.js"
58
58
  ]
59
59
  },
60
- "_vendor-shiki-CazYUixL.js": {
61
- "file": "assets/vendor-shiki-CazYUixL.js",
60
+ "_vendor-shiki-RnWcZtzE.js": {
61
+ "file": "assets/vendor-shiki-RnWcZtzE.js",
62
62
  "name": "vendor-shiki",
63
63
  "imports": [
64
- "_vendor-Cb3zlNNd.js"
64
+ "_vendor-DwOx_a-2.js"
65
65
  ]
66
66
  },
67
67
  "_vendor-three-DwGkEfCM.js": {
@@ -69,19 +69,19 @@
69
69
  "name": "vendor-three"
70
70
  },
71
71
  "index.tsx": {
72
- "file": "assets/index-DLV87qiO.js",
72
+ "file": "assets/index-DxfKd3lv.js",
73
73
  "name": "index",
74
74
  "src": "index.tsx",
75
75
  "isEntry": true,
76
76
  "imports": [
77
- "_vendor-Cb3zlNNd.js",
78
- "_vendor-arizeai-Buo4e1A6.js",
79
- "_pages-CVY3Nv4Z.js",
80
- "_components-DKH6AzJw.js",
77
+ "_vendor-DwOx_a-2.js",
78
+ "_vendor-arizeai-BWSsCZNG.js",
79
+ "_pages-CY7Swxhi.js",
80
+ "_components-DaxEPah8.js",
81
81
  "_vendor-three-DwGkEfCM.js",
82
- "_vendor-recharts-Cl9dK5tC.js",
83
- "_vendor-codemirror-BuAQiUVf.js",
84
- "_vendor-shiki-CazYUixL.js"
82
+ "_vendor-codemirror-WrxmCiOZ.js",
83
+ "_vendor-shiki-RnWcZtzE.js",
84
+ "_vendor-recharts-Bj7q9ORc.js"
85
85
  ]
86
86
  }
87
87
  }