arize-phoenix 7.3.0__py3-none-any.whl → 7.3.2__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.4
2
2
  Name: arize-phoenix
3
- Version: 7.3.0
3
+ Version: 7.3.2
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=sdpc-9h8PmmRVaqNA9R2vvMOVXFYIKW9zf9YS8np6ig,22
9
+ phoenix/version.py,sha256=8Jco-UfTOBG0bR83qZyBQc0_drTG-H86kUcnKWGtY7o,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
@@ -82,7 +82,7 @@ phoenix/server/dml_event.py,sha256=MjJmVEKytq75chBOSyvYDusUnEbg1pHpIjR3pZkUaJA,2
82
82
  phoenix/server/dml_event_handler.py,sha256=EZLXmCvx4pJrCkz29gxwKwmvmUkTtPCHw6klR-XM8qE,8258
83
83
  phoenix/server/grpc_server.py,sha256=SknR-iLIUqU9swiAyLhbCUREA1obOM6w49xgdK1AQDs,3839
84
84
  phoenix/server/jwt_store.py,sha256=asxzY4_ZBM2FWAMstHvhvnKUP_0AA3v3xPTL2IOgNqY,16831
85
- phoenix/server/main.py,sha256=cJaJArrLof5ziFkpB_31TGTaiUK_YCh7_ROZRtrdZ-Q,16310
85
+ phoenix/server/main.py,sha256=khpRUAF6wo6rrFrhFbWIoZi43dQL-uY8QtdEucGT1y8,16311
86
86
  phoenix/server/oauth2.py,sha256=EV4wcCwG0N7cJRcfGNURdP5rZgRVCeRDvXyle19A27Y,2064
87
87
  phoenix/server/prometheus.py,sha256=x9zV3M8VeZ9GS32SLr5OxNdi1VaxvdHCZPx2zI8Hoa4,3549
88
88
  phoenix/server/rate_limiters.py,sha256=cFc73D2NaxqNZZDbwfIDw4So-fRVOJPBtqxOZ8Qky_s,7155
@@ -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=8gJ7RcOE9pyinRIkZ-elr17Fem9jIsfpuuyxlzPA43w,36450
137
+ phoenix/server/api/helpers/playground_clients.py,sha256=vnjdIv8ODtVgSzZT2CPAkrPa9HwLjDROY2XTAqI_it4,36866
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
@@ -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.3.0.dist-info/METADATA,sha256=mT9yXI8m-65eAKN_h3azUy4mlMDo3-DxCG_7bKs0jrk,23052
340
- arize_phoenix-7.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
341
- arize_phoenix-7.3.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
342
- arize_phoenix-7.3.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
343
- arize_phoenix-7.3.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
344
- arize_phoenix-7.3.0.dist-info/RECORD,,
339
+ arize_phoenix-7.3.2.dist-info/METADATA,sha256=dtbRNPAxm-TiFJRemPrGBSpIbZtTI6mrrwzPaJTMPwk,23052
340
+ arize_phoenix-7.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
341
+ arize_phoenix-7.3.2.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
342
+ arize_phoenix-7.3.2.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
343
+ arize_phoenix-7.3.2.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
344
+ arize_phoenix-7.3.2.dist-info/RECORD,,
@@ -52,6 +52,7 @@ from phoenix.server.api.types.GenerativeProvider import GenerativeProviderKey
52
52
  if TYPE_CHECKING:
53
53
  from anthropic.types import MessageParam, TextBlockParam, ToolResultBlockParam
54
54
  from google.generativeai.types import ContentType
55
+ from openai import AsyncAzureOpenAI, AsyncOpenAI
55
56
  from openai.types import CompletionUsage
56
57
  from openai.types.chat import ChatCompletionMessageParam, ChatCompletionMessageToolCallParam
57
58
 
@@ -230,46 +231,18 @@ class PlaygroundStreamingClient(ABC):
230
231
  return self._attributes
231
232
 
232
233
 
233
- @register_llm_client(
234
- provider_key=GenerativeProviderKey.OPENAI,
235
- model_names=[
236
- PROVIDER_DEFAULT,
237
- "gpt-4o",
238
- "gpt-4o-2024-08-06",
239
- "gpt-4o-2024-05-13",
240
- "chatgpt-4o-latest",
241
- "gpt-4o-mini",
242
- "gpt-4o-mini-2024-07-18",
243
- "gpt-4-turbo",
244
- "gpt-4-turbo-2024-04-09",
245
- "gpt-4-turbo-preview",
246
- "gpt-4-0125-preview",
247
- "gpt-4-1106-preview",
248
- "gpt-4",
249
- "gpt-4-0613",
250
- "gpt-3.5-turbo-0125",
251
- "gpt-3.5-turbo",
252
- "gpt-3.5-turbo-1106",
253
- "gpt-3.5-turbo-instruct",
254
- ],
255
- )
256
- class OpenAIStreamingClient(PlaygroundStreamingClient):
234
+ class OpenAIBaseStreamingClient(PlaygroundStreamingClient):
257
235
  def __init__(
258
236
  self,
237
+ *,
238
+ client: Union["AsyncOpenAI", "AsyncAzureOpenAI"],
259
239
  model: GenerativeModelInput,
260
240
  api_key: Optional[str] = None,
261
241
  ) -> None:
262
- from openai import AsyncOpenAI
263
242
  from openai import RateLimitError as OpenAIRateLimitError
264
243
 
265
- # todo: check if custom base url is set before raising error to allow
266
- # for custom endpoints that don't require an API key
267
- if not (api_key := api_key or os.environ.get("OPENAI_API_KEY")):
268
- raise BadRequest("An API key is required for OpenAI models")
269
244
  super().__init__(model=model, api_key=api_key)
270
- self._attributes[LLM_PROVIDER] = OpenInferenceLLMProviderValues.OPENAI.value
271
- self._attributes[LLM_SYSTEM] = OpenInferenceLLMSystemValues.OPENAI.value
272
- self.client = AsyncOpenAI(api_key=api_key)
245
+ self.client = client
273
246
  self.model_name = model.name
274
247
  self.rate_limiter = PlaygroundRateLimiter(model.provider_key, OpenAIRateLimitError)
275
248
 
@@ -473,6 +446,47 @@ class OpenAIStreamingClient(PlaygroundStreamingClient):
473
446
  yield LLM_TOKEN_COUNT_TOTAL, usage.total_tokens
474
447
 
475
448
 
449
+ @register_llm_client(
450
+ provider_key=GenerativeProviderKey.OPENAI,
451
+ model_names=[
452
+ PROVIDER_DEFAULT,
453
+ "gpt-4o",
454
+ "gpt-4o-2024-08-06",
455
+ "gpt-4o-2024-05-13",
456
+ "chatgpt-4o-latest",
457
+ "gpt-4o-mini",
458
+ "gpt-4o-mini-2024-07-18",
459
+ "gpt-4-turbo",
460
+ "gpt-4-turbo-2024-04-09",
461
+ "gpt-4-turbo-preview",
462
+ "gpt-4-0125-preview",
463
+ "gpt-4-1106-preview",
464
+ "gpt-4",
465
+ "gpt-4-0613",
466
+ "gpt-3.5-turbo-0125",
467
+ "gpt-3.5-turbo",
468
+ "gpt-3.5-turbo-1106",
469
+ "gpt-3.5-turbo-instruct",
470
+ ],
471
+ )
472
+ class OpenAIStreamingClient(OpenAIBaseStreamingClient):
473
+ def __init__(
474
+ self,
475
+ model: GenerativeModelInput,
476
+ api_key: Optional[str] = None,
477
+ ) -> None:
478
+ from openai import AsyncOpenAI
479
+
480
+ # todo: check if custom base url is set before raising error to allow
481
+ # for custom endpoints that don't require an API key
482
+ if not (api_key := api_key or os.environ.get("OPENAI_API_KEY")):
483
+ raise BadRequest("An API key is required for OpenAI models")
484
+ client = AsyncOpenAI(api_key=api_key)
485
+ super().__init__(client=client, model=model, api_key=api_key)
486
+ self._attributes[LLM_PROVIDER] = OpenInferenceLLMProviderValues.OPENAI.value
487
+ self._attributes[LLM_SYSTEM] = OpenInferenceLLMSystemValues.OPENAI.value
488
+
489
+
476
490
  @register_llm_client(
477
491
  provider_key=GenerativeProviderKey.OPENAI,
478
492
  model_names=[
@@ -571,7 +585,7 @@ class OpenAIO1StreamingClient(OpenAIStreamingClient):
571
585
  PROVIDER_DEFAULT,
572
586
  ],
573
587
  )
574
- class AzureOpenAIStreamingClient(OpenAIStreamingClient):
588
+ class AzureOpenAIStreamingClient(OpenAIBaseStreamingClient):
575
589
  def __init__(
576
590
  self,
577
591
  model: GenerativeModelInput,
@@ -579,20 +593,20 @@ class AzureOpenAIStreamingClient(OpenAIStreamingClient):
579
593
  ):
580
594
  from openai import AsyncAzureOpenAI
581
595
 
582
- super().__init__(model=model, api_key=api_key)
583
- self._attributes[LLM_PROVIDER] = OpenInferenceLLMProviderValues.AZURE.value
584
- self._attributes[LLM_SYSTEM] = OpenInferenceLLMSystemValues.OPENAI.value
585
596
  if not (api_key := api_key or os.environ.get("AZURE_OPENAI_API_KEY")):
586
597
  raise BadRequest("An Azure API key is required for Azure OpenAI models")
587
598
  if not (endpoint := model.endpoint or os.environ.get("AZURE_OPENAI_ENDPOINT")):
588
599
  raise BadRequest("An Azure endpoint is required for Azure OpenAI models")
589
600
  if not (api_version := model.api_version or os.environ.get("OPENAI_API_VERSION")):
590
601
  raise BadRequest("An OpenAI API version is required for Azure OpenAI models")
591
- self.client = AsyncAzureOpenAI(
602
+ client = AsyncAzureOpenAI(
592
603
  api_key=api_key,
593
604
  azure_endpoint=endpoint,
594
605
  api_version=api_version,
595
606
  )
607
+ super().__init__(client=client, model=model, api_key=api_key)
608
+ self._attributes[LLM_PROVIDER] = OpenInferenceLLMProviderValues.AZURE.value
609
+ self._attributes[LLM_SYSTEM] = OpenInferenceLLMSystemValues.OPENAI.value
596
610
 
597
611
 
598
612
  @register_llm_client(
phoenix/server/main.py CHANGED
@@ -109,7 +109,7 @@ _WELCOME_MESSAGE = Environment(loader=BaseLoader()).from_string("""
109
109
 
110
110
  def _write_pid_file_when_ready(
111
111
  server: Server,
112
- wait_up_to_seconds: float = 5,
112
+ wait_up_to_seconds: float = 60,
113
113
  ) -> None:
114
114
  """Write PID file after server is started (or when time is up)."""
115
115
  time_limit = time() + wait_up_to_seconds
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.3.0"
1
+ __version__ = "7.3.2"