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

@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.3
2
+ Name: arize-phoenix
3
+ Version: 5.5.2
4
+ Summary: AI Observability and Evaluation
5
+ Project-URL: Documentation, https://docs.arize.com/phoenix/
6
+ Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
7
+ Project-URL: Source, https://github.com/Arize-ai/phoenix
8
+ Author-email: Arize AI <phoenix-devs@arize.com>
9
+ License: Elastic-2.0
10
+ License-File: IP_NOTICE
11
+ License-File: LICENSE
12
+ Keywords: Explainability,Monitoring,Observability
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: <3.13,>=3.9
19
+ Requires-Dist: aioitertools
20
+ Requires-Dist: aiosqlite
21
+ Requires-Dist: alembic<2,>=1.3.0
22
+ Requires-Dist: arize-phoenix-evals>=0.13.1
23
+ Requires-Dist: arize-phoenix-otel>=0.5.1
24
+ Requires-Dist: authlib
25
+ Requires-Dist: cachetools
26
+ Requires-Dist: fast-hdbscan>=0.2.0
27
+ Requires-Dist: fastapi
28
+ Requires-Dist: grpc-interceptor
29
+ Requires-Dist: grpcio
30
+ Requires-Dist: httpx
31
+ Requires-Dist: jinja2
32
+ Requires-Dist: numba>=0.60.0
33
+ Requires-Dist: numpy!=2.0.0
34
+ Requires-Dist: openinference-instrumentation>=0.1.12
35
+ Requires-Dist: openinference-semantic-conventions>=0.1.9
36
+ Requires-Dist: opentelemetry-exporter-otlp
37
+ Requires-Dist: opentelemetry-proto>=1.12.0
38
+ Requires-Dist: opentelemetry-sdk
39
+ Requires-Dist: opentelemetry-semantic-conventions
40
+ Requires-Dist: pandas>=1.0
41
+ Requires-Dist: protobuf<6.0,>=3.20.2
42
+ Requires-Dist: psutil
43
+ Requires-Dist: pyarrow
44
+ Requires-Dist: pydantic!=2.0.*,<3,>=1.0
45
+ Requires-Dist: python-multipart
46
+ Requires-Dist: scikit-learn
47
+ Requires-Dist: scipy
48
+ Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.4
49
+ Requires-Dist: sqlean-py>=3.45.1
50
+ Requires-Dist: starlette
51
+ Requires-Dist: strawberry-graphql==0.243.1
52
+ Requires-Dist: tqdm
53
+ Requires-Dist: typing-extensions>=4.6
54
+ Requires-Dist: umap-learn
55
+ Requires-Dist: uvicorn
56
+ Requires-Dist: websockets
57
+ Requires-Dist: wrapt
58
+ Provides-Extra: container
59
+ Requires-Dist: anthropic; extra == 'container'
60
+ Requires-Dist: fast-hdbscan>=0.2.0; extra == 'container'
61
+ Requires-Dist: numba>=0.60.0; extra == 'container'
62
+ Requires-Dist: openai>=1.0.0; extra == 'container'
63
+ Requires-Dist: opentelemetry-exporter-otlp; extra == 'container'
64
+ Requires-Dist: opentelemetry-instrumentation-fastapi; extra == 'container'
65
+ Requires-Dist: opentelemetry-instrumentation-grpc; extra == 'container'
66
+ Requires-Dist: opentelemetry-instrumentation-sqlalchemy; extra == 'container'
67
+ Requires-Dist: opentelemetry-proto>=1.12.0; extra == 'container'
68
+ Requires-Dist: opentelemetry-sdk; extra == 'container'
69
+ Requires-Dist: opentelemetry-semantic-conventions; extra == 'container'
70
+ Requires-Dist: prometheus-client; extra == 'container'
71
+ Requires-Dist: py-grpc-prometheus; extra == 'container'
72
+ Requires-Dist: strawberry-graphql[opentelemetry]==0.243.1; extra == 'container'
73
+ Requires-Dist: umap-learn; extra == 'container'
74
+ Requires-Dist: uvloop; (platform_system != 'Windows') and extra == 'container'
75
+ Provides-Extra: dev
76
+ Requires-Dist: anthropic; extra == 'dev'
77
+ Requires-Dist: arize[autoembeddings,llm-evaluation]; extra == 'dev'
78
+ Requires-Dist: asgi-lifespan; extra == 'dev'
79
+ Requires-Dist: asyncpg; extra == 'dev'
80
+ Requires-Dist: faker>=30.1.0; extra == 'dev'
81
+ Requires-Dist: gcsfs; extra == 'dev'
82
+ Requires-Dist: google-cloud-aiplatform>=1.3; extra == 'dev'
83
+ Requires-Dist: grpc-interceptor[testing]; extra == 'dev'
84
+ Requires-Dist: hatch; extra == 'dev'
85
+ Requires-Dist: jupyter; extra == 'dev'
86
+ Requires-Dist: langchain>=0.0.334; extra == 'dev'
87
+ Requires-Dist: litellm>=1.0.3; extra == 'dev'
88
+ Requires-Dist: llama-index>=0.10.3; extra == 'dev'
89
+ Requires-Dist: mypy==1.11.2; extra == 'dev'
90
+ Requires-Dist: nbqa; extra == 'dev'
91
+ Requires-Dist: pandas-stubs==2.2.2.240603; extra == 'dev'
92
+ Requires-Dist: pandas>=1.0; extra == 'dev'
93
+ Requires-Dist: portpicker; extra == 'dev'
94
+ Requires-Dist: pre-commit; extra == 'dev'
95
+ Requires-Dist: prometheus-client; extra == 'dev'
96
+ Requires-Dist: psycopg[binary,pool]; extra == 'dev'
97
+ Requires-Dist: pytest-asyncio; extra == 'dev'
98
+ Requires-Dist: pytest-cov; extra == 'dev'
99
+ Requires-Dist: pytest-postgresql; extra == 'dev'
100
+ Requires-Dist: pytest-xdist; extra == 'dev'
101
+ Requires-Dist: pytest==8.3.3; extra == 'dev'
102
+ Requires-Dist: ruff==0.6.9; extra == 'dev'
103
+ Requires-Dist: strawberry-graphql[debug-server,opentelemetry]==0.243.1; extra == 'dev'
104
+ Requires-Dist: tabulate; extra == 'dev'
105
+ Requires-Dist: tox-uv==1.11.3; extra == 'dev'
106
+ Requires-Dist: tox==4.18.1; extra == 'dev'
107
+ Requires-Dist: types-tabulate; extra == 'dev'
108
+ Requires-Dist: uv==0.4.8; extra == 'dev'
109
+ Requires-Dist: uvloop; (platform_system != 'Windows') and extra == 'dev'
110
+ Provides-Extra: embeddings
111
+ Requires-Dist: fast-hdbscan>=0.2.0; extra == 'embeddings'
112
+ Requires-Dist: numba>=0.60.0; extra == 'embeddings'
113
+ Requires-Dist: umap-learn; extra == 'embeddings'
114
+ Provides-Extra: evals
115
+ Provides-Extra: experimental
116
+ Provides-Extra: llama-index
117
+ Requires-Dist: llama-index-agent-openai>=0.2.7; extra == 'llama-index'
118
+ Requires-Dist: llama-index-embeddings-openai>=0.1.10; extra == 'llama-index'
119
+ Requires-Dist: llama-index-llms-openai>=0.1.24; extra == 'llama-index'
120
+ Requires-Dist: llama-index-readers-file>=0.1.25; extra == 'llama-index'
121
+ Requires-Dist: llama-index==0.11.0; extra == 'llama-index'
122
+ Provides-Extra: pg
123
+ Requires-Dist: asyncpg; extra == 'pg'
124
+ Requires-Dist: psycopg[binary,pool]; extra == 'pg'
125
+ Provides-Extra: test
126
+ Description-Content-Type: text/markdown
127
+
128
+ <p align="center">
129
+ <a target="_blank" href="https://phoenix.arize.com" style="background:none">
130
+ <img alt="phoenix banner" src="https://github.com/Arize-ai/phoenix-assets/blob/main/images/socal/github-large-banner-phoenix.jpg?raw=true" width="auto" height="auto"></img>
131
+ </a>
132
+ <br/>
133
+ <br/>
134
+ <a href="https://docs.arize.com/phoenix/">
135
+ <img src="https://img.shields.io/static/v1?message=Docs&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAG4ElEQVR4nO2d4XHjNhCFcTf+b3ZgdWCmgmMqOKUC0xXYrsBOBVEqsFRB7ApCVRCygrMriFQBM7h5mNlwKBECARLg7jeDscamSQj7sFgsQfBL27ZK4MtXsT1vRADMEQEwRwTAHBEAc0QAzBEBMEcEwBwRAHNEAMwRATBnjAByFGE+MqVUMcYOY24GVUqpb/h8VErVKAf87QNFcEcbd4WSw+D6803njHscO5sATmGEURGBiCj6yUlv1uX2gv91FsDViArbcA2RUKF8QhAV8RQc0b15DcOt0VaTE1oAfWj3dYdCBfGGsmSM0XX5HsP3nEMAXbqCeCdiOERQPx9og5exGJ0S4zRQN9KrUupfpdQWjZciure/YIj7K0bjqwTyAHdovA805iqCOg2xgnB1nZ97IvaoSCURdIPG/IHGjTH/YAz/A8KdJai7lBQzgbpx/0Hg6DT18UzWMXxSjMkDrElPNEmKfAbl6znwI3IMU/OCa0/1nfckwWaSbvWYYDnEsvCMJDNckhqu7GCMKWYOBXp9yPGd5kvqUAKf6rkAk7M2SY9QDXdEr9wEOr9x96EiejMFnixBNteDISsyNw7hHRqc22evWcP4vt39O85bzZH30AKg4+eo8cQRI4bHAJ7hyYM3CNHrG9RrimSXuZmUkZjN/O6nAPpcwCcJNmipAle2QM/1GU3vITCXhvY91u9geN/jOY27VuTnYL1PCeAcRhwh7/Bl8Ai+IuxPiOCShtfX/sPDtY8w+sZjby86dw6dBeoigD7obd/Ko6fI4BF8DA9HnGdrcU0fLt+n4dfE6H5jpjYcVdu2L23b5lpjHoo+18FDbcszddF1rUee/4C6ZiO+80rHZmjDoIQUQLdRtm3brkcKIUPjjqVPBIUHgW1GGN4YfawAL2IqAVB8iEE31tvIelARlCPPVaFOLoIupzY6xVcM4MoRUyHXyHhslH6PaPl5RP1Lh4UsOeKR2e8dzC0Aiuvc2Nx3fwhfxf/hknouUYbWUk5GTAIwmOh5e+H0cor8vEL91hfOdEqINLq1AV+RKImJ6869f9tFIBVc6y7gd3lHfWyNX0LEr7EuDElhRdAlQjig0e/RU31xxDltM4pF7IY3pLIgxAhhgzF/iC2M0Hi4dkOGlyGMd/g7dsMbUlsR9ICe9WhxbA3DjRkSdjiHzQzlBSKNJsCzIcUlYdfI0dcWS8LMkPDkcJ0n/O+Qyy/IAtDkSPnp4Fu4WpthQR/zm2VcoI/51fI28iYld9/HEh4Pf7D0Bm845pwIPnHMUJSf45pT5x68s5T9AW6INzhHDeP1BYcNMew5SghkinWOwVnaBhHGG5ybMn70zBDe8buh8X6DqV0Sa/5tWOIOIbcWQ8KBiGBnMb/P0OuTd/lddCrY5jn/VLm3nL+fY4X4YREuv8vS9wh6HSkAExMs0viKySZRd44iyOH2FzPe98Fll7A7GNMmjay4GF9BAKGXesfCN0sRsDG+YrhP4O2ACFgZXzHdKPL2RMJoxc34ivFOod3AMMNUj5XxFfOtYrUIXvB5MandS+G+V/AzZ+MrEcBPlpoFtUIEwBwRAG+OIgDe1CIA5ogAmCMCYI4IgDkiAOaIAJgjAmCOCIA5IgDmiACYIwJgjgiAOSIA5ogAmCMCYI4IgDkiAOaIAJgjAmCOCIA5IgDmiACYIwJgjgiAOSIA5ogAmCMCYI4IgDkiAOaIAJgjAmDOVYBXvwvxQV8NWJOd0esvJ94babZaz7B5ovldxnlDpYhp0JFr/KTlLKcEMMQKpcDPXIQxGXsYmhZnXAXQh/EWBQrr3bc80mATyyrEvs4+BdBHgbdxFOIhrDkSg1/6Iu2LCS0AyoqI4ftUF00EY/Q3h1fRj2JKAVCMGErmnsH1lfnemEsAlByvgl0z2qx5B8OPCuB8EIMADBlEEOV79j1whNE3c/X2PmISAGUNr7CEmUSUhjfEKgBDAY+QohCiNrwhdgEYzPv7UxkadvBg0RrekMrNoAozh3vLN4DPhc7S/WL52vkoSO1u4BZC+DOCulC0KJ/gqWaP7C8hlSGgjxyCmDuPsEePT/KuasrrAcyr4H+f6fq01yd7Sz1lD0CZ2hs06PVJufs+lrIiyLwufjfBtXYpjvWnWIoHoJSYe4dIK/t4HX1ULFEACkPCm8e8wXFJvZ6y1EWhJkDcWxw7RINzLc74auGrgg8e4oIm9Sh/CA7LwkvHqaIJ9pLI6Lmy1BigDy2EV8tjdzh+8XB6MGSLKH4INsZXDJ8MGhIBK+Mrpo+GnRIBO+MrZjFAFxoTNBwCvj6u4qvSZJiM3iNX4yvmHoA9Sh4PF0QAzBEBMEcEwBwRAHNEAMwRAXBGKfUfr5hKvglRfO4AAAAASUVORK5CYII=&labelColor=grey&color=blue&logoColor=white&label=%20"/>
136
+ </a>
137
+ <a target="_blank" href="https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q">
138
+ <img src="https://img.shields.io/static/v1?message=Community&logo=slack&labelColor=grey&color=blue&logoColor=white&label=%20"/>
139
+ </a>
140
+ <a target="_blank" href="https://twitter.com/ArizePhoenix">
141
+ <img src="https://img.shields.io/badge/-ArizePhoenix-blue.svg?color=blue&labelColor=gray&logo=twitter">
142
+ </a>
143
+ <a target="_blank" href="https://pypi.org/project/arize-phoenix/">
144
+ <img src="https://img.shields.io/pypi/v/arize-phoenix?color=blue">
145
+ </a>
146
+ <a target="_blank" href="https://anaconda.org/conda-forge/arize-phoenix">
147
+ <img src="https://img.shields.io/conda/vn/conda-forge/arize-phoenix.svg?color=blue">
148
+ </a>
149
+ <a target="_blank" href="https://pypi.org/project/arize-phoenix/">
150
+ <img src="https://img.shields.io/pypi/pyversions/arize-phoenix">
151
+ </a>
152
+ <a target="_blank" href="https://hub.docker.com/r/arizephoenix/phoenix/tags">
153
+ <img src="https://img.shields.io/docker/v/arizephoenix/phoenix?sort=semver&logo=docker&label=image&color=blue">
154
+ </a>
155
+ </p>
156
+
157
+ Phoenix is an open-source AI observability platform designed for experimentation, evaluation, and troubleshooting. It provides:
158
+
159
+ - [**_Tracing_**](https://docs.arize.com/phoenix/tracing/integrations-tracing/llm-traces) - Trace your LLM application's runtime using OpenTelemetry-based instrumentation.
160
+ - [**_Evaluation_**](https://docs.arize.com/phoenix/evaluation/llm-evals) - Leverage LLMs to benchmark your application's performance using response and retrieval evals.
161
+ - [**_Datasets_**](https://docs.arize.com/phoenix/datasets-and-experiments/overview-datasets) - Create versioned datasets of examples for experimentation, evaluation, and fine-tuning.
162
+ - [**_Experiments_**](https://docs.arize.com/phoenix/datasets-and-experiments/overview-datasets#experiments) - Track and evaluate changes to prompts, LLMs, and retrieval.
163
+
164
+ Phoenix is vendor and language agnostic with out-of-the-box support for popular frameworks (🦙[LlamaIndex](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/llamaindex), 🦜⛓[LangChain](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/langchain), [Haystack](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/haystack), 🧩[DSPy](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/dspy)) and LLM providers ([OpenAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/openai), [Bedrock](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/bedrock), [MistralAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/mistralai), [VertexAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/vertexai), [LiteLLM](https://docs.arize.com/phoenix/tracing/integrations-tracing/integrations-tracing/litellm), and more). For details on auto-instrumentation, check out the [OpenInference](https://github.com/Arize-ai/openinference) project.
165
+
166
+ Phoenix runs practically anywhere, including your Jupyter notebook, local machine, containerized deployment, or in the cloud.
167
+
168
+ <img alt="phoenix_overview.gif" width="100%" src="https://github.com/Arize-ai/phoenix-assets/blob/main/gifs/phoenix_overview.gif?raw=true">
169
+
170
+ ## Installation
171
+
172
+ Install Phoenix via `pip` or `conda`
173
+
174
+ ```shell
175
+ pip install arize-phoenix
176
+ ```
177
+
178
+ Phoenix container images are available via [Docker Hub](https://hub.docker.com/r/arizephoenix/phoenix) and can be deployed using Docker or Kubernetes.
179
+
180
+ ## Features
181
+
182
+ | Key Features | Availability |
183
+ | ---------------------------------------------------------------------------------------------------------------- | -------------- |
184
+ | [Tracing](https://docs.arize.com/phoenix/tracing/concepts-tracing/what-are-traces) | ✅ |
185
+ | [Evaluation](https://docs.arize.com/phoenix/evaluation/llm-evals) | ✅ |
186
+ | [Retrieval (RAG) Analysis](https://docs.arize.com/phoenix/tracing/use-cases-tracing/rag-evaluation) | ✅ |
187
+ | [Datasets](https://docs.arize.com/phoenix/datasets-and-experiments/overview-datasets) | ✅ |
188
+ | [Fine-Tuning Export](https://docs.arize.com/phoenix/datasets-and-experiments/how-to-datasets/exporting-datasets) | ✅ |
189
+ | [Annotations](https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-annotate-traces) | ✅ |
190
+ | [Human Feedback](https://docs.arize.com/phoenix/tracing/how-to-tracing/capture-feedback) | ✅ |
191
+ | [Experiments](https://docs.arize.com/phoenix/datasets-and-experiments/how-to-experiments/run-experiments) | ✅ |
192
+ | [Embeddings Analysis](https://docs.arize.com/phoenix/inferences/phoenix-inferences) | ✅ |
193
+ | [Data Export](https://docs.arize.com/phoenix/tracing/how-to-tracing/extract-data-from-spans) | ✅ |
194
+ | REST API | ✅ |
195
+ | GraphQL API | ✅ |
196
+ | Data Retention | Costomizable |
197
+ | Authentication | ✅ |
198
+ | Social Login | ✅ |
199
+ | RBAC | ✅ |
200
+ | Projects | ✅ |
201
+ | [Self-Hosting](https://docs.arize.com/phoenix/deployment) | ✅ |
202
+ | Jupyter Notebooks | ✅ |
203
+ | [Sessions](https://github.com/Arize-ai/phoenix/issues/2619) | In Progress 🚧 |
204
+ | [Prompt Playground](https://github.com/Arize-ai/phoenix/issues/3435) | In Progress 🚧 |
205
+ | Prompt Management | Coming soon ⏱️ |
206
+
207
+ ## Tracing Integrations
208
+
209
+ Phoenix is built on top of OpenTelemetry and is vendor, language, and framework agnostic.
210
+
211
+ **Python**
212
+ | Integration | Package | Version Badge |
213
+ |------------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
214
+ | [OpenAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/openai) | `openinference-instrumentation-openai` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-openai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-openai) |
215
+ | [LlamaIndex](https://docs.arize.com/phoenix/tracing/integrations-tracing/llamaindex) | `openinference-instrumentation-llama-index` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-llama-index.svg)](https://pypi.python.org/pypi/openinference-instrumentation-llama-index) |
216
+ | [DSPy](https://docs.arize.com/phoenix/tracing/integrations-tracing/dspy) | `openinference-instrumentation-dspy` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-dspy.svg)](https://pypi.python.org/pypi/openinference-instrumentation-dspy) |
217
+ | [AWS Bedrock](https://docs.arize.com/phoenix/tracing/integrations-tracing/bedrock) | `openinference-instrumentation-bedrock` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-bedrock.svg)](https://pypi.python.org/pypi/openinference-instrumentation-bedrock) |
218
+ | [LangChain](https://docs.arize.com/phoenix/tracing/integrations-tracing/langchain) | `openinference-instrumentation-langchain` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-langchain.svg)](https://pypi.python.org/pypi/openinference-instrumentation-langchain) |
219
+ | [MistralAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/mistralai) | `openinference-instrumentation-mistralai` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-mistralai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-mistralai) |
220
+ | [Guardrails](https://docs.arize.com/phoenix/tracing/integrations-tracing/guardrails) | `openinference-instrumentation-guardrails` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-guardrails.svg)](https://pypi.python.org/pypi/openinference-instrumentation-guardrails) |
221
+ | [VertexAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/vertexai) | `openinference-instrumentation-vertexai` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-vertexai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-vertexai) |
222
+ | [CrewAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/crewai) | `openinference-instrumentation-crewai` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-crewai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-crewai) |
223
+ | [Haystack](https://docs.arize.com/phoenix/tracing/integrations-tracing/haystack) | `openinference-instrumentation-haystack` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-haystack.svg)](https://pypi.python.org/pypi/openinference-instrumentation-haystack) |
224
+ | [LiteLLM](https://docs.arize.com/phoenix/tracing/integrations-tracing/litellm) | `openinference-instrumentation-litellm` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-litellm.svg)](https://pypi.python.org/pypi/openinference-instrumentation-litellm) |
225
+ | [Groq](https://docs.arize.com/phoenix/tracing/integrations-tracing/groq) | `openinference-instrumentation-groq` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-groq.svg)](https://pypi.python.org/pypi/openinference-instrumentation-groq) |
226
+ | [Instructor](https://docs.arize.com/phoenix/tracing/integrations-tracing/instructor) | `openinference-instrumentation-instructor` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-instructor.svg)](https://pypi.python.org/pypi/openinference-instrumentation-instructor) |
227
+ | [Anthropic](https://docs.arize.com/phoenix/tracing/integrations-tracing/anthropic) | `openinference-instrumentation-anthropic` | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-anthropic.svg)](https://pypi.python.org/pypi/openinference-instrumentation-anthropic) |
228
+
229
+ ### JavaScript
230
+
231
+ | Integration | Package | Version Badge |
232
+ | ------------------------------------------------------------------------------------------ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
233
+ | [OpenAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/openai-node-sdk) | `@arizeai/openinference-instrumentation-openai` | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-openai.svg)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-openai) |
234
+ | [LangChain.js](https://docs.arize.com/phoenix/tracing/integrations-tracing/langchain.js) | `@arizeai/openinference-instrumentation-langchain` | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-langchain.svg)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-langchain) |
235
+ | [Vercel AI SDK](https://docs.arize.com/phoenix/tracing/integrations-tracing/vercel-ai-sdk) | `@arizeai/openinference-vercel` | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-vercel)](https://www.npmjs.com/package/@arizeai/openinference-vercel) |
236
+
237
+ For details about tracing integrations and example applications, see the [OpenInference](https://github.com/Arize-ai/openinference) project.
238
+
239
+ ## Community
240
+
241
+ Join our community to connect with thousands of AI builders.
242
+
243
+ - 🌍 Join our [Slack community](https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q).
244
+ - 📚 Read our [documentation](https://docs.arize.com/phoenix).
245
+ - 💡 Ask questions and provide feedback in the _#phoenix-support_ channel.
246
+ - 🌟 Leave a star on our [GitHub](https://github.com/Arize-ai/phoenix).
247
+ - 🐞 Report bugs with [GitHub Issues](https://github.com/Arize-ai/phoenix/issues).
248
+ - 𝕏 Follow us on [𝕏](https://twitter.com/ArizePhoenix).
249
+ - 💌️ Sign up for our [mailing list](https://phoenix.arize.com/#updates).
250
+ - 🗺️ Check out our [roadmap](https://github.com/orgs/Arize-ai/projects/45) to see where we're heading next.
251
+
252
+ ## Breaking Changes
253
+
254
+ See the [migration guide](./MIGRATION.md) for a list of breaking changes.
255
+
256
+ ## Copyright, Patent, and License
257
+
258
+ Copyright 2024 Arize AI, Inc. All Rights Reserved.
259
+
260
+ Portions of this code are patent protected by one or more U.S. Patents. See [IP_NOTICE](https://github.com/Arize-ai/phoenix/blob/main/IP_NOTICE).
261
+
262
+ This software is licensed under the terms of the Elastic License 2.0 (ELv2). See [LICENSE](https://github.com/Arize-ai/phoenix/blob/main/LICENSE).
@@ -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=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
8
8
  phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
9
- phoenix/version.py,sha256=zFTHldBmR5ReiC3uSZ8VkZOEirtsq_l6QbUJYRBHlTs,22
9
+ phoenix/version.py,sha256=vl13_Lbg7AAVBthvzO3KNnmOZGWuzVyvcvsF6ToMYjs,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=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
@@ -94,7 +94,7 @@ phoenix/server/api/exceptions.py,sha256=TA0JuY2YRnj35qGuMSQ8d0ToHum9gWm9W--3fSKH
94
94
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
95
95
  phoenix/server/api/queries.py,sha256=sE_w4X9sz0QJBGNQbOMgiZiKpR24jvxCpv6AQeGeE9Y,27153
96
96
  phoenix/server/api/schema.py,sha256=JKxcZd0UBX6VnVic9tnKAzehJ2fGYNWAu6Gr1tR1PMI,637
97
- phoenix/server/api/subscriptions.py,sha256=hxIj8WRNk1m1aXVW7PDlpPt5TwRGNbjp2yxibRZRqrc,21972
97
+ phoenix/server/api/subscriptions.py,sha256=KonHIiG1aJURJDTB32UbnBrVE5gQGa1A0c_vRL6XNM8,22014
98
98
  phoenix/server/api/utils.py,sha256=Kl47G-1A7QKTDrc75BU2QK6HupsG6MWuXxy351FOfKQ,858
99
99
  phoenix/server/api/dataloaders/__init__.py,sha256=jNYvfXjnZzgA2HWTG7AZdqWGla3ZysBUDUei8Zkz6N8,3290
100
100
  phoenix/server/api/dataloaders/annotation_summaries.py,sha256=Wv8AORZoGd5TJ4Y-em8iqJu87AMpZP7lWOTr-SML-x8,5560
@@ -264,13 +264,13 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
264
264
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
265
265
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
266
266
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
267
- phoenix/server/static/.vite/manifest.json,sha256=ifveuWhOubKDOfkJLSeHrUMz3kwtdip_8ctJ4KPRfP8,1929
268
- phoenix/server/static/assets/components-DOjuTDx9.js,sha256=JXFIP0SiBdyEvvh53dKsdoi-6o1lOUFY_IIMsGBwMxg,272352
269
- phoenix/server/static/assets/index-C15MiAe0.js,sha256=pM97A7RT-WTM1F2TqKVvP8VgNWGHC7OehcBqq-sjzR4,7162
270
- phoenix/server/static/assets/pages-uwuWR0d3.js,sha256=GWoWNnx_8-q56uUQWbBRM_fZv8zxw1ZZXvWbog8Q0-0,591038
267
+ phoenix/server/static/.vite/manifest.json,sha256=04jiawZ5u-FNWR_G7rrydLX_qTLyYMDkQTwD-p95o_Y,1929
268
+ phoenix/server/static/assets/components-hX0LgYz3.js,sha256=bn3nQo8PqCGI6T9MYj1ExJFVNUNKJCnh-kORyaCP7f4,272352
269
+ phoenix/server/static/assets/index-DCzakdJq.js,sha256=QEOwgnbJRY8RqMpneofzjT7oJiWNdoC92OsjeUyFOrk,7162
270
+ phoenix/server/static/assets/pages-CAL1FDMt.js,sha256=cH6wnsLfDT_4PVcuvaLgxuT_rgkfZR8uX37GRHMR-lw,591078
271
271
  phoenix/server/static/assets/vendor-6IcPAw_j.js,sha256=kA0afCcdEfjdTlLbngra3925MiR8wVgYF5d7XBBViXQ,10898278
272
272
  phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
273
- phoenix/server/static/assets/vendor-arizeai-uC2sozJ6.js,sha256=o5Su5D9_jBumfVpDXwuQC7Hzpkze4LlvVA9t0Pvh1pk,306512
273
+ phoenix/server/static/assets/vendor-arizeai-DRZuoyuF.js,sha256=5ez27BH_vNwmvWszKH4Z1MGvgc-pJLWqwFkdOW0UxxU,307006
274
274
  phoenix/server/static/assets/vendor-codemirror-DVE2_WBr.js,sha256=AxNgfQZIek1HfON1zHobnrzHzgBeLHWu6GCltpvct9U,392705
275
275
  phoenix/server/static/assets/vendor-recharts-DwrexFA4.js,sha256=QSkNeG0tfn_fdrjYf-dRBXVygFjusBsyxzQ-lepdH8w,282859
276
276
  phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
@@ -313,9 +313,9 @@ phoenix/utilities/project.py,sha256=8IJuMM4yUMoooPi37sictGj8Etu9rGmq6RFtc9848cQ,
313
313
  phoenix/utilities/re.py,sha256=nr_B0txj_7CXc45953X6vr2KCRSWMuaXJSEkL8s8Sjc,2036
314
314
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
315
315
  phoenix/utilities/template_formatters.py,sha256=zWY6gjAMmspYqlmn-ZjKeY5SExylwePk7a1BUdDxVGI,2236
316
- arize_phoenix-5.5.0.dist-info/METADATA,sha256=F32DnF7HFmK_M0NKDsD5mXY91llrxN1Php04_nmzo40,12099
317
- arize_phoenix-5.5.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
318
- arize_phoenix-5.5.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
319
- arize_phoenix-5.5.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
320
- arize_phoenix-5.5.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
321
- arize_phoenix-5.5.0.dist-info/RECORD,,
316
+ arize_phoenix-5.5.2.dist-info/METADATA,sha256=qmTPgRbReiWjyZ2P_PPiAdN4ZWTuqeKdj5FeIivbT7o,22748
317
+ arize_phoenix-5.5.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
318
+ arize_phoenix-5.5.2.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
319
+ arize_phoenix-5.5.2.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
320
+ arize_phoenix-5.5.2.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
321
+ arize_phoenix-5.5.2.dist-info/RECORD,,
@@ -1,8 +1,7 @@
1
1
  import json
2
2
  from abc import ABC, abstractmethod
3
3
  from collections import defaultdict
4
- from dataclasses import fields
5
- from datetime import datetime
4
+ from datetime import datetime, timezone
6
5
  from enum import Enum
7
6
  from itertools import chain
8
7
  from typing import (
@@ -355,7 +354,6 @@ class Subscription:
355
354
  )
356
355
  tracer = tracer_provider.get_tracer(__name__)
357
356
  span_name = "ChatCompletion"
358
-
359
357
  with tracer.start_span(
360
358
  span_name,
361
359
  attributes=dict(
@@ -480,9 +478,11 @@ def _llm_token_counts(usage: "CompletionUsage") -> Iterator[Tuple[str, Any]]:
480
478
 
481
479
 
482
480
  def _input_value_and_mime_type(input: ChatCompletionInput) -> Iterator[Tuple[str, Any]]:
483
- assert any(field.name == (api_key := "api_key") for field in fields(ChatCompletionInput))
481
+ assert (api_key := "api_key") in (input_data := jsonify(input))
482
+ input_data = {k: v for k, v in input_data.items() if k != api_key}
483
+ assert api_key not in input_data
484
484
  yield INPUT_MIME_TYPE, JSON
485
- yield INPUT_VALUE, safe_json_dumps({k: v for k, v in jsonify(input).items() if k != api_key})
485
+ yield INPUT_VALUE, safe_json_dumps(input_data)
486
486
 
487
487
 
488
488
  def _output_value_and_mime_type(output: Any) -> Iterator[Tuple[str, Any]]:
@@ -530,7 +530,7 @@ def _datetime(*, epoch_nanoseconds: float) -> datetime:
530
530
  Converts a Unix epoch timestamp in nanoseconds to a datetime.
531
531
  """
532
532
  epoch_seconds = epoch_nanoseconds / 1e9
533
- return datetime.fromtimestamp(epoch_seconds)
533
+ return datetime.fromtimestamp(epoch_seconds).replace(tzinfo=timezone.utc)
534
534
 
535
535
 
536
536
  def _formatted_messages(
@@ -1,22 +1,22 @@
1
1
  {
2
- "_components-DOjuTDx9.js": {
3
- "file": "assets/components-DOjuTDx9.js",
2
+ "_components-hX0LgYz3.js": {
3
+ "file": "assets/components-hX0LgYz3.js",
4
4
  "name": "components",
5
5
  "imports": [
6
6
  "_vendor-6IcPAw_j.js",
7
- "_vendor-arizeai-uC2sozJ6.js",
8
- "_pages-uwuWR0d3.js",
7
+ "_vendor-arizeai-DRZuoyuF.js",
8
+ "_pages-CAL1FDMt.js",
9
9
  "_vendor-three-DwGkEfCM.js",
10
10
  "_vendor-codemirror-DVE2_WBr.js"
11
11
  ]
12
12
  },
13
- "_pages-uwuWR0d3.js": {
14
- "file": "assets/pages-uwuWR0d3.js",
13
+ "_pages-CAL1FDMt.js": {
14
+ "file": "assets/pages-CAL1FDMt.js",
15
15
  "name": "pages",
16
16
  "imports": [
17
17
  "_vendor-6IcPAw_j.js",
18
- "_vendor-arizeai-uC2sozJ6.js",
19
- "_components-DOjuTDx9.js",
18
+ "_vendor-arizeai-DRZuoyuF.js",
19
+ "_components-hX0LgYz3.js",
20
20
  "_vendor-recharts-DwrexFA4.js",
21
21
  "_vendor-codemirror-DVE2_WBr.js"
22
22
  ]
@@ -35,8 +35,8 @@
35
35
  "assets/vendor-DxkFTwjz.css"
36
36
  ]
37
37
  },
38
- "_vendor-arizeai-uC2sozJ6.js": {
39
- "file": "assets/vendor-arizeai-uC2sozJ6.js",
38
+ "_vendor-arizeai-DRZuoyuF.js": {
39
+ "file": "assets/vendor-arizeai-DRZuoyuF.js",
40
40
  "name": "vendor-arizeai",
41
41
  "imports": [
42
42
  "_vendor-6IcPAw_j.js"
@@ -61,15 +61,15 @@
61
61
  "name": "vendor-three"
62
62
  },
63
63
  "index.tsx": {
64
- "file": "assets/index-C15MiAe0.js",
64
+ "file": "assets/index-DCzakdJq.js",
65
65
  "name": "index",
66
66
  "src": "index.tsx",
67
67
  "isEntry": true,
68
68
  "imports": [
69
69
  "_vendor-6IcPAw_j.js",
70
- "_vendor-arizeai-uC2sozJ6.js",
71
- "_pages-uwuWR0d3.js",
72
- "_components-DOjuTDx9.js",
70
+ "_vendor-arizeai-DRZuoyuF.js",
71
+ "_pages-CAL1FDMt.js",
72
+ "_components-hX0LgYz3.js",
73
73
  "_vendor-three-DwGkEfCM.js",
74
74
  "_vendor-recharts-DwrexFA4.js",
75
75
  "_vendor-codemirror-DVE2_WBr.js"
@@ -1,4 +1,4 @@
1
- import{r as p,R as j,j as e,n as tn,a as ue,e as Ke,s as n1,b as Ze,c as me,d as c1,f as kt,g as oe,h as St,i as xt,k as d1,l as s,m as Mt,o as Te,C as Qe,p as Oe,q as De,t as X,u as Tt,v as It,w as an,x as m,L as rn,y as Et,N as Vt,z as Pt,A as Ot,$ as D,B as qe,D as Dt,E as _t,F as Ft,G as At,H as V1,I as de,J as ge,K as Rt,M as ln,S as Nt,O as zt,Q as P1,P as Ht,T as Kt,U as $t,V as t1,W as h1,X as Bt,Y as Zt,Z as Gt,_ as Qt,a0 as Ut,a1 as Wt,a2 as jt,a3 as qt,a4 as Xt,a5 as _e,a6 as _,a7 as on,a8 as Yt,a9 as Jt,aa as ea,ab as na,ac as ta,ad as aa,ae as ra,af as sn,ag as cn,ah as dn,ai as Y,aj as ia}from"./vendor-6IcPAw_j.js";import{u as la,A as oa,I as E,a as S,_ as un,b as y,c as M,d as v,e as H,f as q,T as $,g as sa,h as ee,i as we,j as P,F as mn,k as N,l as ca,m as da,P as ua,R as U,n as Fe,o as ma,p as pa,L as fe,q as ne,r as te,s as Ae,t as pn,v as hn,E as gn,w as ha,x as ga,y as fa,z as La,B as fn,C as g1,D as Ca,G as ba,H as O1,J as ya}from"./vendor-arizeai-uC2sozJ6.js";import{u as va}from"./pages-uwuWR0d3.js";import{V as wa}from"./vendor-three-DwGkEfCM.js";import{j as Ln,E as Cn,l as u1,a as bn,h as ka,b as Sa,c as xa,d as Ma,e as Ta,f as Ia,s as Ea,R as Re,g as yn,n as Ne,p as Va,i as Pa,L as vn,k as wn}from"./vendor-codemirror-DVE2_WBr.js";const kn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},i={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],o=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,r,i],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:o,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,r,i],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:o},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
1
+ import{r as p,R as j,j as e,n as tn,a as ue,e as Ke,s as n1,b as Ze,c as me,d as c1,f as kt,g as oe,h as St,i as xt,k as d1,l as s,m as Mt,o as Te,C as Qe,p as Oe,q as De,t as X,u as Tt,v as It,w as an,x as m,L as rn,y as Et,N as Vt,z as Pt,A as Ot,$ as D,B as qe,D as Dt,E as _t,F as Ft,G as At,H as V1,I as de,J as ge,K as Rt,M as ln,S as Nt,O as zt,Q as P1,P as Ht,T as Kt,U as $t,V as t1,W as h1,X as Bt,Y as Zt,Z as Gt,_ as Qt,a0 as Ut,a1 as Wt,a2 as jt,a3 as qt,a4 as Xt,a5 as _e,a6 as _,a7 as on,a8 as Yt,a9 as Jt,aa as ea,ab as na,ac as ta,ad as aa,ae as ra,af as sn,ag as cn,ah as dn,ai as Y,aj as ia}from"./vendor-6IcPAw_j.js";import{u as la,A as oa,I as E,a as S,_ as un,b as y,c as M,d as v,e as H,f as q,T as $,g as sa,h as ee,i as we,j as P,F as mn,k as N,l as ca,m as da,P as ua,R as U,n as Fe,o as ma,p as pa,L as fe,q as ne,r as te,s as Ae,t as pn,v as hn,E as gn,w as ha,x as ga,y as fa,z as La,B as fn,C as g1,D as Ca,G as ba,H as O1,J as ya}from"./vendor-arizeai-DRZuoyuF.js";import{u as va}from"./pages-CAL1FDMt.js";import{V as wa}from"./vendor-three-DwGkEfCM.js";import{j as Ln,E as Cn,l as u1,a as bn,h as ka,b as Sa,c as xa,d as Ma,e as Ta,f as Ia,s as Ea,R as Re,g as yn,n as Ne,p as Va,i as Pa,L as vn,k as wn}from"./vendor-codemirror-DVE2_WBr.js";const kn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},i={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],o=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,r,i],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:o,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,r,i],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:o},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
2
2
  $clusters: [ClusterInput!]!
3
3
  $fetchDataQualityMetric: Boolean!
4
4
  $dataQualityMetricColumnName: String
@@ -1,4 +1,4 @@
1
- import{j as e,x as h,b7 as x,du as b,dv as f,l as n,dw as r,dx as y,dy as P,r as v,t as w,dz as R}from"./vendor-6IcPAw_j.js";import{v as L,a4 as z}from"./vendor-arizeai-uC2sozJ6.js";import{E as k,L as E,R as $,r as j,a as I,F as S,A,b as C,c as F,P as T,h as O,M as D,d,D as B,e as G,f as M,g as N,i as W,j as q,T as H,p as _,k as c,l as J,m as K,n as p,o as Q,q as m,s as g,t as U,v as V,w as X,x as Y,y as Z,z as ee,S as re,B as ae,C as oe,G as te,H as ne,I as se,J as le}from"./pages-uwuWR0d3.js";import{bG as ie,j as de,R as ce,bH as pe,bI as me}from"./components-DOjuTDx9.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-DwrexFA4.js";import"./vendor-codemirror-DVE2_WBr.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ge(){return e(x,{styles:a=>h`
1
+ import{j as e,x as h,b7 as x,du as b,dv as f,l as n,dw as r,dx as y,dy as P,r as v,t as w,dz as R}from"./vendor-6IcPAw_j.js";import{v as L,a4 as z}from"./vendor-arizeai-DRZuoyuF.js";import{E as k,L as E,R as $,r as j,a as I,F as S,A,b as C,c as F,P as T,h as O,M as D,d,D as B,e as G,f as M,g as N,i as W,j as q,T as H,p as _,k as c,l as J,m as K,n as p,o as Q,q as m,s as g,t as U,v as V,w as X,x as Y,y as Z,z as ee,S as re,B as ae,C as oe,G as te,H as ne,I as se,J as le}from"./pages-CAL1FDMt.js";import{bG as ie,j as de,R as ce,bH as pe,bI as me}from"./components-hX0LgYz3.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-DwrexFA4.js";import"./vendor-codemirror-DVE2_WBr.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ge(){return e(x,{styles:a=>h`
2
2
  body {
3
3
  background-color: var(--ac-global-color-grey-75);
4
4
  color: var(--ac-global-text-color-900);
@@ -1,4 +1,4 @@
1
- import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as U,x as C,al as Pe,z as Y,t as D,am as Pn,an as ln,$ as B,ao as ca,D as he,E as ke,H as Z,G as Rn,g as Ml,ap as Xe,aq as ue,ar as Ye,as as Ns,J as Ga,at as Cn,au as se,av as ve,a5 as Ie,a6 as G,a7 as Vs,aw as _e,ax as zs,ay as La,az as Pa,aA as wa,aB as Un,aC as fa,o as $s,aD as Os,aE as Qs,ab as js,ac as qs,aF as Us,p as Bs,q as Hs,aG as Gs,y as Ws,aH as O,aI as Js,aJ as Zs,aK as ml,aL as Xs,aM as Ys,aN as eo,aO as no,aP as ao,aQ as lo,aR as to,aS as io}from"./vendor-6IcPAw_j.js";import{C as H,d as F,K as Mn,D as W,c as h,I as P,a as I,J as Wa,G as Te,H as J,M as Ee,N as de,O as ro,m as ha,Q as na,P as tn,S as Be,i as Nn,j as re,q as Fn,r as Vn,v as ge,b as K,o as Nl,U as Me,L as Xn,V as Vl,e as M,t as ne,W as zl,X as $l,Y as so,Z as oo,h as kn,w as aa,T as Le,k as X,B as ka,s as ye,$ as V,a0 as Ja,E as ba,f as An,a1 as Za,a2 as co,z as la,u as uo,a3 as mo,R as ga,n as Ol}from"./vendor-arizeai-uC2sozJ6.js";import{c as go,N as po,T as yo,L as fe,u as ce,B as fo,a as mn,D as ho,G as ko,b as bo,d as So,S as vo,R as xe,e as Ve,f as He,g as Xa,P as Ql,h as jl,M as gl,i as pl,j as zn,k as Co,l as Fo,m as Q,n as ql,o as Ce,p as Sa,q as $n,r as Ul,s as On,t as Qn,v as Bl,w as Ge,x as Qe,C as pe,y as va,z as rn,A as Ya,E as We,F as Hl,H as Ko,I as xo,J as Do,K as To,O as Io,Q as Lo,U as je,V as me,W as Po,X as wo,Y as Gl,Z as Ao,_ as _o,$ as yl,a0 as Eo,a1 as Ro,a2 as Mo,a3 as No,a4 as Vo,a5 as zo,a6 as Wl,a7 as Kn,a8 as $o,a9 as Oo,aa as Qo,ab as jo,ac as qo,ad as bn,ae as el,af as Jl,ag as wn,ah as Qa,ai as In,aj as ze,ak as Uo,al as Bo,am as oe,an as Zl,ao as Ca,ap as we,aq as Fa,ar as xn,as as le,at as Je,au as Ho,av as nl,aw as Oe,ax as Re,ay as Sn,az as al,aA as Xl,aB as ll,aC as Go,aD as Yl,aE as Ae,aF as qe,aG as ta,aH as Wo,aI as ia,aJ as Ka,aK as et,aL as nt,aM as Jo,aN as at,aO as lt,aP as tt,aQ as jn,aR as en,aS as Ze,aT as Fe,aU as Zo,aV as fl,aW as it,aX as Xo,aY as Yo,aZ as ed,a_ as nd,a$ as ad,b0 as _n,b1 as pn,b2 as ja,b3 as yn,b4 as rt,b5 as ld,b6 as fn,b7 as td,b8 as xa,b9 as id,ba as tl,bb as rd,bc as il,bd as st,be as ot,bf as sd,bg as qa,bh as dt,bi as od,bj as dd,bk as ua,bl as cd,bm as ct,bn as ut,bo as ud,bp as mt,bq as md,br as Da,bs as gd,bt as pd,bu as yd,bv as fd,bw as gt,bx as hd,by as kd,bz as bd,bA as Sd,bB as vd,bC as Cd,bD as Fd,bE as hl,bF as Kd}from"./components-DOjuTDx9.js";import{R as sn,C as ra,X as on,Y as Ne,a as dn,T as cn,B as En,A as Yn,b as pt,c as rl,L as yt,d as xd,P as Dd,e as Td,f as Id}from"./vendor-recharts-DwrexFA4.js";import{p as sl,R as sa,n as oa,j as Ld,E as ft,m as Pd,o as wd,g as Ad}from"./vendor-codemirror-DVE2_WBr.js";const ht=u.createContext(null);function Ey({children:n,...a}){const[l]=u.useState(()=>go(a));return e(ht.Provider,{value:l,children:n})}function Ua(n,a){const l=Ke.useContext(ht);if(!l)throw new Error("Missing CredentialsContext.Provider in the tree");return ya(l,n,a)}const kt="arize-phoenix-feature-flags",Aa={playground:!1,playgroundNonStreaming:!1,playgroundWithDatasets:!1};function _d(){const n=localStorage.getItem(kt);if(!n)return Aa;try{const a=JSON.parse(n);return Object.assign({},Aa,a)}catch{return Aa}}const bt=u.createContext(null);function St(){const n=Ke.useContext(bt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function Ta(n){const{featureFlags:a}=St();return a[n]}function Ry(n){const[a,l]=u.useState(_d()),t=i=>{localStorage.setItem(kt,JSON.stringify(i)),l(i)};return e(bt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Ed,{children:n.children})})}function Ed(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=St(),[i,r]=u.useState(!1);return Ms("ctrl+shift+f",()=>r(!0)),s(U,{children:[a,e(W,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(H,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Mn,{isSelected:l[o],onChange:c=>t({...l,[o]:c}),children:o},o))})})})]})}const vt=u.createContext(null);function Rd(){const n=u.useContext(vt);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function My(n){return e(vt.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Md=C`
1
+ import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as U,x as C,al as Pe,z as Y,t as D,am as Pn,an as ln,$ as B,ao as ca,D as he,E as ke,H as Z,G as Rn,g as Ml,ap as Xe,aq as ue,ar as Ye,as as Ns,J as Ga,at as Cn,au as se,av as ve,a5 as Ie,a6 as G,a7 as Vs,aw as _e,ax as zs,ay as La,az as Pa,aA as wa,aB as Un,aC as fa,o as $s,aD as Os,aE as Qs,ab as js,ac as qs,aF as Us,p as Bs,q as Hs,aG as Gs,y as Ws,aH as O,aI as Js,aJ as Zs,aK as ml,aL as Xs,aM as Ys,aN as eo,aO as no,aP as ao,aQ as lo,aR as to,aS as io}from"./vendor-6IcPAw_j.js";import{C as H,d as F,K as Mn,D as W,c as h,I as P,a as I,J as Wa,G as Te,H as J,M as Ee,N as de,O as ro,m as ha,Q as na,P as tn,S as Be,i as Nn,j as re,q as Fn,r as Vn,v as ge,b as K,o as Nl,U as Me,L as Xn,V as Vl,e as M,t as ne,W as zl,X as $l,Y as so,Z as oo,h as kn,w as aa,T as Le,k as X,B as ka,s as ye,$ as V,a0 as Ja,E as ba,f as An,a1 as Za,a2 as co,z as la,u as uo,a3 as mo,R as ga,n as Ol}from"./vendor-arizeai-DRZuoyuF.js";import{c as go,N as po,T as yo,L as fe,u as ce,B as fo,a as mn,D as ho,G as ko,b as bo,d as So,S as vo,R as xe,e as Ve,f as He,g as Xa,P as Ql,h as jl,M as gl,i as pl,j as zn,k as Co,l as Fo,m as Q,n as ql,o as Ce,p as Sa,q as $n,r as Ul,s as On,t as Qn,v as Bl,w as Ge,x as Qe,C as pe,y as va,z as rn,A as Ya,E as We,F as Hl,H as Ko,I as xo,J as Do,K as To,O as Io,Q as Lo,U as je,V as me,W as Po,X as wo,Y as Gl,Z as Ao,_ as _o,$ as yl,a0 as Eo,a1 as Ro,a2 as Mo,a3 as No,a4 as Vo,a5 as zo,a6 as Wl,a7 as Kn,a8 as $o,a9 as Oo,aa as Qo,ab as jo,ac as qo,ad as bn,ae as el,af as Jl,ag as wn,ah as Qa,ai as In,aj as ze,ak as Uo,al as Bo,am as oe,an as Zl,ao as Ca,ap as we,aq as Fa,ar as xn,as as le,at as Je,au as Ho,av as nl,aw as Oe,ax as Re,ay as Sn,az as al,aA as Xl,aB as ll,aC as Go,aD as Yl,aE as Ae,aF as qe,aG as ta,aH as Wo,aI as ia,aJ as Ka,aK as et,aL as nt,aM as Jo,aN as at,aO as lt,aP as tt,aQ as jn,aR as en,aS as Ze,aT as Fe,aU as Zo,aV as fl,aW as it,aX as Xo,aY as Yo,aZ as ed,a_ as nd,a$ as ad,b0 as _n,b1 as pn,b2 as ja,b3 as yn,b4 as rt,b5 as ld,b6 as fn,b7 as td,b8 as xa,b9 as id,ba as tl,bb as rd,bc as il,bd as st,be as ot,bf as sd,bg as qa,bh as dt,bi as od,bj as dd,bk as ua,bl as cd,bm as ct,bn as ut,bo as ud,bp as mt,bq as md,br as Da,bs as gd,bt as pd,bu as yd,bv as fd,bw as gt,bx as hd,by as kd,bz as bd,bA as Sd,bB as vd,bC as Cd,bD as Fd,bE as hl,bF as Kd}from"./components-hX0LgYz3.js";import{R as sn,C as ra,X as on,Y as Ne,a as dn,T as cn,B as En,A as Yn,b as pt,c as rl,L as yt,d as xd,P as Dd,e as Td,f as Id}from"./vendor-recharts-DwrexFA4.js";import{p as sl,R as sa,n as oa,j as Ld,E as ft,m as Pd,o as wd,g as Ad}from"./vendor-codemirror-DVE2_WBr.js";const ht=u.createContext(null);function Ey({children:n,...a}){const[l]=u.useState(()=>go(a));return e(ht.Provider,{value:l,children:n})}function Ua(n,a){const l=Ke.useContext(ht);if(!l)throw new Error("Missing CredentialsContext.Provider in the tree");return ya(l,n,a)}const kt="arize-phoenix-feature-flags",Aa={playground:!1,playgroundNonStreaming:!1,playgroundWithDatasets:!1};function _d(){const n=localStorage.getItem(kt);if(!n)return Aa;try{const a=JSON.parse(n);return Object.assign({},Aa,a)}catch{return Aa}}const bt=u.createContext(null);function St(){const n=Ke.useContext(bt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function Ta(n){const{featureFlags:a}=St();return a[n]}function Ry(n){const[a,l]=u.useState(_d()),t=i=>{localStorage.setItem(kt,JSON.stringify(i)),l(i)};return e(bt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Ed,{children:n.children})})}function Ed(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=St(),[i,r]=u.useState(!1);return Ms("ctrl+shift+f",()=>r(!0)),s(U,{children:[a,e(W,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(H,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Mn,{isSelected:l[o],onChange:c=>t({...l,[o]:c}),children:o},o))})})})]})}const vt=u.createContext(null);function Rd(){const n=u.useContext(vt);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function My(n){return e(vt.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Md=C`
2
2
  display: flex;
3
3
  direction: row;
4
4
  height: 100vh;
@@ -3436,7 +3436,7 @@ fragment UsersTable_users on Query {
3436
3436
  // Hacky solution to make the text fields fill the remaining space
3437
3437
  width: calc(100% - var(--ac-global-dimension-size-600));
3438
3438
  }
3439
- `;function df(){return e("main",{css:ap,children:e("div",{css:lp,children:s(h,{direction:"column",gap:"size-200",width:"100%",children:[e(V,{title:"Platform Settings",variant:"compact",children:s("form",{css:tp,children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Hostname",value:ja,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(Oa,{text:ja})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Platform Version",isReadOnly:!0,value:ua,description:"The version of the Phoenix server"}),e(Oa,{text:ua})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${ua}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(Oa,{text:ua})]})]})}),e(rt,{children:s(U,{children:[e(qg,{}),e(np,{})]})})]})})})}function Oa(n){return e(F,{paddingBottom:"19px",children:e(le,{text:n.text,size:"default"})})}const Al=window.Config.basename,_l={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function cf(){return s("div",{css:C`
3439
+ `;function df(){return e("main",{css:ap,children:e("div",{css:lp,children:s(h,{direction:"column",gap:"size-200",width:"100%",children:[e(V,{title:"Platform Settings",variant:"compact",children:s("form",{css:tp,children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Hostname",value:ja,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(Oa,{text:ja})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Platform Version",isReadOnly:!0,value:ua,description:"The version of the Phoenix server"}),e(Oa,{text:ua})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",justifyContent:"center",children:[e(X,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${ua}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(Oa,{text:ua})]})]})}),e(rt,{children:s(U,{children:[e(qg,{}),e(np,{})]})})]})})})}function Oa(n){return e(F,{paddingBottom:"19px",children:e(le,{text:n.text,size:"default"})})}const Al=window.Config.basename,_l={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function cf(){return s("div",{css:C`
3440
3440
  display: flex;
3441
3441
  flex-direction: column;
3442
3442
  flex: 1 1 auto;
@@ -3675,7 +3675,7 @@ fragment APIKeysTableFragment on User {
3675
3675
  .ac-dropdown-button {
3676
3676
  min-width: 0px;
3677
3677
  }
3678
- `,children:s(tn,{placement:"bottom",children:[e(Ja,{size:"compact",children:"API Keys"}),e(ha,{children:e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(re,{level:2,weight:"heavy",children:"API Keys"}),e(K,{color:"text-700",children:"API keys are stored in your browser and used to communicate with their respective API's."}),e(ye,{children:n.map(t=>{const i=Ip[t];return e(X,{label:i,type:"password",isRequired:!0,onChange:r=>{a({provider:t,value:r})},value:l[t]},t)})})]})})})]})})}const Pp=O.object({function:O.object({name:O.string(),arguments:O.string()}).partial()}).partial(),vs=O.object({[se.message]:O.object({[ve.role]:O.string(),[ve.content]:O.string(),[ve.tool_calls]:O.array(Pp).optional()})}),wp=O.object({[se.llm]:O.object({[_e.input_messages]:O.array(vs)})}),Ap=O.object({[se.llm]:O.object({[_e.output_messages]:O.array(vs)})}),_p=O.object({[se.output]:O.object({value:O.string()})}),Cs=mt()(O.enum(["user","ai","system","tool"])),Ep=mt()(O.object({id:O.number(),role:Cs,content:O.string()})),Rp=O.array(Ep),Mp=O.object({[se.llm]:O.object({[_e.model_name]:O.string()})});function Fs(n){return Cs.safeParse(n).success}function Np(n){if(Fs(n))return n;for(const[a,l]of Object.entries(Cp))if(l.includes(n))return a;return pd}function Ks(n){return n.map(({message:a})=>({id:Da(),role:Np(a.role),content:a.content}))}function Vp(n){const a=wp.safeParse(n);return a.success?{messageParsingErrors:[],messages:Ks(a.data.llm.input_messages)}:{messageParsingErrors:[Fp],messages:null}}function zp(n){const a=[],l=Ap.safeParse(n);if(l.success)return{output:Ks(l.data.llm.output_messages),outputParsingErrors:a};a.push(Kp);const t=_p.safeParse(n);return t.success?{output:t.data.output.value,outputParsingErrors:a}:(a.push(xp),{output:void 0,outputParsingErrors:a})}function $p(n){for(const a of Object.keys(Rl))if(Rl[a].some(t=>n.includes(t)))return a;return gd}function Op(n){const{success:a,data:l}=Mp.safeParse(n);return a?{modelConfig:{modelName:l.llm.model_name,provider:$p(l.llm.model_name)},parsingErrors:[]}:{modelConfig:null,parsingErrors:[Tp]}}function Qp(n){const a=md(),{json:l,parseError:t}=ll(n.attributes);if(t)return{playgroundInstance:a,parsingErrors:[Dp]};const{messages:i,messageParsingErrors:r}=Vp(l),{output:o,outputParsingErrors:c}=zp(l),{modelConfig:d,parsingErrors:g}=Op(l);return{playgroundInstance:{...a,model:d??a.model,template:i!=null?{__type:"chat",messages:i}:a.template,output:o},parsingErrors:[...r,...c,...g]}}const jp=n=>Rp.safeParse(n).success,qp=({instances:n,templateLanguage:a})=>{const l=new Set,t=yd(a);return n.forEach(i=>{switch(i.template.__type){case"chat":{i.template.messages.forEach(o=>{(o.content==null?[]:t.extractVariables(o.content)).forEach(d=>{l.add(d)})});break}case"text_completion":{t.extractVariables(i.template.prompt).forEach(c=>{l.add(c)});break}default:Ce()}}),Array.from(l)},Up=()=>{const{instances:n,templateLanguage:a}=q(t=>({instances:t.instances,templateLanguage:t.templateLanguage}));return u.useMemo(()=>qp({instances:n,templateLanguage:a}),[n,a])},xs=()=>{const n=Up(),a=q(t=>fd(t.input)?t.input.variablesValueCache:{}),l=u.useMemo(()=>n.reduce((t,i)=>(t[i]=a[i]||"",t),{}),[n,a]);return{variableKeys:n,variablesMap:l}},Bp={lineNumbers:!1,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1,bracketMatching:!1,syntaxHighlighting:!1},Hp=[ft.lineWrapping],Gp=({label:n,value:a,onChange:l})=>{const{theme:t}=zn();return e(la,{label:n,children:e(yn,{width:"100%",children:e(sa,{theme:t==="light"?Ad:oa,basicSetup:Bp,value:a,extensions:Hp,onChange:l})})})};function Wp(){const{variableKeys:n,variablesMap:a}=xs(),l=q(i=>i.setVariableValue),t=q(i=>i.templateLanguage);if(n.length===0){let i="";switch(t){case"F_STRING":{i="{input name}";break}case"MUSTACHE":{i="{{input name}}";break}default:Ce()}return e(F,{padding:"size-100",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",children:s(K,{color:"text-700",children:["Add variable inputs to your prompt using"," ",e(K,{color:"text-900",children:i})," within your prompt template."]})})})}return e(h,{direction:"column",gap:"size-200",width:"100%",children:n.map((i,r)=>e(Gp,{label:i,value:a[i],onChange:o=>l(i,o)},r))})}function Jp(){const n=q(l=>l.inputMode),a=q(l=>l.setInputMode);return s(Ol,{value:n,variant:"inline-button",size:"compact",onChange:l=>{(l==="manual"||l==="dataset")&&a(l)},children:[e(ga,{label:"manual",value:"manual",children:"Manual"}),e(ga,{label:"Dataset",value:"dataset",children:"Dataset"})]})}const Ds=function(){var n={defaultValue:null,kind:"LocalArgument",name:"apiKey"},a={defaultValue:null,kind:"LocalArgument",name:"invocationParameters"},l={defaultValue:null,kind:"LocalArgument",name:"messages"},t={defaultValue:null,kind:"LocalArgument",name:"model"},i={defaultValue:null,kind:"LocalArgument",name:"templateOptions"},r={defaultValue:null,kind:"LocalArgument",name:"tools"},o={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},c=[{alias:null,args:[{fields:[{kind:"Variable",name:"apiKey",variableName:"apiKey"},{kind:"Variable",name:"invocationParameters",variableName:"invocationParameters"},{kind:"Variable",name:"messages",variableName:"messages"},{kind:"Variable",name:"model",variableName:"model"},{kind:"Variable",name:"template",variableName:"templateOptions"},{kind:"Variable",name:"tools",variableName:"tools"}],kind:"ObjectValue",name:"input"}],concreteType:null,kind:"LinkedField",name:"chatCompletion",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"content",storageKey:null}],type:"TextChunk",abstractKey:null},{kind:"InlineFragment",selections:[o,{alias:null,args:null,concreteType:"FunctionCallChunk",kind:"LinkedField",name:"function",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"arguments",storageKey:null}],storageKey:null}],type:"ToolCallChunk",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[o],storageKey:null}],type:"FinishedChatCompletion",abstractKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"PlaygroundOutputSubscription",selections:c,type:"Subscription",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,t,a,r,i,n],kind:"Operation",name:"PlaygroundOutputSubscription",selections:c},params:{cacheID:"54f42285c230d77abe27c047dc37e700",id:null,metadata:{},name:"PlaygroundOutputSubscription",operationKind:"subscription",text:`subscription PlaygroundOutputSubscription(
3678
+ `,children:s(tn,{placement:"bottom",children:[e(Ja,{size:"compact",children:"API Keys"}),e(ha,{children:e(F,{padding:"size-200",children:s(ye,{onSubmit:()=>{},children:[e(re,{level:2,weight:"heavy",children:"API Keys"}),e(K,{color:"text-700",children:"API keys are stored in your browser and used to communicate with their respective API's."}),e(h,{direction:"column",gap:"size-100",children:n.map(t=>{const i=Ip[t];return e(X,{label:i,type:"password",isRequired:!0,onChange:r=>{a({provider:t,value:r})},value:l[t]},t)})})]})})})]})})}const Pp=O.object({function:O.object({name:O.string(),arguments:O.string()}).partial()}).partial(),vs=O.object({[se.message]:O.object({[ve.role]:O.string(),[ve.content]:O.string(),[ve.tool_calls]:O.array(Pp).optional()})}),wp=O.object({[se.llm]:O.object({[_e.input_messages]:O.array(vs)})}),Ap=O.object({[se.llm]:O.object({[_e.output_messages]:O.array(vs)})}),_p=O.object({[se.output]:O.object({value:O.string()})}),Cs=mt()(O.enum(["user","ai","system","tool"])),Ep=mt()(O.object({id:O.number(),role:Cs,content:O.string()})),Rp=O.array(Ep),Mp=O.object({[se.llm]:O.object({[_e.model_name]:O.string()})});function Fs(n){return Cs.safeParse(n).success}function Np(n){if(Fs(n))return n;for(const[a,l]of Object.entries(Cp))if(l.includes(n))return a;return pd}function Ks(n){return n.map(({message:a})=>({id:Da(),role:Np(a.role),content:a.content}))}function Vp(n){const a=wp.safeParse(n);return a.success?{messageParsingErrors:[],messages:Ks(a.data.llm.input_messages)}:{messageParsingErrors:[Fp],messages:null}}function zp(n){const a=[],l=Ap.safeParse(n);if(l.success)return{output:Ks(l.data.llm.output_messages),outputParsingErrors:a};a.push(Kp);const t=_p.safeParse(n);return t.success?{output:t.data.output.value,outputParsingErrors:a}:(a.push(xp),{output:void 0,outputParsingErrors:a})}function $p(n){for(const a of Object.keys(Rl))if(Rl[a].some(t=>n.includes(t)))return a;return gd}function Op(n){const{success:a,data:l}=Mp.safeParse(n);return a?{modelConfig:{modelName:l.llm.model_name,provider:$p(l.llm.model_name)},parsingErrors:[]}:{modelConfig:null,parsingErrors:[Tp]}}function Qp(n){const a=md(),{json:l,parseError:t}=ll(n.attributes);if(t)return{playgroundInstance:a,parsingErrors:[Dp]};const{messages:i,messageParsingErrors:r}=Vp(l),{output:o,outputParsingErrors:c}=zp(l),{modelConfig:d,parsingErrors:g}=Op(l);return{playgroundInstance:{...a,model:d??a.model,template:i!=null?{__type:"chat",messages:i}:a.template,output:o},parsingErrors:[...r,...c,...g]}}const jp=n=>Rp.safeParse(n).success,qp=({instances:n,templateLanguage:a})=>{const l=new Set,t=yd(a);return n.forEach(i=>{switch(i.template.__type){case"chat":{i.template.messages.forEach(o=>{(o.content==null?[]:t.extractVariables(o.content)).forEach(d=>{l.add(d)})});break}case"text_completion":{t.extractVariables(i.template.prompt).forEach(c=>{l.add(c)});break}default:Ce()}}),Array.from(l)},Up=()=>{const{instances:n,templateLanguage:a}=q(t=>({instances:t.instances,templateLanguage:t.templateLanguage}));return u.useMemo(()=>qp({instances:n,templateLanguage:a}),[n,a])},xs=()=>{const n=Up(),a=q(t=>fd(t.input)?t.input.variablesValueCache:{}),l=u.useMemo(()=>n.reduce((t,i)=>(t[i]=a[i]||"",t),{}),[n,a]);return{variableKeys:n,variablesMap:l}},Bp={lineNumbers:!1,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1,bracketMatching:!1,syntaxHighlighting:!1},Hp=[ft.lineWrapping],Gp=({label:n,value:a,onChange:l})=>{const{theme:t}=zn();return e(la,{label:n,children:e(yn,{width:"100%",children:e(sa,{theme:t==="light"?Ad:oa,basicSetup:Bp,value:a,extensions:Hp,onChange:l})})})};function Wp(){const{variableKeys:n,variablesMap:a}=xs(),l=q(i=>i.setVariableValue),t=q(i=>i.templateLanguage);if(n.length===0){let i="";switch(t){case"F_STRING":{i="{input name}";break}case"MUSTACHE":{i="{{input name}}";break}default:Ce()}return e(F,{padding:"size-100",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",children:s(K,{color:"text-700",children:["Add variable inputs to your prompt using"," ",e(K,{color:"text-900",children:i})," within your prompt template."]})})})}return e(h,{direction:"column",gap:"size-200",width:"100%",children:n.map((i,r)=>e(Gp,{label:i,value:a[i],onChange:o=>l(i,o)},r))})}function Jp(){const n=q(l=>l.inputMode),a=q(l=>l.setInputMode);return s(Ol,{value:n,variant:"inline-button",size:"compact",onChange:l=>{(l==="manual"||l==="dataset")&&a(l)},children:[e(ga,{label:"manual",value:"manual",children:"Manual"}),e(ga,{label:"Dataset",value:"dataset",children:"Dataset"})]})}const Ds=function(){var n={defaultValue:null,kind:"LocalArgument",name:"apiKey"},a={defaultValue:null,kind:"LocalArgument",name:"invocationParameters"},l={defaultValue:null,kind:"LocalArgument",name:"messages"},t={defaultValue:null,kind:"LocalArgument",name:"model"},i={defaultValue:null,kind:"LocalArgument",name:"templateOptions"},r={defaultValue:null,kind:"LocalArgument",name:"tools"},o={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},c=[{alias:null,args:[{fields:[{kind:"Variable",name:"apiKey",variableName:"apiKey"},{kind:"Variable",name:"invocationParameters",variableName:"invocationParameters"},{kind:"Variable",name:"messages",variableName:"messages"},{kind:"Variable",name:"model",variableName:"model"},{kind:"Variable",name:"template",variableName:"templateOptions"},{kind:"Variable",name:"tools",variableName:"tools"}],kind:"ObjectValue",name:"input"}],concreteType:null,kind:"LinkedField",name:"chatCompletion",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"content",storageKey:null}],type:"TextChunk",abstractKey:null},{kind:"InlineFragment",selections:[o,{alias:null,args:null,concreteType:"FunctionCallChunk",kind:"LinkedField",name:"function",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"arguments",storageKey:null}],storageKey:null}],type:"ToolCallChunk",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[o],storageKey:null}],type:"FinishedChatCompletion",abstractKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"PlaygroundOutputSubscription",selections:c,type:"Subscription",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,t,a,r,i,n],kind:"Operation",name:"PlaygroundOutputSubscription",selections:c},params:{cacheID:"54f42285c230d77abe27c047dc37e700",id:null,metadata:{},name:"PlaygroundOutputSubscription",operationKind:"subscription",text:`subscription PlaygroundOutputSubscription(
3679
3679
  $messages: [ChatCompletionMessageInput!]!
3680
3680
  $model: GenerativeModelInput!
3681
3681
  $invocationParameters: InvocationParameters!