arize-phoenix 5.8.0__py3-none-any.whl → 5.9.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 (25) hide show
  1. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/METADATA +1 -1
  2. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/RECORD +25 -25
  3. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/WHEEL +1 -1
  4. phoenix/db/helpers.py +55 -1
  5. phoenix/server/api/helpers/playground_clients.py +160 -8
  6. phoenix/server/api/mutations/chat_mutations.py +198 -11
  7. phoenix/server/api/queries.py +5 -1
  8. phoenix/server/api/routers/v1/spans.py +25 -1
  9. phoenix/server/api/types/ExperimentRun.py +38 -1
  10. phoenix/server/api/types/GenerativeProvider.py +2 -1
  11. phoenix/server/app.py +7 -2
  12. phoenix/server/static/.vite/manifest.json +32 -32
  13. phoenix/server/static/assets/{components-MllbfxfJ.js → components-DU-8CYbi.js} +319 -296
  14. phoenix/server/static/assets/{index-BVO2YcT1.js → index-D9E16vvV.js} +2 -2
  15. phoenix/server/static/assets/{pages-BHfC6jnL.js → pages-t09OI1rC.js} +589 -454
  16. phoenix/server/static/assets/{vendor-BEuNhfwH.js → vendor-D04tenE6.js} +181 -181
  17. phoenix/server/static/assets/{vendor-arizeai-Bskhzyjm.js → vendor-arizeai-D3NxMQw0.js} +2 -2
  18. phoenix/server/static/assets/{vendor-codemirror-DLlXCf0x.js → vendor-codemirror-XTiZSlqq.js} +5 -5
  19. phoenix/server/static/assets/{vendor-recharts-CRqhvLYg.js → vendor-recharts-p0L0neVs.js} +1 -1
  20. phoenix/session/client.py +27 -7
  21. phoenix/utilities/json.py +31 -1
  22. phoenix/version.py +1 -1
  23. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/entry_points.txt +0 -0
  24. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/licenses/IP_NOTICE +0 -0
  25. {arize_phoenix-5.8.0.dist-info → arize_phoenix-5.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 5.8.0
3
+ Version: 5.9.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
@@ -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=duDTiv1rL8Ee9_jtzzhpq-j4xkkpVPkUh2Daa_Ou-xA,22
9
+ phoenix/version.py,sha256=K8QUWqtzm0RvyvMi0shZurlcbRE1MiHY43oJIJLcGF0,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
@@ -19,7 +19,7 @@ phoenix/db/bulk_inserter.py,sha256=faNjuwLqqsw4ky8sa4D0h9u5TvEDTOjrccUW89L008E,1
19
19
  phoenix/db/engines.py,sha256=BYFiHFGABtNuCo7OB8fLc46gMxur4rePK_sJxrMrMjA,6508
20
20
  phoenix/db/enums.py,sha256=tt7iovXLhVTLZ3_LbHNGgcI44SnNjXfkKtLAZG57T54,428
21
21
  phoenix/db/facilitator.py,sha256=Aulr9-sUvRn20Z7mjpWhW6TFE1amRzL8qSEjscvL-xw,4123
22
- phoenix/db/helpers.py,sha256=jT9sADJ39EMC5mKKT-urEOwhIzPFCCWLjH95ti9yraY,3497
22
+ phoenix/db/helpers.py,sha256=daKbpY2QhTPo9a_T1xNHKI4WzWHkMmmrGIws7Hw-RZ4,4884
23
23
  phoenix/db/migrate.py,sha256=lf6FFGzdyNjwtQ4TFi3mmHNGnnazMtG30PPB2qRF1Xc,2648
24
24
  phoenix/db/models.py,sha256=wx2XQgf6qhUO2ZQ4oUENoAguf440qaR0Ea_q1XB1bBU,26484
25
25
  phoenix/db/insertion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -73,7 +73,7 @@ phoenix/pointcloud/pointcloud.py,sha256=SN_1wXZcwKrtSnHGZLDZGx71orqE1WyVF7E-D58d
73
73
  phoenix/pointcloud/projectors.py,sha256=TQgwc9cJDjJkin1WZyZzgl3HsYrLLiyWD7Czy4jNW3U,1088
74
74
  phoenix/pointcloud/umap_parameters.py,sha256=db_WEPoamuWtopZx7tQfAXPnoE0MS8FkAV0_ThjEx_Q,1735
75
75
  phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- phoenix/server/app.py,sha256=Nh1CR4YWXnQYULMJuLQPdz4VVt7nwz5E8IDHtR91_GQ,37847
76
+ phoenix/server/app.py,sha256=O-oawPGpm02KT6_09E66qdEpZqJT1pMUt9LODeI5m5U,37934
77
77
  phoenix/server/bearer_auth.py,sha256=0UudvkAS_dxna5JEJJhGUYwB6Ny-e22ssX5Mm79QwCk,5907
78
78
  phoenix/server/dml_event.py,sha256=MjJmVEKytq75chBOSyvYDusUnEbg1pHpIjR3pZkUaJA,2838
79
79
  phoenix/server/dml_event_handler.py,sha256=EZLXmCvx4pJrCkz29gxwKwmvmUkTtPCHw6klR-XM8qE,8258
@@ -92,7 +92,7 @@ phoenix/server/api/auth.py,sha256=OhWmv_Hl-K-yhJeUWXKRYYiUOIPo-rYSQXdm4fjeTJ8,90
92
92
  phoenix/server/api/context.py,sha256=g5tAYInMifMOdnGTlyfHdB7rDNlC9F2E5bU6IA_3Y0c,5337
93
93
  phoenix/server/api/exceptions.py,sha256=TA0JuY2YRnj35qGuMSQ8d0ToHum9gWm9W--3fSKHrX0,1171
94
94
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
95
- phoenix/server/api/queries.py,sha256=nOgrAygpl49y1a5V0O_y4SRNJ8dwgv_C7birrgkgRm4,27150
95
+ phoenix/server/api/queries.py,sha256=4KJz8TUz3VUTup9MDjr_GoKX0SttWSvHBq2ncWZGxf8,27343
96
96
  phoenix/server/api/schema.py,sha256=tHyw2jTbue_-gu0fe9Sw7LUYtzJUCwp9SvccDgOkNPw,1696
97
97
  phoenix/server/api/subscriptions.py,sha256=Xu1k-UL893Ao1FsGk7OGfxuuyO6A3FzbSK8a2TTSDe4,19692
98
98
  phoenix/server/api/utils.py,sha256=quCBRcusc6PUq9tJq7M8PgwFZp7nXgVAxtbw8feribY,833
@@ -125,7 +125,7 @@ phoenix/server/api/dataloaders/cache/__init__.py,sha256=SYoOM9n8FJaMdQarma5d1blu
125
125
  phoenix/server/api/dataloaders/cache/two_tier_cache.py,sha256=cmo8FUT3E91R139IEzh4yCga-6nTamc5KPXAfMrzNDM,2315
126
126
  phoenix/server/api/helpers/__init__.py,sha256=m2-xaSPqUiSs91k62JaRDjFNfl-1byxBfY-m_Vxw16U,272
127
127
  phoenix/server/api/helpers/dataset_helpers.py,sha256=14mldZp9to3rr9BdvvoFqEwZHHV_k2e7jPm8q9z2OdQ,6896
128
- phoenix/server/api/helpers/playground_clients.py,sha256=tgf94esqWmt1AnXEA7QDa2G3THjvtbbS_qLY5xyJd70,29093
128
+ phoenix/server/api/helpers/playground_clients.py,sha256=Bt3rj0zZ2nmxb-b2vBNNzKA2N9GEUH_LyP3j166EFOI,34486
129
129
  phoenix/server/api/helpers/playground_registry.py,sha256=CPLMziFB2wmr-dfbx7VbzO2f8YIG_k5RftzvGXYGQ1w,2570
130
130
  phoenix/server/api/helpers/playground_spans.py,sha256=j7WlFTolCgrpkazwVuXqvTj8JSJ-nf-Gf_VZKCbzAvU,14775
131
131
  phoenix/server/api/input_types/AddExamplesToDatasetInput.py,sha256=mIQz0S_z8YdrktKIY6RCvtNJ2yZF9pYvTGgasUsI-54,430
@@ -164,7 +164,7 @@ phoenix/server/api/input_types/UserRoleInput.py,sha256=xxhFe0ITZOgRVEJbVem_W6F1I
164
164
  phoenix/server/api/input_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
165
165
  phoenix/server/api/mutations/__init__.py,sha256=1wClieLNA3_Tin4Ah67rkrQvwSSZAdPU0EPsRiUxyAA,1103
166
166
  phoenix/server/api/mutations/api_key_mutations.py,sha256=OmPipsmlQIb6DKvAgO58mZUwkYJihlJB2N4lTyeUlAA,6164
167
- phoenix/server/api/mutations/chat_mutations.py,sha256=MseQk4FEQOjEs-CseGDcD8Qf73GfKsDvcpKjwD4V9A4,13123
167
+ phoenix/server/api/mutations/chat_mutations.py,sha256=aQ9dBgUmeQOT2fn8dJp6luWc4EiJJeg1QsX8yNNr_ZM,21074
168
168
  phoenix/server/api/mutations/dataset_mutations.py,sha256=siwsSmozKRIK8ZhPrfWl-GxKCL4lAmRPms862tG2KXY,27064
169
169
  phoenix/server/api/mutations/experiment_mutations.py,sha256=p3CoLAa8nFPa3D759Y2A7De_PVJNGOL98mA3HoZBrRQ,3188
170
170
  phoenix/server/api/mutations/export_events_mutations.py,sha256=xoDnVWC7eA_8wNQP0-oyiHojyUZ0EhVVSrsAnztetC0,3993
@@ -187,7 +187,7 @@ phoenix/server/api/routers/v1/experiment_evaluations.py,sha256=1XuKqE5F6CC6R4kF4
187
187
  phoenix/server/api/routers/v1/experiment_runs.py,sha256=xKXhol1-G4zAFECAQK9lAjKtSJsvB0Bp6bAXJYqJ7eI,6387
188
188
  phoenix/server/api/routers/v1/experiments.py,sha256=sBxOIE4k4eIt-sQ6lPo2HUv9Tf1aURXtTJTq8J-Rfto,11808
189
189
  phoenix/server/api/routers/v1/pydantic_compat.py,sha256=FeK8oe2brqu-djsoqRxiKL4tw5cHmi89OHVfCFxYsAo,2890
190
- phoenix/server/api/routers/v1/spans.py,sha256=0i82OysmDVjCAU590urzWzpfl_hH12srAHAnVKyYWxM,8796
190
+ phoenix/server/api/routers/v1/spans.py,sha256=NnvcUIx_7nb4tnieP-tfgy2Ua7WzHGSTEOvoLJ-3C9Y,9634
191
191
  phoenix/server/api/routers/v1/traces.py,sha256=wK9WU60YBsZCGFi8h6QzXMyIQ1_e5WdkCGz4Ky2Gb-g,7787
192
192
  phoenix/server/api/routers/v1/utils.py,sha256=mSs1luneS00f4o60pJeR8JcjP1NdF3Igh7fjAbOYF_U,3074
193
193
  phoenix/server/api/types/Annotation.py,sha256=7Ym7iuVcbwHlw2yIRylz4nATAF_Cm-Z17qcjiooj1cc,751
@@ -222,12 +222,12 @@ phoenix/server/api/types/ExampleRevisionInterface.py,sha256=gV3Gt9-3Oi5wjaVtepC6
222
222
  phoenix/server/api/types/Experiment.py,sha256=hqqIwgeWoylOeBAMmQyzefn_p_COwxW0VqEGOqdcTpE,5470
223
223
  phoenix/server/api/types/ExperimentAnnotationSummary.py,sha256=Uk3JtxIrsMoZT5tqc4nJdUOM3XegVzjUyoV3pkjNotE,256
224
224
  phoenix/server/api/types/ExperimentComparison.py,sha256=cFQZy5rj_klzTV-3jnxIlkrCHXkW8gYnp5uSR1UWCzg,416
225
- phoenix/server/api/types/ExperimentRun.py,sha256=LkR7fBRZ3nH57ZoHJwePTGtJYcTMM-EH5r1TVPiMyxg,2687
225
+ phoenix/server/api/types/ExperimentRun.py,sha256=18VDl9ciENRp-yn1_gyCDnTI4TYchG985GuM6hssN7g,4253
226
226
  phoenix/server/api/types/ExperimentRunAnnotation.py,sha256=iBxDaD9DgiF-Qymp5QyxWfJRGYXM1_CeWA_qzsZBqkI,1812
227
227
  phoenix/server/api/types/ExportedFile.py,sha256=e3GTn7B5LgsTbqiwjhMCQH7VsiqXitrBO4aCMS1lHsg,163
228
228
  phoenix/server/api/types/Functionality.py,sha256=tzV9xdhB8zqfsjWxP66NDC7EZsplYkYO7jRbLWJIeeg,382
229
229
  phoenix/server/api/types/GenerativeModel.py,sha256=P7eBUMXbeqaLwSSGBKdZy3a5gOLd9I0fuP8o1st6H08,193
230
- phoenix/server/api/types/GenerativeProvider.py,sha256=67dwF-YRgp4_UnIJFnPV02a9yb4oiThiU71L63zi3qw,1101
230
+ phoenix/server/api/types/GenerativeProvider.py,sha256=4Vm82blTCvj9tCreLhghiYOz4dsJPkYbFmfDRaLae9s,1169
231
231
  phoenix/server/api/types/Inferences.py,sha256=wv88PjcK-KwnzmTdukiAX9EV2KX4GqsKXVAUm1JtnDA,3383
232
232
  phoenix/server/api/types/InferencesRole.py,sha256=mLfeHpyhGUVX1-tWzT9IwC_cD18BZrD3RA4YsHYuSpA,595
233
233
  phoenix/server/api/types/LabelFraction.py,sha256=zsDxdFALrNiGA1eNykeP8o65gbA0HOhRp54MPH_iRAM,93
@@ -273,20 +273,20 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
273
273
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
274
274
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
275
275
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
276
- phoenix/server/static/.vite/manifest.json,sha256=k6i5VszmBt1XcFCELz8c-7e6TP_x3amoTODdfstyDcA,1929
277
- phoenix/server/static/assets/components-MllbfxfJ.js,sha256=mkB80JoeM-3PN4jY7reEh8NWoCza0xPP89dwgJ0dizc,304177
278
- phoenix/server/static/assets/index-BVO2YcT1.js,sha256=ChIu9IaqdcdOJ89wC9wtTPQuN4KGw7HarePwximdaLs,7162
279
- phoenix/server/static/assets/pages-BHfC6jnL.js,sha256=ci7akTAeDEYkrBXLYwU7AtgTbfBn9rPvORPt0e617YQ,602565
280
- phoenix/server/static/assets/vendor-BEuNhfwH.js,sha256=im6x5624m4r_P-V7JnxGOr2oX7U9-HOCpXFxL570rA0,10898284
276
+ phoenix/server/static/.vite/manifest.json,sha256=drYYdxzc7lPintYMBx6grsZPJu_LTS14wcO1YPV9czI,1929
277
+ phoenix/server/static/assets/components-DU-8CYbi.js,sha256=hpQ6qHZWCBf7gIjoHKojfNv55LJNFHFQANNmGliWgwY,305277
278
+ phoenix/server/static/assets/index-D9E16vvV.js,sha256=2Gwt3D0BxvrcHaJI15yslYvTBtMFh5xQ1luBJaH_qK8,7285
279
+ phoenix/server/static/assets/pages-t09OI1rC.js,sha256=CxCleMuzU5JpTjToelyWdbk0eCSMpxgaqFi7U9TradI,625540
280
+ phoenix/server/static/assets/vendor-D04tenE6.js,sha256=1liYDMoq4OLBHuIMGkGVIxYkWQVmcM8FS1671XVr7gs,10898295
281
281
  phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
282
- phoenix/server/static/assets/vendor-arizeai-Bskhzyjm.js,sha256=afaoNHydOIeqYuzh_uvsyA-yRVOr6sheR8hyKq7cUlA,307006
283
- phoenix/server/static/assets/vendor-codemirror-DLlXCf0x.js,sha256=myPIgiviHBKD70ohoYZnBRoy5a7UDyICuyJOqBt7rHc,392705
284
- phoenix/server/static/assets/vendor-recharts-CRqhvLYg.js,sha256=mX6uPoAPxX1q9_1rJWjmDv1mpk6qgCkd15hzJKfT0Qs,282859
282
+ phoenix/server/static/assets/vendor-arizeai-D3NxMQw0.js,sha256=vjsrjVC9vpWkP-kgNOp_gl7gCWb2zerFfwdsxs-MVC8,307005
283
+ phoenix/server/static/assets/vendor-codemirror-XTiZSlqq.js,sha256=MAk9T3tMbEr5K06haVZk4gP29zwSgBmbCjaPqBcML5s,392711
284
+ phoenix/server/static/assets/vendor-recharts-p0L0neVs.js,sha256=20Rz5qJ4pS4Rr7S14U7NFPEuVt15OA43-IW_nDX83kk,282859
285
285
  phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
286
286
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
287
287
  phoenix/server/templates/index.html,sha256=ram6sfy2obf_F053ay35V30v-mnRWZ86rK-PstXLy1c,4457
288
288
  phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
289
- phoenix/session/client.py,sha256=0OpOTUnJ8IBzCK-coIxxusNJiuIInNeSDpxrTHiNhKc,33976
289
+ phoenix/session/client.py,sha256=rsncDzCz8jb7P5e4z3EeZzpSpgluJFXcp00v7RqDYHI,35012
290
290
  phoenix/session/data_extractor.py,sha256=Y0RzYFaNy9fQj8PEIeQ76TBZ90_E1FW7bXu3K5x0EZY,2782
291
291
  phoenix/session/evaluation.py,sha256=Q3fOMNELvqkk-b6a6PKc8pDJdsNQ0ZbTpseUSA2NKqs,5300
292
292
  phoenix/session/session.py,sha256=1HMKmN4Sn6W3szajitR5EQ130ia1HxIhTUB_tew6P00,27474
@@ -316,15 +316,15 @@ phoenix/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
316
316
  phoenix/utilities/client.py,sha256=kr95EgpTJtCbb7CLoxC-KiyB2Wco03DZGIlcEmozHFs,5605
317
317
  phoenix/utilities/deprecation.py,sha256=LL1LWfVqnYulceMQw2CggoIv8Uogrj7fAD_85devnoo,1067
318
318
  phoenix/utilities/error_handling.py,sha256=5_ggfwmd0xZPoI3qi1fwm0x1F0i7g5j-gr0ny1TFzPU,1967
319
- phoenix/utilities/json.py,sha256=SulN5hVUQUUebYhifuNvsYw1Eq8dVzRcP7Di6nr3uNM,2388
319
+ phoenix/utilities/json.py,sha256=F5UbCaplDxrcSiuMMPIwPqcxEmYcbc24Jqomqky8YbA,3565
320
320
  phoenix/utilities/logging.py,sha256=NKvX43jWITgSTtHGCi6l5xp8jTjtQ8FQ_irEi9ybOxg,502
321
321
  phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,445
322
322
  phoenix/utilities/re.py,sha256=x8Xbk-Wa6qDMAtUd_7JtZvKtrYEuMY-bchB0n163_5c,2006
323
323
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
324
324
  phoenix/utilities/template_formatters.py,sha256=JuOyvukMPLDHa1uVNw0kCFBUnIxy02dwAWNZimdIZU4,2423
325
- arize_phoenix-5.8.0.dist-info/METADATA,sha256=VALVEFvoQcr28Xiu2cMyzl2a17SLOQoFEkiTmkMnkcs,22613
326
- arize_phoenix-5.8.0.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
327
- arize_phoenix-5.8.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
328
- arize_phoenix-5.8.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
329
- arize_phoenix-5.8.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
330
- arize_phoenix-5.8.0.dist-info/RECORD,,
325
+ arize_phoenix-5.9.0.dist-info/METADATA,sha256=6nzmQsogHQ_iojZREFcMzcmV0lbegRpIS5l6U6yCfUY,22613
326
+ arize_phoenix-5.9.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
327
+ arize_phoenix-5.9.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
328
+ arize_phoenix-5.9.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
329
+ arize_phoenix-5.9.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
330
+ arize_phoenix-5.9.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.1
2
+ Generator: hatchling 1.26.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
phoenix/db/helpers.py CHANGED
@@ -7,7 +7,16 @@ from openinference.semconv.trace import (
7
7
  RerankerAttributes,
8
8
  SpanAttributes,
9
9
  )
10
- from sqlalchemy import Integer, Select, SQLColumnExpression, case, distinct, func, select
10
+ from sqlalchemy import (
11
+ Integer,
12
+ Select,
13
+ SQLColumnExpression,
14
+ and_,
15
+ case,
16
+ distinct,
17
+ func,
18
+ select,
19
+ )
11
20
  from typing_extensions import assert_never
12
21
 
13
22
  from phoenix.db import models
@@ -103,3 +112,48 @@ def dedup(
103
112
  ans.append(item)
104
113
  seen.add(k)
105
114
  return ans
115
+
116
+
117
+ def get_dataset_example_revisions(
118
+ dataset_version_id: int,
119
+ ) -> Select[tuple[models.DatasetExampleRevision]]:
120
+ version = (
121
+ select(
122
+ models.DatasetVersion.id,
123
+ models.DatasetVersion.dataset_id,
124
+ )
125
+ .filter_by(id=dataset_version_id)
126
+ .subquery()
127
+ )
128
+ table = models.DatasetExampleRevision
129
+ revision = (
130
+ select(
131
+ table.dataset_example_id,
132
+ func.max(table.dataset_version_id).label("dataset_version_id"),
133
+ )
134
+ .join_from(
135
+ table,
136
+ models.DatasetExample,
137
+ table.dataset_example_id == models.DatasetExample.id,
138
+ )
139
+ .join_from(
140
+ models.DatasetExample,
141
+ version,
142
+ models.DatasetExample.dataset_id == version.c.dataset_id,
143
+ )
144
+ .where(models.DatasetExample.dataset_id == version.c.dataset_id)
145
+ .where(table.dataset_version_id <= version.c.id)
146
+ .group_by(table.dataset_example_id)
147
+ .subquery()
148
+ )
149
+ return (
150
+ select(table)
151
+ .where(table.revision_kind != "DELETE")
152
+ .join(
153
+ revision,
154
+ onclause=and_(
155
+ revision.c.dataset_example_id == table.dataset_example_id,
156
+ revision.c.dataset_version_id == table.dataset_version_id,
157
+ ),
158
+ )
159
+ )
@@ -26,6 +26,7 @@ from phoenix.server.api.input_types.GenerativeModelInput import GenerativeModelI
26
26
  from phoenix.server.api.input_types.InvocationParameters import (
27
27
  BoundedFloatInvocationParameter,
28
28
  CanonicalParameterName,
29
+ FloatInvocationParameter,
29
30
  IntInvocationParameter,
30
31
  InvocationParameter,
31
32
  InvocationParameterInput,
@@ -44,14 +45,28 @@ from phoenix.server.api.types.GenerativeProvider import GenerativeProviderKey
44
45
 
45
46
  if TYPE_CHECKING:
46
47
  from anthropic.types import MessageParam
48
+ from google.generativeai.types import ContentType
47
49
  from openai.types import CompletionUsage
48
50
  from openai.types.chat import ChatCompletionMessageParam, ChatCompletionMessageToolCallParam
49
51
 
50
- DependencyName: TypeAlias = str
51
52
  SetSpanAttributesFn: TypeAlias = Callable[[Mapping[str, Any]], None]
52
53
  ChatCompletionChunk: TypeAlias = Union[TextChunk, ToolCallChunk]
53
54
 
54
55
 
56
+ class Dependency:
57
+ """
58
+ Set the module_name to the import name if it is different from the install name
59
+ """
60
+
61
+ def __init__(self, name: str, module_name: Optional[str] = None):
62
+ self.name = name
63
+ self.module_name = module_name
64
+
65
+ @property
66
+ def import_name(self) -> str:
67
+ return self.module_name or self.name
68
+
69
+
55
70
  class KeyedSingleton:
56
71
  _instances: dict[Hashable, "KeyedSingleton"] = {}
57
72
 
@@ -148,8 +163,8 @@ class PlaygroundStreamingClient(ABC):
148
163
 
149
164
  @classmethod
150
165
  @abstractmethod
151
- def dependencies(cls) -> list[DependencyName]:
152
- # A list of dependency names this client needs to run
166
+ def dependencies(cls) -> list[Dependency]:
167
+ # A list of dependencies this client needs to run
153
168
  ...
154
169
 
155
170
  @classmethod
@@ -194,7 +209,8 @@ class PlaygroundStreamingClient(ABC):
194
209
  def dependencies_are_installed(cls) -> bool:
195
210
  try:
196
211
  for dependency in cls.dependencies():
197
- if importlib.util.find_spec(dependency) is None:
212
+ import_name = dependency.import_name
213
+ if importlib.util.find_spec(import_name) is None:
198
214
  return False
199
215
  return True
200
216
  except ValueError:
@@ -244,8 +260,8 @@ class OpenAIStreamingClient(PlaygroundStreamingClient):
244
260
  self.rate_limiter = PlaygroundRateLimiter(model.provider_key, OpenAIRateLimitError)
245
261
 
246
262
  @classmethod
247
- def dependencies(cls) -> list[DependencyName]:
248
- return ["openai"]
263
+ def dependencies(cls) -> list[Dependency]:
264
+ return [Dependency(name="openai")]
249
265
 
250
266
  @classmethod
251
267
  def supported_invocation_parameters(cls) -> list[InvocationParameter]:
@@ -331,6 +347,9 @@ class OpenAIStreamingClient(PlaygroundStreamingClient):
331
347
  if (usage := chunk.usage) is not None:
332
348
  token_usage = usage
333
349
  continue
350
+ if not chunk.choices:
351
+ # for Azure, initial chunk contains the content filter
352
+ continue
334
353
  choice = chunk.choices[0]
335
354
  delta = choice.delta
336
355
  if choice.finish_reason is None:
@@ -624,8 +643,8 @@ class AnthropicStreamingClient(PlaygroundStreamingClient):
624
643
  self.rate_limiter = PlaygroundRateLimiter(model.provider_key, anthropic.RateLimitError)
625
644
 
626
645
  @classmethod
627
- def dependencies(cls) -> list[DependencyName]:
628
- return ["anthropic"]
646
+ def dependencies(cls) -> list[Dependency]:
647
+ return [Dependency(name="anthropic")]
629
648
 
630
649
  @classmethod
631
650
  def supported_invocation_parameters(cls) -> list[InvocationParameter]:
@@ -746,6 +765,139 @@ class AnthropicStreamingClient(PlaygroundStreamingClient):
746
765
  return anthropic_messages, system_prompt
747
766
 
748
767
 
768
+ @register_llm_client(
769
+ provider_key=GenerativeProviderKey.GEMINI,
770
+ model_names=[
771
+ PROVIDER_DEFAULT,
772
+ "gemini-1.5-flash",
773
+ "gemini-1.5-flash-8b",
774
+ "gemini-1.5-pro",
775
+ "gemini-1.0-pro",
776
+ ],
777
+ )
778
+ class GeminiStreamingClient(PlaygroundStreamingClient):
779
+ def __init__(
780
+ self,
781
+ model: GenerativeModelInput,
782
+ api_key: Optional[str] = None,
783
+ ) -> None:
784
+ import google.generativeai as google_genai
785
+
786
+ super().__init__(model=model, api_key=api_key)
787
+ google_genai.configure(api_key=api_key)
788
+ self.model_name = model.name
789
+
790
+ @classmethod
791
+ def dependencies(cls) -> list[Dependency]:
792
+ return [Dependency(name="google-generativeai", module_name="google.generativeai")]
793
+
794
+ @classmethod
795
+ def supported_invocation_parameters(cls) -> list[InvocationParameter]:
796
+ return [
797
+ BoundedFloatInvocationParameter(
798
+ invocation_name="temperature",
799
+ canonical_name=CanonicalParameterName.TEMPERATURE,
800
+ label="Temperature",
801
+ default_value=0.0,
802
+ min_value=0.0,
803
+ max_value=2.0,
804
+ ),
805
+ IntInvocationParameter(
806
+ invocation_name="max_output_tokens",
807
+ canonical_name=CanonicalParameterName.MAX_COMPLETION_TOKENS,
808
+ label="Max Output Tokens",
809
+ ),
810
+ StringListInvocationParameter(
811
+ invocation_name="stop",
812
+ canonical_name=CanonicalParameterName.STOP_SEQUENCES,
813
+ label="Stop Sequences",
814
+ ),
815
+ FloatInvocationParameter(
816
+ invocation_name="presence_penalty",
817
+ label="Presence Penalty",
818
+ ),
819
+ FloatInvocationParameter(
820
+ invocation_name="frequency_penalty",
821
+ label="Frequency Penalty",
822
+ ),
823
+ BoundedFloatInvocationParameter(
824
+ invocation_name="top_p",
825
+ canonical_name=CanonicalParameterName.TOP_P,
826
+ label="Top P",
827
+ min_value=0.0,
828
+ max_value=1.0,
829
+ ),
830
+ BoundedFloatInvocationParameter(
831
+ invocation_name="top_k",
832
+ label="Top K",
833
+ min_value=0.0,
834
+ max_value=1.0,
835
+ ),
836
+ IntInvocationParameter(
837
+ invocation_name="seed",
838
+ canonical_name=CanonicalParameterName.RANDOM_SEED,
839
+ label="Seed",
840
+ ),
841
+ ]
842
+
843
+ async def chat_completion_create(
844
+ self,
845
+ messages: list[
846
+ tuple[ChatCompletionMessageRole, str, Optional[str], Optional[list[JSONScalarType]]]
847
+ ],
848
+ tools: list[JSONScalarType],
849
+ **invocation_parameters: Any,
850
+ ) -> AsyncIterator[ChatCompletionChunk]:
851
+ import google.generativeai as google_genai
852
+
853
+ gemini_message_history, current_message, system_prompt = self._build_gemini_messages(
854
+ messages
855
+ )
856
+
857
+ model_args = {"model_name": self.model_name}
858
+ if system_prompt:
859
+ model_args["system_instruction"] = system_prompt
860
+ client = google_genai.GenerativeModel(**model_args)
861
+
862
+ gemini_config = google_genai.GenerationConfig(
863
+ **invocation_parameters,
864
+ )
865
+ gemini_params = {
866
+ "content": current_message,
867
+ "generation_config": gemini_config,
868
+ "stream": True,
869
+ }
870
+
871
+ chat = client.start_chat(history=gemini_message_history)
872
+ stream = await chat.send_message_async(**gemini_params)
873
+ async for event in stream:
874
+ yield TextChunk(content=event.text)
875
+
876
+ def _build_gemini_messages(
877
+ self,
878
+ messages: list[tuple[ChatCompletionMessageRole, str, Optional[str], Optional[list[str]]]],
879
+ ) -> tuple[list["ContentType"], str, str]:
880
+ gemini_message_history: list["ContentType"] = []
881
+ system_prompts = []
882
+ for role, content, _tool_call_id, _tool_calls in messages:
883
+ if role == ChatCompletionMessageRole.USER:
884
+ gemini_message_history.append({"role": "user", "parts": content})
885
+ elif role == ChatCompletionMessageRole.AI:
886
+ gemini_message_history.append({"role": "model", "parts": content})
887
+ elif role == ChatCompletionMessageRole.SYSTEM:
888
+ system_prompts.append(content)
889
+ elif role == ChatCompletionMessageRole.TOOL:
890
+ raise NotImplementedError
891
+ else:
892
+ assert_never(role)
893
+ if gemini_message_history:
894
+ prompt = gemini_message_history.pop()["parts"]
895
+ else:
896
+ prompt = ""
897
+
898
+ return gemini_message_history, prompt, "\n".join(system_prompts)
899
+
900
+
749
901
  def initialize_playground_clients() -> None:
750
902
  """
751
903
  Ensure that all playground clients are registered at import time.