arize-phoenix 11.21.1__py3-none-any.whl → 11.22.1__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.
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/METADATA +2 -1
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/RECORD +20 -20
- phoenix/config.py +27 -16
- phoenix/db/README.md +68 -16
- phoenix/db/models.py +9 -2
- phoenix/server/static/.vite/manifest.json +43 -43
- phoenix/server/static/assets/{components-BHdwFK1u.js → components-DQCiuSGl.js} +260 -258
- phoenix/server/static/assets/{index-BuFamj8g.js → index-CPRjfWgw.js} +22 -12
- phoenix/server/static/assets/{pages-wNrdUuht.js → pages-BJo09m3C.js} +328 -339
- phoenix/server/static/assets/{vendor-BbqekBfb.js → vendor-OZY7E_So.js} +130 -130
- phoenix/server/static/assets/{vendor-arizeai-CEwHhYfL.js → vendor-arizeai-gVnaUuEN.js} +1 -1
- phoenix/server/static/assets/{vendor-codemirror-CHApHLLJ.js → vendor-codemirror-B7tfxPRK.js} +3 -3
- phoenix/server/static/assets/{vendor-recharts-Bqf7C6Cm.js → vendor-recharts-BYEfkUTh.js} +1 -1
- phoenix/server/static/assets/{vendor-shiki-BQ88Q1b1.js → vendor-shiki-C9RjEdM9.js} +1 -1
- phoenix/server/templates/index.html +1 -1
- phoenix/version.py +1 -1
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/WHEEL +0 -0
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-11.21.1.dist-info → arize_phoenix-11.22.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arize-phoenix
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.22.1
|
|
4
4
|
Summary: AI Observability and Evaluation
|
|
5
5
|
Project-URL: Documentation, https://arize.com/docs/phoenix/
|
|
6
6
|
Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
|
|
@@ -38,6 +38,7 @@ Requires-Dist: opentelemetry-exporter-otlp
|
|
|
38
38
|
Requires-Dist: opentelemetry-proto>=1.12.0
|
|
39
39
|
Requires-Dist: opentelemetry-sdk
|
|
40
40
|
Requires-Dist: opentelemetry-semantic-conventions
|
|
41
|
+
Requires-Dist: orjson
|
|
41
42
|
Requires-Dist: pandas>=1.0
|
|
42
43
|
Requires-Dist: prometheus-client
|
|
43
44
|
Requires-Dist: protobuf>=4.25.8
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
phoenix/__init__.py,sha256=xkpXH76HFbEDCq8IhiFp-2GnEHx39xPMdOpV5Skew1w,5481
|
|
2
2
|
phoenix/auth.py,sha256=9rscOefuxy5VPcb6MlOYenuy3gDd5l7RxknONovGslE,11342
|
|
3
|
-
phoenix/config.py,sha256=
|
|
3
|
+
phoenix/config.py,sha256=oz-7FW2Pixzgp3Xvs5RM-M7J7mES8_yWdVGo_Tzde9s,63133
|
|
4
4
|
phoenix/datetime_utils.py,sha256=pRD-nzxXYKlMWNtd3r2tKGKfPFhwuJhfOAtlGLVAO60,8784
|
|
5
5
|
phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=ngkyKGVatX3cO2WJdo2hKdaVKP-xJCMvqthvga6kJss,5196
|
|
8
8
|
phoenix/settings.py,sha256=2kHfT3BNOVd4dAO1bq-syEQbHSG8oX2-7NhOwK2QREk,896
|
|
9
|
-
phoenix/version.py,sha256=
|
|
9
|
+
phoenix/version.py,sha256=zSxcADhgqRoxKWiiCN5B9YYAsDWEMouyoNV9vioGxr8,24
|
|
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
|
|
13
13
|
phoenix/core/model_schema.py,sha256=9JChtyXtid0GzEYImDcNA8Ppk7jmCO5xC5dBIUMNYjE,50504
|
|
14
14
|
phoenix/core/model_schema_adapter.py,sha256=y1RXPYGt2HLTGpkB2X-XVQvRJXYGmJ9EL4m7TpOMvj0,8456
|
|
15
|
-
phoenix/db/README.md,sha256=
|
|
15
|
+
phoenix/db/README.md,sha256=51cZyk1XzkUz0jn1cIRkgrZW3LeQZmhWCIXUMWjWO90,10905
|
|
16
16
|
phoenix/db/__init__.py,sha256=pDjEFXukHmJBM-1D8RjmXkvLsz85YWNxMQczt81ec3A,118
|
|
17
17
|
phoenix/db/alembic.ini,sha256=GIS6HpHaKaJbbuahZg1Rc1D2_QqyCkV9r58wdARGf6w,3262
|
|
18
18
|
phoenix/db/bulk_inserter.py,sha256=MbbmKip6gFtnLP1ZA3Z-mP-zy-Qnb9bPD8mRXJQOW2c,14536
|
|
@@ -22,7 +22,7 @@ phoenix/db/enums.py,sha256=w3O5YuJEEzVTwVDZb8b2UUFhU8yK_GosF081VVrrno0,188
|
|
|
22
22
|
phoenix/db/facilitator.py,sha256=UIC-l14p3R8GFVWPmz04NY-CDm_zAynXCAuIYpj_W_g,20254
|
|
23
23
|
phoenix/db/helpers.py,sha256=jqX13kO4qdGozDRdw6nME4BloPtzEQd0fweQpGHbj3I,15078
|
|
24
24
|
phoenix/db/migrate.py,sha256=oUrXH8yEbcpL4eh09aSCuUiSrhFli0eT5D_j4ZmYChY,2797
|
|
25
|
-
phoenix/db/models.py,sha256=
|
|
25
|
+
phoenix/db/models.py,sha256=5MHQA6oHD3O7YJyb3XryROn8VMfZh5zurYuPT1KqCrA,62045
|
|
26
26
|
phoenix/db/pg_config.py,sha256=h6mB7qF7t4Zk6VGvAiyefHGVu74o-yJynaWzeE39k9Y,6001
|
|
27
27
|
phoenix/db/insertion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
phoenix/db/insertion/constants.py,sha256=8wifm7X-1XvroZ__R2Gc96NsgLhTDn0zXl4lehlXtcA,70
|
|
@@ -391,19 +391,19 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
391
391
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
392
392
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
393
393
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
394
|
-
phoenix/server/static/.vite/manifest.json,sha256=
|
|
395
|
-
phoenix/server/static/assets/components-
|
|
396
|
-
phoenix/server/static/assets/index-
|
|
397
|
-
phoenix/server/static/assets/pages-
|
|
398
|
-
phoenix/server/static/assets/vendor-BbqekBfb.js,sha256=8xINQdH4ikfrf8nr8mlO0B9YrKJ2FPecrA9qu5kPILo,2588857
|
|
394
|
+
phoenix/server/static/.vite/manifest.json,sha256=UG8XUcBYGLkpCmfwRwriltceZpq1NRhsgbbLMwMe2Ck,2328
|
|
395
|
+
phoenix/server/static/assets/components-DQCiuSGl.js,sha256=zjM8kVgYfSPNdX9yp5dvLpQRQeHaoDtqD18PsEEFDBs,659101
|
|
396
|
+
phoenix/server/static/assets/index-CPRjfWgw.js,sha256=s-ZHxtIJkZWCZLq7Lsmw6Kl-qaMsiCgCtjHKQDAdyxM,63295
|
|
397
|
+
phoenix/server/static/assets/pages-BJo09m3C.js,sha256=IP4CiBBPDUazjWPaAnwffBraANS5O5VmlWOZH2dTDZs,1223963
|
|
399
398
|
phoenix/server/static/assets/vendor-CqDb5u4o.css,sha256=zIyFiNJKxMaQk8AvtLgt1rR01oO10d1MFndSDKH9Clw,5517
|
|
400
|
-
phoenix/server/static/assets/vendor-
|
|
401
|
-
phoenix/server/static/assets/vendor-
|
|
402
|
-
phoenix/server/static/assets/vendor-
|
|
403
|
-
phoenix/server/static/assets/vendor-
|
|
399
|
+
phoenix/server/static/assets/vendor-OZY7E_So.js,sha256=LC9bIkysAq8J4yZIoptTfdpEAcc7cPw4eH3-FwDDRFo,2588975
|
|
400
|
+
phoenix/server/static/assets/vendor-arizeai-gVnaUuEN.js,sha256=eVKsJKW3pjIZQPshQQqps6V8VxfPt986V7YmVCwkOvQ,121514
|
|
401
|
+
phoenix/server/static/assets/vendor-codemirror-B7tfxPRK.js,sha256=afUA2vTax-uNDnpOs5lJCtGkqJVBW3aQdIbj_hIZ2bU,402623
|
|
402
|
+
phoenix/server/static/assets/vendor-recharts-BYEfkUTh.js,sha256=lGz2oQY4hivwmIOuq-E_2TMwXcw8oATa8Pp3eeQFznA,231651
|
|
403
|
+
phoenix/server/static/assets/vendor-shiki-C9RjEdM9.js,sha256=r7xWVJTWuWM8ZmB3aiC4kRR_qmOWBZqUaF6eL0W8SbE,305160
|
|
404
404
|
phoenix/server/static/assets/vendor-three-BLWp5bic.js,sha256=vfSCVXS20jA0Ceo_O0mDxYBcROinWMdPE6RR4JXmtec,620972
|
|
405
405
|
phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
406
|
-
phoenix/server/templates/index.html,sha256=
|
|
406
|
+
phoenix/server/templates/index.html,sha256=QAYh0TG5mg-GvDQUR09aD9ebl9Sfq0fYAcfIa5G7J6E,7148
|
|
407
407
|
phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
408
408
|
phoenix/session/client.py,sha256=Bl0Ov1tPrKX2-wBr7Kr49hQHgdBtyVfdhlMKcd5tURM,35583
|
|
409
409
|
phoenix/session/data_extractor.py,sha256=Y0RzYFaNy9fQj8PEIeQ76TBZ90_E1FW7bXu3K5x0EZY,2782
|
|
@@ -441,9 +441,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
|
|
|
441
441
|
phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
|
|
442
442
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
443
443
|
phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
|
|
444
|
-
arize_phoenix-11.
|
|
445
|
-
arize_phoenix-11.
|
|
446
|
-
arize_phoenix-11.
|
|
447
|
-
arize_phoenix-11.
|
|
448
|
-
arize_phoenix-11.
|
|
449
|
-
arize_phoenix-11.
|
|
444
|
+
arize_phoenix-11.22.1.dist-info/METADATA,sha256=nxNO5-72WF4Y6ryRnb6SWL9M-_a5tbg0FmPEWy3fi-4,31634
|
|
445
|
+
arize_phoenix-11.22.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
446
|
+
arize_phoenix-11.22.1.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
|
|
447
|
+
arize_phoenix-11.22.1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
448
|
+
arize_phoenix-11.22.1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
449
|
+
arize_phoenix-11.22.1.dist-info/RECORD,,
|
phoenix/config.py
CHANGED
|
@@ -10,7 +10,7 @@ from enum import Enum
|
|
|
10
10
|
from importlib.metadata import version
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
from typing import TYPE_CHECKING, Any, NamedTuple, Optional, Union, cast, overload
|
|
13
|
-
from urllib.parse import
|
|
13
|
+
from urllib.parse import quote, urljoin, urlparse
|
|
14
14
|
|
|
15
15
|
import wrapt
|
|
16
16
|
from email_validator import EmailNotValidError, validate_email
|
|
@@ -1123,27 +1123,38 @@ class DirectoryError(Exception):
|
|
|
1123
1123
|
super().__init__(message)
|
|
1124
1124
|
|
|
1125
1125
|
|
|
1126
|
+
# LEGACY: Regex for backward compatibility with host:port parsing in PHOENIX_POSTGRES_HOST
|
|
1127
|
+
_HOST_PORT_REGEX = re.compile(r"^[^:]+:\d{1,5}$")
|
|
1128
|
+
|
|
1129
|
+
|
|
1126
1130
|
def get_env_postgres_connection_str() -> Optional[str]:
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
pg_host = os.getenv(ENV_PHOENIX_POSTGRES_HOST)
|
|
1130
|
-
pg_port = os.getenv(ENV_PHOENIX_POSTGRES_PORT)
|
|
1131
|
-
pg_db = os.getenv(ENV_PHOENIX_POSTGRES_DB)
|
|
1131
|
+
"""
|
|
1132
|
+
Build PostgreSQL connection string from environment variables.
|
|
1132
1133
|
|
|
1133
|
-
|
|
1134
|
+
LEGACY: Supports host:port parsing in PHOENIX_POSTGRES_HOST for backward compatibility.
|
|
1135
|
+
""" # noqa: E501
|
|
1136
|
+
if not (
|
|
1137
|
+
(pg_host := getenv(ENV_PHOENIX_POSTGRES_HOST, "").rstrip("/"))
|
|
1138
|
+
and (pg_user := getenv(ENV_PHOENIX_POSTGRES_USER))
|
|
1139
|
+
and (pg_password := getenv(ENV_PHOENIX_POSTGRES_PASSWORD))
|
|
1140
|
+
):
|
|
1141
|
+
return None
|
|
1142
|
+
pg_port = getenv(ENV_PHOENIX_POSTGRES_PORT)
|
|
1143
|
+
pg_db = getenv(ENV_PHOENIX_POSTGRES_DB)
|
|
1144
|
+
|
|
1145
|
+
if _HOST_PORT_REGEX.match(pg_host): # maintain backward compatibility
|
|
1134
1146
|
pg_host, parsed_port = pg_host.split(":")
|
|
1135
1147
|
pg_port = pg_port or parsed_port # use the explicitly set port if provided
|
|
1136
1148
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1149
|
+
encoded_user = quote(pg_user)
|
|
1150
|
+
encoded_password = quote(pg_password)
|
|
1151
|
+
connection_str = f"postgresql://{encoded_user}:{encoded_password}@{pg_host}"
|
|
1152
|
+
if pg_port:
|
|
1153
|
+
connection_str = f"{connection_str}:{pg_port}"
|
|
1154
|
+
if pg_db:
|
|
1155
|
+
connection_str = f"{connection_str}/{pg_db}"
|
|
1144
1156
|
|
|
1145
|
-
|
|
1146
|
-
return None
|
|
1157
|
+
return connection_str
|
|
1147
1158
|
|
|
1148
1159
|
|
|
1149
1160
|
def _no_local_storage() -> bool:
|
phoenix/db/README.md
CHANGED
|
@@ -64,11 +64,11 @@ erDiagram
|
|
|
64
64
|
int id PK
|
|
65
65
|
string name
|
|
66
66
|
string cron_expression
|
|
67
|
-
|
|
67
|
+
jsonb rule
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
Project ||--o{ Trace : has
|
|
71
|
-
Project ||--o
|
|
71
|
+
Project ||--o{ ProjectSession : has
|
|
72
72
|
Project ||--o{ ProjectAnnotationConfig : has
|
|
73
73
|
Project {
|
|
74
74
|
int id PK
|
|
@@ -134,7 +134,7 @@ erDiagram
|
|
|
134
134
|
string label
|
|
135
135
|
float score
|
|
136
136
|
string explanation
|
|
137
|
-
|
|
137
|
+
jsonb metadata
|
|
138
138
|
string annotator_kind
|
|
139
139
|
datetime created_at
|
|
140
140
|
datetime updated_at
|
|
@@ -150,7 +150,7 @@ erDiagram
|
|
|
150
150
|
string label
|
|
151
151
|
float score
|
|
152
152
|
string explanation
|
|
153
|
-
|
|
153
|
+
jsonb metadata
|
|
154
154
|
string annotator_kind
|
|
155
155
|
datetime created_at
|
|
156
156
|
datetime updated_at
|
|
@@ -166,7 +166,7 @@ erDiagram
|
|
|
166
166
|
string label
|
|
167
167
|
float score
|
|
168
168
|
string explanation
|
|
169
|
-
|
|
169
|
+
jsonb metadata
|
|
170
170
|
string annotator_kind
|
|
171
171
|
datetime created_at
|
|
172
172
|
datetime updated_at
|
|
@@ -177,21 +177,23 @@ erDiagram
|
|
|
177
177
|
|
|
178
178
|
Dataset ||--o{ DatasetVersion : has
|
|
179
179
|
Dataset ||--o{ DatasetExample : contains
|
|
180
|
+
Dataset ||--o{ Experiment : used_in
|
|
180
181
|
Dataset {
|
|
181
182
|
int id PK
|
|
182
183
|
string name
|
|
183
184
|
string description
|
|
184
|
-
|
|
185
|
+
jsonb metadata
|
|
185
186
|
datetime created_at
|
|
186
187
|
datetime updated_at
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
DatasetVersion ||--o{ DatasetExampleRevision : has
|
|
191
|
+
DatasetVersion ||--o{ Experiment : used_in
|
|
190
192
|
DatasetVersion {
|
|
191
193
|
int id PK
|
|
192
194
|
int dataset_id FK
|
|
193
195
|
string description
|
|
194
|
-
|
|
196
|
+
jsonb metadata
|
|
195
197
|
datetime created_at
|
|
196
198
|
}
|
|
197
199
|
|
|
@@ -209,7 +211,7 @@ erDiagram
|
|
|
209
211
|
int dataset_version_id FK
|
|
210
212
|
json input
|
|
211
213
|
json output
|
|
212
|
-
|
|
214
|
+
jsonb metadata
|
|
213
215
|
string revision_kind
|
|
214
216
|
datetime created_at
|
|
215
217
|
}
|
|
@@ -222,13 +224,14 @@ erDiagram
|
|
|
222
224
|
string name
|
|
223
225
|
string description
|
|
224
226
|
int repetitions
|
|
225
|
-
|
|
227
|
+
jsonb metadata
|
|
226
228
|
string project_name
|
|
227
229
|
datetime created_at
|
|
228
230
|
datetime updated_at
|
|
229
231
|
}
|
|
230
232
|
|
|
231
233
|
ExperimentRun ||--o{ ExperimentRunAnnotation : has
|
|
234
|
+
DatasetExample ||--o{ ExperimentRun : used_in
|
|
232
235
|
ExperimentRun {
|
|
233
236
|
int id PK
|
|
234
237
|
int experiment_id FK
|
|
@@ -253,7 +256,7 @@ erDiagram
|
|
|
253
256
|
string explanation
|
|
254
257
|
string trace_id
|
|
255
258
|
string error
|
|
256
|
-
|
|
259
|
+
jsonb metadata
|
|
257
260
|
datetime start_time
|
|
258
261
|
datetime end_time
|
|
259
262
|
}
|
|
@@ -298,6 +301,7 @@ erDiagram
|
|
|
298
301
|
datetime expires_at
|
|
299
302
|
}
|
|
300
303
|
|
|
304
|
+
RefreshToken ||--o| AccessToken : creates
|
|
301
305
|
AccessToken {
|
|
302
306
|
int id PK
|
|
303
307
|
int user_id FK
|
|
@@ -323,13 +327,13 @@ erDiagram
|
|
|
323
327
|
Prompt ||--o{ PromptVersion : has
|
|
324
328
|
Prompt ||--o{ PromptPromptLabel : has
|
|
325
329
|
Prompt ||--o{ PromptVersionTag : has
|
|
326
|
-
Prompt ||--o{ Prompt :
|
|
330
|
+
Prompt ||--o{ Prompt : derived_from
|
|
327
331
|
Prompt {
|
|
328
332
|
int id PK
|
|
329
333
|
int source_prompt_id FK
|
|
330
334
|
string name
|
|
331
335
|
string description
|
|
332
|
-
|
|
336
|
+
jsonb metadata
|
|
333
337
|
datetime created_at
|
|
334
338
|
datetime updated_at
|
|
335
339
|
}
|
|
@@ -342,13 +346,13 @@ erDiagram
|
|
|
342
346
|
int user_id FK
|
|
343
347
|
string template_type
|
|
344
348
|
string template_format
|
|
345
|
-
|
|
346
|
-
|
|
349
|
+
jsonb template
|
|
350
|
+
jsonb invocation_parameters
|
|
347
351
|
json tools
|
|
348
352
|
json response_format
|
|
349
353
|
string model_provider
|
|
350
354
|
string model_name
|
|
351
|
-
|
|
355
|
+
jsonb metadata
|
|
352
356
|
datetime created_at
|
|
353
357
|
}
|
|
354
358
|
|
|
@@ -379,7 +383,7 @@ erDiagram
|
|
|
379
383
|
AnnotationConfig {
|
|
380
384
|
int id PK
|
|
381
385
|
string name
|
|
382
|
-
|
|
386
|
+
jsonb config
|
|
383
387
|
}
|
|
384
388
|
|
|
385
389
|
ProjectAnnotationConfig {
|
|
@@ -387,4 +391,52 @@ erDiagram
|
|
|
387
391
|
int project_id FK
|
|
388
392
|
int annotation_config_id FK
|
|
389
393
|
}
|
|
394
|
+
|
|
395
|
+
GenerativeModel ||--o{ TokenPrice : has
|
|
396
|
+
GenerativeModel ||--o{ SpanCost : used_in
|
|
397
|
+
GenerativeModel {
|
|
398
|
+
int id PK
|
|
399
|
+
string name
|
|
400
|
+
string provider
|
|
401
|
+
string name_pattern
|
|
402
|
+
boolean is_built_in
|
|
403
|
+
datetime start_time
|
|
404
|
+
datetime created_at
|
|
405
|
+
datetime updated_at
|
|
406
|
+
datetime deleted_at
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
TokenPrice {
|
|
410
|
+
int id PK
|
|
411
|
+
int model_id FK
|
|
412
|
+
string token_type
|
|
413
|
+
boolean is_prompt
|
|
414
|
+
float base_rate
|
|
415
|
+
json customization
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
SpanCost ||--o{ SpanCostDetail : has
|
|
419
|
+
SpanCost {
|
|
420
|
+
int id PK
|
|
421
|
+
int span_rowid FK
|
|
422
|
+
int trace_rowid FK
|
|
423
|
+
int model_id FK
|
|
424
|
+
datetime span_start_time
|
|
425
|
+
float total_cost
|
|
426
|
+
float total_tokens
|
|
427
|
+
float prompt_cost
|
|
428
|
+
float prompt_tokens
|
|
429
|
+
float completion_cost
|
|
430
|
+
float completion_tokens
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
SpanCostDetail {
|
|
434
|
+
int id PK
|
|
435
|
+
int span_cost_id FK
|
|
436
|
+
string token_type
|
|
437
|
+
boolean is_prompt
|
|
438
|
+
float cost
|
|
439
|
+
float tokens
|
|
440
|
+
float cost_per_token
|
|
441
|
+
}
|
|
390
442
|
```
|
phoenix/db/models.py
CHANGED
|
@@ -2,6 +2,7 @@ import re
|
|
|
2
2
|
from datetime import datetime, timezone
|
|
3
3
|
from typing import Any, Iterable, Literal, Optional, Sequence, TypedDict, cast
|
|
4
4
|
|
|
5
|
+
import orjson
|
|
5
6
|
import sqlalchemy as sa
|
|
6
7
|
import sqlalchemy.sql as sql
|
|
7
8
|
from openinference.semconv.trace import RerankerAttributes, SpanAttributes
|
|
@@ -187,7 +188,10 @@ class JsonDict(TypeDecorator[dict[str, Any]]):
|
|
|
187
188
|
impl = JSON_
|
|
188
189
|
|
|
189
190
|
def process_bind_param(self, value: Optional[dict[str, Any]], _: Dialect) -> dict[str, Any]:
|
|
190
|
-
return value if isinstance(value, dict) else {}
|
|
191
|
+
return orjson.loads(orjson.dumps(value)) if isinstance(value, dict) else {}
|
|
192
|
+
|
|
193
|
+
def process_result_value(self, value: Optional[Any], _: Dialect) -> Optional[dict[str, Any]]:
|
|
194
|
+
return orjson.loads(orjson.dumps(value)) if isinstance(value, dict) and value else value
|
|
191
195
|
|
|
192
196
|
|
|
193
197
|
class JsonList(TypeDecorator[list[Any]]):
|
|
@@ -196,7 +200,10 @@ class JsonList(TypeDecorator[list[Any]]):
|
|
|
196
200
|
impl = JSON_
|
|
197
201
|
|
|
198
202
|
def process_bind_param(self, value: Optional[list[Any]], _: Dialect) -> list[Any]:
|
|
199
|
-
return value if isinstance(value, list) else []
|
|
203
|
+
return orjson.loads(orjson.dumps(value)) if isinstance(value, list) else []
|
|
204
|
+
|
|
205
|
+
def process_result_value(self, value: Optional[Any], _: Dialect) -> Optional[list[Any]]:
|
|
206
|
+
return orjson.loads(orjson.dumps(value)) if isinstance(value, list) and value else value
|
|
200
207
|
|
|
201
208
|
|
|
202
209
|
class UtcTimeStamp(TypeDecorator[datetime]):
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-DQCiuSGl.js": {
|
|
3
|
+
"file": "assets/components-DQCiuSGl.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_vendor-
|
|
7
|
-
"_pages-
|
|
8
|
-
"_vendor-arizeai-
|
|
9
|
-
"_vendor-codemirror-
|
|
6
|
+
"_vendor-OZY7E_So.js",
|
|
7
|
+
"_pages-BJo09m3C.js",
|
|
8
|
+
"_vendor-arizeai-gVnaUuEN.js",
|
|
9
|
+
"_vendor-codemirror-B7tfxPRK.js",
|
|
10
10
|
"_vendor-three-BLWp5bic.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-BJo09m3C.js": {
|
|
14
|
+
"file": "assets/pages-BJo09m3C.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
|
-
"_vendor-
|
|
18
|
-
"_vendor-arizeai-
|
|
19
|
-
"_components-
|
|
20
|
-
"_vendor-codemirror-
|
|
21
|
-
"_vendor-recharts-
|
|
17
|
+
"_vendor-OZY7E_So.js",
|
|
18
|
+
"_vendor-arizeai-gVnaUuEN.js",
|
|
19
|
+
"_components-DQCiuSGl.js",
|
|
20
|
+
"_vendor-codemirror-B7tfxPRK.js",
|
|
21
|
+
"_vendor-recharts-BYEfkUTh.js"
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
|
-
"_vendor-
|
|
25
|
-
"file": "assets/vendor-
|
|
24
|
+
"_vendor-CqDb5u4o.css": {
|
|
25
|
+
"file": "assets/vendor-CqDb5u4o.css",
|
|
26
|
+
"src": "_vendor-CqDb5u4o.css"
|
|
27
|
+
},
|
|
28
|
+
"_vendor-OZY7E_So.js": {
|
|
29
|
+
"file": "assets/vendor-OZY7E_So.js",
|
|
26
30
|
"name": "vendor",
|
|
27
31
|
"imports": [
|
|
28
32
|
"_vendor-three-BLWp5bic.js"
|
|
@@ -31,43 +35,39 @@
|
|
|
31
35
|
"assets/vendor-CqDb5u4o.css"
|
|
32
36
|
]
|
|
33
37
|
},
|
|
34
|
-
"_vendor-
|
|
35
|
-
"file": "assets/vendor-
|
|
36
|
-
"src": "_vendor-CqDb5u4o.css"
|
|
37
|
-
},
|
|
38
|
-
"_vendor-arizeai-CEwHhYfL.js": {
|
|
39
|
-
"file": "assets/vendor-arizeai-CEwHhYfL.js",
|
|
38
|
+
"_vendor-arizeai-gVnaUuEN.js": {
|
|
39
|
+
"file": "assets/vendor-arizeai-gVnaUuEN.js",
|
|
40
40
|
"name": "vendor-arizeai",
|
|
41
41
|
"imports": [
|
|
42
|
-
"_vendor-
|
|
42
|
+
"_vendor-OZY7E_So.js"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
|
-
"_vendor-codemirror-
|
|
46
|
-
"file": "assets/vendor-codemirror-
|
|
45
|
+
"_vendor-codemirror-B7tfxPRK.js": {
|
|
46
|
+
"file": "assets/vendor-codemirror-B7tfxPRK.js",
|
|
47
47
|
"name": "vendor-codemirror",
|
|
48
48
|
"imports": [
|
|
49
|
-
"_vendor-
|
|
50
|
-
"_vendor-shiki-
|
|
49
|
+
"_vendor-OZY7E_So.js",
|
|
50
|
+
"_vendor-shiki-C9RjEdM9.js"
|
|
51
51
|
],
|
|
52
52
|
"dynamicImports": [
|
|
53
|
-
"_vendor-shiki-
|
|
54
|
-
"_vendor-shiki-
|
|
55
|
-
"_vendor-shiki-
|
|
53
|
+
"_vendor-shiki-C9RjEdM9.js",
|
|
54
|
+
"_vendor-shiki-C9RjEdM9.js",
|
|
55
|
+
"_vendor-shiki-C9RjEdM9.js"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
|
-
"_vendor-recharts-
|
|
59
|
-
"file": "assets/vendor-recharts-
|
|
58
|
+
"_vendor-recharts-BYEfkUTh.js": {
|
|
59
|
+
"file": "assets/vendor-recharts-BYEfkUTh.js",
|
|
60
60
|
"name": "vendor-recharts",
|
|
61
61
|
"imports": [
|
|
62
|
-
"_vendor-
|
|
62
|
+
"_vendor-OZY7E_So.js"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"_vendor-shiki-
|
|
66
|
-
"file": "assets/vendor-shiki-
|
|
65
|
+
"_vendor-shiki-C9RjEdM9.js": {
|
|
66
|
+
"file": "assets/vendor-shiki-C9RjEdM9.js",
|
|
67
67
|
"name": "vendor-shiki",
|
|
68
68
|
"isDynamicEntry": true,
|
|
69
69
|
"imports": [
|
|
70
|
-
"_vendor-
|
|
70
|
+
"_vendor-OZY7E_So.js"
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"_vendor-three-BLWp5bic.js": {
|
|
@@ -75,19 +75,19 @@
|
|
|
75
75
|
"name": "vendor-three"
|
|
76
76
|
},
|
|
77
77
|
"index.tsx": {
|
|
78
|
-
"file": "assets/index-
|
|
78
|
+
"file": "assets/index-CPRjfWgw.js",
|
|
79
79
|
"name": "index",
|
|
80
80
|
"src": "index.tsx",
|
|
81
81
|
"isEntry": true,
|
|
82
82
|
"imports": [
|
|
83
|
-
"_vendor-
|
|
84
|
-
"_vendor-arizeai-
|
|
85
|
-
"_pages-
|
|
86
|
-
"_components-
|
|
83
|
+
"_vendor-OZY7E_So.js",
|
|
84
|
+
"_vendor-arizeai-gVnaUuEN.js",
|
|
85
|
+
"_pages-BJo09m3C.js",
|
|
86
|
+
"_components-DQCiuSGl.js",
|
|
87
87
|
"_vendor-three-BLWp5bic.js",
|
|
88
|
-
"_vendor-codemirror-
|
|
89
|
-
"_vendor-shiki-
|
|
90
|
-
"_vendor-recharts-
|
|
88
|
+
"_vendor-codemirror-B7tfxPRK.js",
|
|
89
|
+
"_vendor-shiki-C9RjEdM9.js",
|
|
90
|
+
"_vendor-recharts-BYEfkUTh.js"
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
}
|