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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arize-phoenix
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: ML Observability in your notebook
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -4,7 +4,7 @@ phoenix/datetime_utils.py,sha256=D955QLrkgrrSdUM6NyqbCeAu2SMsjhR5rHVQEsVUdng,277
4
4
  phoenix/exceptions.py,sha256=igIWGAg3m8jm5YwQDeCY1p8ml_60A7zaGVXJ1yZhY9s,44
5
5
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
6
  phoenix/services.py,sha256=slL4Uu___QQSKEssgD738-WAld-kzVQnpW92uKLxV4E,4886
7
- phoenix/version.py,sha256=yLaFvd-K80rs_ClRVYULStijkok4RfYSaanIt_E-aKM,22
7
+ phoenix/version.py,sha256=LgDSW5laOqA_7i2VW0cZ9QumZREigUxs3ZCBzJ1EG0o,22
8
8
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
10
10
  phoenix/core/evals.py,sha256=OrHeYlh804rpcZIXTA6kan2mzSZMfgpphNNQdPMpNoM,7597
@@ -154,7 +154,7 @@ phoenix/trace/langchain/__init__.py,sha256=vAjrmrreetV7L5IL8VH_9efG9VJunJTgT0iKy
154
154
  phoenix/trace/langchain/instrumentor.py,sha256=HkNKbFNclTYjRXBM8qU4qvZHdyw06J9bhwgE7JnqbNI,1323
155
155
  phoenix/trace/langchain/tracer.py,sha256=1Oz3orSDpZX1pZKwtZbeM_f9tiAhQb7Of8ARjRlKVQY,16827
156
156
  phoenix/trace/llama_index/__init__.py,sha256=wCcQgD9CG5TA8i-1XsSed4ZzwHTUmqZwegQAV_FqEng,178
157
- phoenix/trace/llama_index/callback.py,sha256=YW3qqzWZUEs9aiDx-2628Eae_rct_Yb-DDzT9dV_xiI,27061
157
+ phoenix/trace/llama_index/callback.py,sha256=ARi33dYQtBsY3_h9eE5ZLoM7OXQfYtoZ1--571zILgg,27570
158
158
  phoenix/trace/llama_index/debug_callback.py,sha256=SKToD9q_QADSGTJ5lhilqRVKaUnUSRXUvURCzN4by2U,1367
159
159
  phoenix/trace/llama_index/streaming.py,sha256=5cTtr8evvcEAB88Xb4ih3WEw0xAF4x5W9PehUX9l5_0,3258
160
160
  phoenix/trace/openai/__init__.py,sha256=J3G0uqCxGdksUpaQVHds_Egv2drvh8UEqoLjiQAOveg,79
@@ -165,8 +165,8 @@ phoenix/trace/v1/evaluation_pb2.pyi,sha256=cCbbx06gwQmaH14s3J1X25TtaARh-k1abbxQd
165
165
  phoenix/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
166
  phoenix/utilities/error_handling.py,sha256=7b5rpGFj9EWZ8yrZK1IHvxB89suWk3lggDayUQcvZds,1946
167
167
  phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,222
168
- arize_phoenix-2.4.0.dist-info/METADATA,sha256=QgySehbtJMLwhP5K11CThh6G9Lm38Iira62MIR3nizI,26479
169
- arize_phoenix-2.4.0.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
170
- arize_phoenix-2.4.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
171
- arize_phoenix-2.4.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
172
- arize_phoenix-2.4.0.dist-info/RECORD,,
168
+ arize_phoenix-2.4.1.dist-info/METADATA,sha256=r8ce8SoT9PsPr5nGQxVs8MfGDTmxeJRY1AkyKcpNz_0,26479
169
+ arize_phoenix-2.4.1.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
170
+ arize_phoenix-2.4.1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
171
+ arize_phoenix-2.4.1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
172
+ arize_phoenix-2.4.1.dist-info/RECORD,,
@@ -214,17 +214,26 @@ def payload_to_semantic_attributes(
214
214
  if event_type is CBEventType.LLM:
215
215
  if model_name := serialized.get("model"):
216
216
  attributes[LLM_MODEL_NAME] = model_name
217
- attributes[LLM_INVOCATION_PARAMETERS] = json.dumps(
218
- {
219
- "model": model_name,
220
- "temperature": serialized["temperature"],
221
- "max_tokens": serialized["max_tokens"],
222
- **serialized["additional_kwargs"],
223
- }
224
- )
217
+ invocation_parameters = _extract_invocation_parameters(serialized)
218
+ invocation_parameters["model"] = model_name
219
+ attributes[LLM_INVOCATION_PARAMETERS] = json.dumps(invocation_parameters)
225
220
  return attributes
226
221
 
227
222
 
223
+ def _extract_invocation_parameters(serialized: Mapping[str, Any]) -> Dict[str, Any]:
224
+ # FIXME: this is only based on openai. Other models have different parameters.
225
+ if not hasattr(serialized, "get"):
226
+ return {}
227
+ invocation_parameters: Dict[str, Any] = {}
228
+ additional_kwargs = serialized.get("additional_kwargs")
229
+ if additional_kwargs and isinstance(additional_kwargs, Mapping):
230
+ invocation_parameters.update(additional_kwargs)
231
+ for key in ("temperature", "max_tokens"):
232
+ if (value := serialized.get(key)) is not None:
233
+ invocation_parameters[key] = value
234
+ return invocation_parameters
235
+
236
+
228
237
  class OpenInferenceTraceCallbackHandler(BaseCallbackHandler):
229
238
  """Callback handler for storing LLM application trace data in OpenInference format.
230
239
  OpenInference is an open standard for capturing and storing AI model
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.4.0"
1
+ __version__ = "2.4.1"