arize-phoenix 5.11.0__py3-none-any.whl → 6.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/METADATA +1 -1
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/RECORD +26 -26
- phoenix/experiments/evaluators/llm_evaluators.py +2 -2
- phoenix/server/api/helpers/dataset_helpers.py +77 -40
- phoenix/server/api/helpers/playground_clients.py +40 -78
- phoenix/server/api/helpers/playground_spans.py +2 -1
- phoenix/server/api/mutations/chat_mutations.py +9 -4
- phoenix/server/api/mutations/dataset_mutations.py +10 -30
- phoenix/server/api/routers/v1/evaluations.py +1 -1
- phoenix/server/api/subscriptions.py +52 -13
- phoenix/server/api/types/Span.py +12 -49
- phoenix/server/api/types/TemplateLanguage.py +1 -0
- phoenix/server/static/.vite/manifest.json +31 -31
- phoenix/server/static/assets/{components-C_HASv83.js → components-Bo-xjXoV.js} +144 -144
- phoenix/server/static/assets/index-i2KbnOZd.js +101 -0
- phoenix/server/static/assets/{pages-DYHcAdjT.js → pages-BfYVoiUE.js} +326 -299
- phoenix/server/static/assets/{vendor-BCxsh5i3.js → vendor-UNccFYqq.js} +2 -2
- phoenix/server/static/assets/{vendor-arizeai-C2CDZgMz.js → vendor-arizeai-gSIqhzZY.js} +9 -9
- phoenix/server/static/assets/{vendor-codemirror-DYbtnCTn.js → vendor-codemirror-fSYjW3f-.js} +1 -1
- phoenix/server/static/assets/{vendor-recharts-P6W8G0Mb.js → vendor-recharts-CVVyA2X0.js} +1 -1
- phoenix/utilities/template_formatters.py +18 -0
- phoenix/version.py +1 -1
- phoenix/server/static/assets/index-D7UiCRtr.js +0 -101
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-5.11.0.dist-info → arize_phoenix-6.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -25,8 +25,10 @@ from typing_extensions import assert_never
|
|
|
25
25
|
from phoenix.datetime_utils import local_now, normalize_datetime
|
|
26
26
|
from phoenix.db import models
|
|
27
27
|
from phoenix.db.helpers import get_dataset_example_revisions
|
|
28
|
+
from phoenix.server.api.auth import IsNotReadOnly
|
|
28
29
|
from phoenix.server.api.context import Context
|
|
29
30
|
from phoenix.server.api.exceptions import BadRequest, CustomGraphQLError, NotFound
|
|
31
|
+
from phoenix.server.api.helpers.dataset_helpers import get_dataset_example_output
|
|
30
32
|
from phoenix.server.api.helpers.playground_clients import (
|
|
31
33
|
PlaygroundStreamingClient,
|
|
32
34
|
initialize_playground_clients,
|
|
@@ -61,12 +63,13 @@ from phoenix.server.api.types.node import from_global_id_with_expected_type
|
|
|
61
63
|
from phoenix.server.api.types.Span import Span, to_gql_span
|
|
62
64
|
from phoenix.server.api.types.TemplateLanguage import TemplateLanguage
|
|
63
65
|
from phoenix.server.dml_event import SpanInsertEvent
|
|
64
|
-
from phoenix.trace.attributes import
|
|
66
|
+
from phoenix.trace.attributes import unflatten
|
|
65
67
|
from phoenix.trace.schemas import SpanException
|
|
66
68
|
from phoenix.utilities.json import jsonify
|
|
67
69
|
from phoenix.utilities.template_formatters import (
|
|
68
70
|
FStringTemplateFormatter,
|
|
69
71
|
MustacheTemplateFormatter,
|
|
72
|
+
NoOpFormatter,
|
|
70
73
|
TemplateFormatter,
|
|
71
74
|
)
|
|
72
75
|
|
|
@@ -117,7 +120,7 @@ class ChatCompletionOverDatasetMutationPayload:
|
|
|
117
120
|
|
|
118
121
|
@strawberry.type
|
|
119
122
|
class ChatCompletionMutationMixin:
|
|
120
|
-
@strawberry.mutation
|
|
123
|
+
@strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
|
|
121
124
|
@classmethod
|
|
122
125
|
async def chat_completion_over_dataset(
|
|
123
126
|
cls,
|
|
@@ -242,7 +245,7 @@ class ChatCompletionMutationMixin:
|
|
|
242
245
|
dataset_example_id=revision.dataset_example_id,
|
|
243
246
|
trace_id=str(result.span.context.trace_id),
|
|
244
247
|
output=models.ExperimentRunOutput(
|
|
245
|
-
task_output=
|
|
248
|
+
task_output=get_dataset_example_output(db_span),
|
|
246
249
|
),
|
|
247
250
|
prompt_token_count=db_span.cumulative_llm_token_count_prompt,
|
|
248
251
|
completion_token_count=db_span.cumulative_llm_token_count_completion,
|
|
@@ -272,7 +275,7 @@ class ChatCompletionMutationMixin:
|
|
|
272
275
|
payload.examples.append(example_payload)
|
|
273
276
|
return payload
|
|
274
277
|
|
|
275
|
-
@strawberry.mutation
|
|
278
|
+
@strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
|
|
276
279
|
@classmethod
|
|
277
280
|
async def chat_completion(
|
|
278
281
|
cls, info: Info[Context, None], input: ChatCompletionInput
|
|
@@ -481,6 +484,8 @@ def _template_formatter(template_language: TemplateLanguage) -> TemplateFormatte
|
|
|
481
484
|
return MustacheTemplateFormatter()
|
|
482
485
|
if template_language is TemplateLanguage.F_STRING:
|
|
483
486
|
return FStringTemplateFormatter()
|
|
487
|
+
if template_language is TemplateLanguage.NONE:
|
|
488
|
+
return NoOpFormatter()
|
|
484
489
|
assert_never(template_language)
|
|
485
490
|
|
|
486
491
|
|
|
@@ -136,23 +136,7 @@ class DatasetMutationMixin:
|
|
|
136
136
|
.returning(models.DatasetVersion.id)
|
|
137
137
|
)
|
|
138
138
|
spans = (
|
|
139
|
-
await session.
|
|
140
|
-
select(
|
|
141
|
-
models.Span.id,
|
|
142
|
-
models.Span.span_kind,
|
|
143
|
-
models.Span.attributes,
|
|
144
|
-
_span_attribute(INPUT_MIME_TYPE),
|
|
145
|
-
_span_attribute(INPUT_VALUE),
|
|
146
|
-
_span_attribute(OUTPUT_MIME_TYPE),
|
|
147
|
-
_span_attribute(OUTPUT_VALUE),
|
|
148
|
-
_span_attribute(LLM_PROMPT_TEMPLATE_VARIABLES),
|
|
149
|
-
_span_attribute(LLM_INPUT_MESSAGES),
|
|
150
|
-
_span_attribute(LLM_OUTPUT_MESSAGES),
|
|
151
|
-
_span_attribute(RETRIEVAL_DOCUMENTS),
|
|
152
|
-
)
|
|
153
|
-
.select_from(models.Span)
|
|
154
|
-
.where(models.Span.id.in_(span_rowids))
|
|
155
|
-
)
|
|
139
|
+
await session.scalars(select(models.Span).where(models.Span.id.in_(span_rowids)))
|
|
156
140
|
).all()
|
|
157
141
|
if missing_span_rowids := span_rowids - {span.id for span in spans}:
|
|
158
142
|
raise ValueError(
|
|
@@ -160,18 +144,10 @@ class DatasetMutationMixin:
|
|
|
160
144
|
) # todo: implement error handling types https://github.com/Arize-ai/phoenix/issues/3221
|
|
161
145
|
|
|
162
146
|
span_annotations = (
|
|
163
|
-
await session.
|
|
164
|
-
select(
|
|
165
|
-
models.SpanAnnotation.span_rowid
|
|
166
|
-
models.SpanAnnotation.name,
|
|
167
|
-
models.SpanAnnotation.label,
|
|
168
|
-
models.SpanAnnotation.score,
|
|
169
|
-
models.SpanAnnotation.explanation,
|
|
170
|
-
models.SpanAnnotation.metadata_,
|
|
171
|
-
models.SpanAnnotation.annotator_kind,
|
|
147
|
+
await session.scalars(
|
|
148
|
+
select(models.SpanAnnotation).where(
|
|
149
|
+
models.SpanAnnotation.span_rowid.in_(span_rowids)
|
|
172
150
|
)
|
|
173
|
-
.select_from(models.SpanAnnotation)
|
|
174
|
-
.where(models.SpanAnnotation.span_rowid.in_(span_rowids))
|
|
175
151
|
)
|
|
176
152
|
).all()
|
|
177
153
|
|
|
@@ -214,8 +190,12 @@ class DatasetMutationMixin:
|
|
|
214
190
|
DatasetExampleRevision.input.key: get_dataset_example_input(span),
|
|
215
191
|
DatasetExampleRevision.output.key: get_dataset_example_output(span),
|
|
216
192
|
DatasetExampleRevision.metadata_.key: {
|
|
217
|
-
|
|
218
|
-
|
|
193
|
+
"span_kind": span.span_kind,
|
|
194
|
+
**(
|
|
195
|
+
{"annotations": annotations}
|
|
196
|
+
if (annotations := span_annotations_by_span[span.id])
|
|
197
|
+
else {}
|
|
198
|
+
),
|
|
219
199
|
},
|
|
220
200
|
DatasetExampleRevision.revision_kind.key: "CREATE",
|
|
221
201
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import logging
|
|
3
|
-
from asyncio import FIRST_COMPLETED, Queue, QueueEmpty, Task, create_task, wait, wait_for
|
|
4
3
|
from collections.abc import AsyncIterator, Iterator
|
|
5
4
|
from datetime import datetime, timedelta, timezone
|
|
6
5
|
from typing import (
|
|
7
6
|
Any,
|
|
8
7
|
AsyncGenerator,
|
|
8
|
+
Coroutine,
|
|
9
9
|
Iterable,
|
|
10
10
|
Mapping,
|
|
11
11
|
Optional,
|
|
@@ -24,6 +24,7 @@ from typing_extensions import TypeAlias, assert_never
|
|
|
24
24
|
|
|
25
25
|
from phoenix.datetime_utils import local_now, normalize_datetime
|
|
26
26
|
from phoenix.db import models
|
|
27
|
+
from phoenix.server.api.auth import IsNotReadOnly
|
|
27
28
|
from phoenix.server.api.context import Context
|
|
28
29
|
from phoenix.server.api.exceptions import BadRequest, CustomGraphQLError, NotFound
|
|
29
30
|
from phoenix.server.api.helpers.playground_clients import (
|
|
@@ -63,6 +64,7 @@ from phoenix.server.types import DbSessionFactory
|
|
|
63
64
|
from phoenix.utilities.template_formatters import (
|
|
64
65
|
FStringTemplateFormatter,
|
|
65
66
|
MustacheTemplateFormatter,
|
|
67
|
+
NoOpFormatter,
|
|
66
68
|
TemplateFormatter,
|
|
67
69
|
TemplateFormatterError,
|
|
68
70
|
)
|
|
@@ -86,7 +88,7 @@ PLAYGROUND_PROJECT_NAME = "playground"
|
|
|
86
88
|
|
|
87
89
|
@strawberry.type
|
|
88
90
|
class Subscription:
|
|
89
|
-
@strawberry.subscription
|
|
91
|
+
@strawberry.subscription(permission_classes=[IsNotReadOnly]) # type: ignore
|
|
90
92
|
async def chat_completion(
|
|
91
93
|
self, info: Info[Context, None], input: ChatCompletionInput
|
|
92
94
|
) -> AsyncIterator[ChatCompletionSubscriptionPayload]:
|
|
@@ -161,7 +163,7 @@ class Subscription:
|
|
|
161
163
|
info.context.event_queue.put(SpanInsertEvent(ids=(playground_project_id,)))
|
|
162
164
|
yield ChatCompletionSubscriptionResult(span=to_gql_span(db_span))
|
|
163
165
|
|
|
164
|
-
@strawberry.subscription
|
|
166
|
+
@strawberry.subscription(permission_classes=[IsNotReadOnly]) # type: ignore
|
|
165
167
|
async def chat_completion_over_dataset(
|
|
166
168
|
self, info: Info[Context, None], input: ChatCompletionOverDatasetInput
|
|
167
169
|
) -> AsyncIterator[ChatCompletionSubscriptionPayload]:
|
|
@@ -286,7 +288,7 @@ class Subscription:
|
|
|
286
288
|
experiment=to_gql_experiment(experiment)
|
|
287
289
|
) # eagerly yields experiment so it can be linked by consumers of the subscription
|
|
288
290
|
|
|
289
|
-
results: Queue[ChatCompletionResult] = Queue()
|
|
291
|
+
results: asyncio.Queue[ChatCompletionResult] = asyncio.Queue()
|
|
290
292
|
not_started: list[tuple[DatasetExampleID, ChatStream]] = [
|
|
291
293
|
(
|
|
292
294
|
GlobalID(DatasetExample.__name__, str(revision.dataset_example_id)),
|
|
@@ -302,7 +304,11 @@ class Subscription:
|
|
|
302
304
|
for revision in revisions
|
|
303
305
|
]
|
|
304
306
|
in_progress: list[
|
|
305
|
-
tuple[
|
|
307
|
+
tuple[
|
|
308
|
+
Optional[DatasetExampleID],
|
|
309
|
+
ChatStream,
|
|
310
|
+
asyncio.Task[ChatCompletionSubscriptionPayload],
|
|
311
|
+
]
|
|
306
312
|
] = []
|
|
307
313
|
max_in_progress = 3
|
|
308
314
|
write_batch_size = 10
|
|
@@ -314,7 +320,9 @@ class Subscription:
|
|
|
314
320
|
task = _create_task_with_timeout(stream)
|
|
315
321
|
in_progress.append((ex_id, stream, task))
|
|
316
322
|
async_tasks_to_run = [task for _, _, task in in_progress]
|
|
317
|
-
completed_tasks, _ = await wait(
|
|
323
|
+
completed_tasks, _ = await asyncio.wait(
|
|
324
|
+
async_tasks_to_run, return_when=asyncio.FIRST_COMPLETED
|
|
325
|
+
)
|
|
318
326
|
for completed_task in completed_tasks:
|
|
319
327
|
idx = [task for _, _, task in in_progress].index(completed_task)
|
|
320
328
|
example_id, stream, _ = in_progress[idx]
|
|
@@ -326,7 +334,7 @@ class Subscription:
|
|
|
326
334
|
del in_progress[idx] # removes timed-out stream
|
|
327
335
|
if example_id is not None:
|
|
328
336
|
yield ChatCompletionSubscriptionError(
|
|
329
|
-
message="
|
|
337
|
+
message="Playground task timed out", dataset_example_id=example_id
|
|
330
338
|
)
|
|
331
339
|
except Exception as error:
|
|
332
340
|
del in_progress[idx] # removes failed stream
|
|
@@ -367,7 +375,7 @@ async def _stream_chat_completion_over_dataset_example(
|
|
|
367
375
|
input: ChatCompletionOverDatasetInput,
|
|
368
376
|
llm_client: PlaygroundStreamingClient,
|
|
369
377
|
revision: models.DatasetExampleRevision,
|
|
370
|
-
results: Queue[ChatCompletionResult],
|
|
378
|
+
results: asyncio.Queue[ChatCompletionResult],
|
|
371
379
|
experiment_id: int,
|
|
372
380
|
project_id: int,
|
|
373
381
|
) -> ChatStream:
|
|
@@ -469,23 +477,52 @@ def _is_result_payloads_stream(
|
|
|
469
477
|
|
|
470
478
|
def _create_task_with_timeout(
|
|
471
479
|
iterable: AsyncIterator[GenericType], timeout_in_seconds: int = 90
|
|
472
|
-
) -> Task[GenericType]:
|
|
473
|
-
return create_task(
|
|
480
|
+
) -> asyncio.Task[GenericType]:
|
|
481
|
+
return asyncio.create_task(
|
|
482
|
+
_wait_for(
|
|
483
|
+
_as_coroutine(iterable),
|
|
484
|
+
timeout=timeout_in_seconds,
|
|
485
|
+
timeout_message="Playground task timed out",
|
|
486
|
+
)
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
async def _wait_for(
|
|
491
|
+
coro: Coroutine[None, None, GenericType],
|
|
492
|
+
timeout: float,
|
|
493
|
+
timeout_message: Optional[str] = None,
|
|
494
|
+
) -> GenericType:
|
|
495
|
+
"""
|
|
496
|
+
A function that imitates asyncio.wait_for, but allows the task to be
|
|
497
|
+
cancelled with a custom message.
|
|
498
|
+
"""
|
|
499
|
+
task = asyncio.create_task(coro)
|
|
500
|
+
done, pending = await asyncio.wait([task], timeout=timeout)
|
|
501
|
+
assert len(done) + len(pending) == 1
|
|
502
|
+
if done:
|
|
503
|
+
task = done.pop()
|
|
504
|
+
return task.result()
|
|
505
|
+
task = pending.pop()
|
|
506
|
+
task.cancel(msg=timeout_message)
|
|
507
|
+
try:
|
|
508
|
+
return await task
|
|
509
|
+
except asyncio.CancelledError:
|
|
510
|
+
raise asyncio.TimeoutError()
|
|
474
511
|
|
|
475
512
|
|
|
476
|
-
async def _drain(queue: Queue[GenericType]) -> list[GenericType]:
|
|
513
|
+
async def _drain(queue: asyncio.Queue[GenericType]) -> list[GenericType]:
|
|
477
514
|
values: list[GenericType] = []
|
|
478
515
|
while not queue.empty():
|
|
479
516
|
values.append(await queue.get())
|
|
480
517
|
return values
|
|
481
518
|
|
|
482
519
|
|
|
483
|
-
def _drain_no_wait(queue: Queue[GenericType]) -> list[GenericType]:
|
|
520
|
+
def _drain_no_wait(queue: asyncio.Queue[GenericType]) -> list[GenericType]:
|
|
484
521
|
values: list[GenericType] = []
|
|
485
522
|
while True:
|
|
486
523
|
try:
|
|
487
524
|
values.append(queue.get_nowait())
|
|
488
|
-
except QueueEmpty:
|
|
525
|
+
except asyncio.QueueEmpty:
|
|
489
526
|
break
|
|
490
527
|
return values
|
|
491
528
|
|
|
@@ -526,6 +563,8 @@ def _template_formatter(template_language: TemplateLanguage) -> TemplateFormatte
|
|
|
526
563
|
return MustacheTemplateFormatter()
|
|
527
564
|
if template_language is TemplateLanguage.F_STRING:
|
|
528
565
|
return FStringTemplateFormatter()
|
|
566
|
+
if template_language is TemplateLanguage.NONE:
|
|
567
|
+
return NoOpFormatter()
|
|
529
568
|
assert_never(template_language)
|
|
530
569
|
|
|
531
570
|
|
phoenix/server/api/types/Span.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from collections.abc import Mapping, Sized
|
|
3
|
-
from dataclasses import dataclass
|
|
4
3
|
from datetime import datetime
|
|
5
4
|
from enum import Enum
|
|
6
5
|
from typing import TYPE_CHECKING, Any, Optional, cast
|
|
7
6
|
|
|
8
7
|
import numpy as np
|
|
9
8
|
import strawberry
|
|
10
|
-
from openinference.semconv.trace import
|
|
9
|
+
from openinference.semconv.trace import SpanAttributes
|
|
11
10
|
from strawberry import ID, UNSET
|
|
12
11
|
from strawberry.relay import Node, NodeID
|
|
13
12
|
from strawberry.types import Info
|
|
@@ -39,18 +38,6 @@ from .SpanAnnotation import SpanAnnotation
|
|
|
39
38
|
if TYPE_CHECKING:
|
|
40
39
|
from phoenix.server.api.types.Project import Project
|
|
41
40
|
|
|
42
|
-
EMBEDDING_EMBEDDINGS = SpanAttributes.EMBEDDING_EMBEDDINGS
|
|
43
|
-
EMBEDDING_VECTOR = EmbeddingAttributes.EMBEDDING_VECTOR
|
|
44
|
-
INPUT_MIME_TYPE = SpanAttributes.INPUT_MIME_TYPE
|
|
45
|
-
INPUT_VALUE = SpanAttributes.INPUT_VALUE
|
|
46
|
-
LLM_PROMPT_TEMPLATE_VARIABLES = SpanAttributes.LLM_PROMPT_TEMPLATE_VARIABLES
|
|
47
|
-
LLM_INPUT_MESSAGES = SpanAttributes.LLM_INPUT_MESSAGES
|
|
48
|
-
LLM_OUTPUT_MESSAGES = SpanAttributes.LLM_OUTPUT_MESSAGES
|
|
49
|
-
METADATA = SpanAttributes.METADATA
|
|
50
|
-
OUTPUT_MIME_TYPE = SpanAttributes.OUTPUT_MIME_TYPE
|
|
51
|
-
OUTPUT_VALUE = SpanAttributes.OUTPUT_VALUE
|
|
52
|
-
RETRIEVAL_DOCUMENTS = SpanAttributes.RETRIEVAL_DOCUMENTS
|
|
53
|
-
|
|
54
41
|
|
|
55
42
|
@strawberry.enum
|
|
56
43
|
class SpanKind(Enum):
|
|
@@ -236,21 +223,7 @@ class Span(Node):
|
|
|
236
223
|
description="The span's attributes translated into an example revision for a dataset",
|
|
237
224
|
) # type: ignore
|
|
238
225
|
async def as_example_revision(self, info: Info[Context, None]) -> SpanAsExampleRevision:
|
|
239
|
-
|
|
240
|
-
attributes = db_span.attributes
|
|
241
|
-
span_io = _SpanIO(
|
|
242
|
-
span_kind=db_span.span_kind,
|
|
243
|
-
input_value=get_attribute_value(attributes, INPUT_VALUE),
|
|
244
|
-
input_mime_type=get_attribute_value(attributes, INPUT_MIME_TYPE),
|
|
245
|
-
output_value=get_attribute_value(attributes, OUTPUT_VALUE),
|
|
246
|
-
output_mime_type=get_attribute_value(attributes, OUTPUT_MIME_TYPE),
|
|
247
|
-
llm_prompt_template_variables=get_attribute_value(
|
|
248
|
-
attributes, LLM_PROMPT_TEMPLATE_VARIABLES
|
|
249
|
-
),
|
|
250
|
-
llm_input_messages=get_attribute_value(attributes, LLM_INPUT_MESSAGES),
|
|
251
|
-
llm_output_messages=get_attribute_value(attributes, LLM_OUTPUT_MESSAGES),
|
|
252
|
-
retrieval_documents=get_attribute_value(attributes, RETRIEVAL_DOCUMENTS),
|
|
253
|
-
)
|
|
226
|
+
span = self.db_span
|
|
254
227
|
|
|
255
228
|
# Fetch annotations associated with this span
|
|
256
229
|
span_annotations = await self.span_annotations(info)
|
|
@@ -265,13 +238,13 @@ class Span(Node):
|
|
|
265
238
|
}
|
|
266
239
|
# Merge annotations into the metadata
|
|
267
240
|
metadata = {
|
|
268
|
-
|
|
269
|
-
"annotations": annotations,
|
|
241
|
+
"span_kind": span.span_kind,
|
|
242
|
+
**({"annotations": annotations} if annotations else {}),
|
|
270
243
|
}
|
|
271
244
|
|
|
272
245
|
return SpanAsExampleRevision(
|
|
273
|
-
input=get_dataset_example_input(
|
|
274
|
-
output=get_dataset_example_output(
|
|
246
|
+
input=get_dataset_example_input(span),
|
|
247
|
+
output=get_dataset_example_output(span),
|
|
275
248
|
metadata=metadata,
|
|
276
249
|
)
|
|
277
250
|
|
|
@@ -435,19 +408,9 @@ def _convert_metadata_to_string(metadata: Any) -> Optional[str]:
|
|
|
435
408
|
return str(metadata)
|
|
436
409
|
|
|
437
410
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
span_kind: Optional[str]
|
|
446
|
-
input_value: Any
|
|
447
|
-
input_mime_type: Optional[str]
|
|
448
|
-
output_value: Any
|
|
449
|
-
output_mime_type: Optional[str]
|
|
450
|
-
llm_prompt_template_variables: Any
|
|
451
|
-
llm_input_messages: Any
|
|
452
|
-
llm_output_messages: Any
|
|
453
|
-
retrieval_documents: Any
|
|
411
|
+
INPUT_MIME_TYPE = SpanAttributes.INPUT_MIME_TYPE
|
|
412
|
+
INPUT_VALUE = SpanAttributes.INPUT_VALUE
|
|
413
|
+
METADATA = SpanAttributes.METADATA
|
|
414
|
+
OUTPUT_MIME_TYPE = SpanAttributes.OUTPUT_MIME_TYPE
|
|
415
|
+
OUTPUT_VALUE = SpanAttributes.OUTPUT_VALUE
|
|
416
|
+
RETRIEVAL_DOCUMENTS = SpanAttributes.RETRIEVAL_DOCUMENTS
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-Bo-xjXoV.js": {
|
|
3
|
+
"file": "assets/components-Bo-xjXoV.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_vendor-
|
|
7
|
-
"_pages-
|
|
8
|
-
"_vendor-arizeai-
|
|
9
|
-
"_vendor-codemirror-
|
|
6
|
+
"_vendor-UNccFYqq.js",
|
|
7
|
+
"_pages-BfYVoiUE.js",
|
|
8
|
+
"_vendor-arizeai-gSIqhzZY.js",
|
|
9
|
+
"_vendor-codemirror-fSYjW3f-.js",
|
|
10
10
|
"_vendor-three-DwGkEfCM.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-BfYVoiUE.js": {
|
|
14
|
+
"file": "assets/pages-BfYVoiUE.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
|
-
"_vendor-
|
|
18
|
-
"_vendor-arizeai-
|
|
19
|
-
"_components-
|
|
20
|
-
"_vendor-recharts-
|
|
21
|
-
"_vendor-codemirror-
|
|
17
|
+
"_vendor-UNccFYqq.js",
|
|
18
|
+
"_vendor-arizeai-gSIqhzZY.js",
|
|
19
|
+
"_components-Bo-xjXoV.js",
|
|
20
|
+
"_vendor-recharts-CVVyA2X0.js",
|
|
21
|
+
"_vendor-codemirror-fSYjW3f-.js"
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"_vendor-!~{003}~.js": {
|
|
25
25
|
"file": "assets/vendor-DxkFTwjz.css",
|
|
26
26
|
"src": "_vendor-!~{003}~.js"
|
|
27
27
|
},
|
|
28
|
-
"_vendor-
|
|
29
|
-
"file": "assets/vendor-
|
|
28
|
+
"_vendor-UNccFYqq.js": {
|
|
29
|
+
"file": "assets/vendor-UNccFYqq.js",
|
|
30
30
|
"name": "vendor",
|
|
31
31
|
"imports": [
|
|
32
32
|
"_vendor-three-DwGkEfCM.js"
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
"assets/vendor-DxkFTwjz.css"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
-
"_vendor-arizeai-
|
|
39
|
-
"file": "assets/vendor-arizeai-
|
|
38
|
+
"_vendor-arizeai-gSIqhzZY.js": {
|
|
39
|
+
"file": "assets/vendor-arizeai-gSIqhzZY.js",
|
|
40
40
|
"name": "vendor-arizeai",
|
|
41
41
|
"imports": [
|
|
42
|
-
"_vendor-
|
|
42
|
+
"_vendor-UNccFYqq.js"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
|
-
"_vendor-codemirror-
|
|
46
|
-
"file": "assets/vendor-codemirror-
|
|
45
|
+
"_vendor-codemirror-fSYjW3f-.js": {
|
|
46
|
+
"file": "assets/vendor-codemirror-fSYjW3f-.js",
|
|
47
47
|
"name": "vendor-codemirror",
|
|
48
48
|
"imports": [
|
|
49
|
-
"_vendor-
|
|
49
|
+
"_vendor-UNccFYqq.js"
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
|
-
"_vendor-recharts-
|
|
53
|
-
"file": "assets/vendor-recharts-
|
|
52
|
+
"_vendor-recharts-CVVyA2X0.js": {
|
|
53
|
+
"file": "assets/vendor-recharts-CVVyA2X0.js",
|
|
54
54
|
"name": "vendor-recharts",
|
|
55
55
|
"imports": [
|
|
56
|
-
"_vendor-
|
|
56
|
+
"_vendor-UNccFYqq.js"
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"_vendor-three-DwGkEfCM.js": {
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
"name": "vendor-three"
|
|
62
62
|
},
|
|
63
63
|
"index.tsx": {
|
|
64
|
-
"file": "assets/index-
|
|
64
|
+
"file": "assets/index-i2KbnOZd.js",
|
|
65
65
|
"name": "index",
|
|
66
66
|
"src": "index.tsx",
|
|
67
67
|
"isEntry": true,
|
|
68
68
|
"imports": [
|
|
69
|
-
"_vendor-
|
|
70
|
-
"_vendor-arizeai-
|
|
71
|
-
"_pages-
|
|
72
|
-
"_components-
|
|
69
|
+
"_vendor-UNccFYqq.js",
|
|
70
|
+
"_vendor-arizeai-gSIqhzZY.js",
|
|
71
|
+
"_pages-BfYVoiUE.js",
|
|
72
|
+
"_components-Bo-xjXoV.js",
|
|
73
73
|
"_vendor-three-DwGkEfCM.js",
|
|
74
|
-
"_vendor-recharts-
|
|
75
|
-
"_vendor-codemirror-
|
|
74
|
+
"_vendor-recharts-CVVyA2X0.js",
|
|
75
|
+
"_vendor-codemirror-fSYjW3f-.js"
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
}
|