Skip to content

Commit

Permalink
remove output value and mime type for retriever spans
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Jan 30, 2024
1 parent 28b94f4 commit 26966b0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,6 @@ def __call__(
dict(
_flatten(
{
SpanAttributes.OUTPUT_VALUE: json.dumps(
prediction, cls=DSPyJSONEncoder
),
SpanAttributes.OUTPUT_MIME_TYPE: OpenInferenceMimeTypeValues.JSON.value,
SpanAttributes.RETRIEVAL_DOCUMENTS: [
{
DocumentAttributes.DOCUMENT_ID: str(uuid4()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,6 @@ def forward(self, question):
"query_or_queries": "What's the capital of the United States?"
}
assert span.attributes[INPUT_MIME_TYPE] == JSON.value
assert json.loads(span.attributes[OUTPUT_VALUE]) == {
"passages": [
"first retrieved document text",
"second retrieved document text",
"third retrieved document text",
]
}
assert span.attributes[OUTPUT_MIME_TYPE] == JSON.value
assert isinstance(
span.attributes[f"{RETRIEVAL_DOCUMENTS}.0.{DOCUMENT_ID}"],
str,
Expand Down

0 comments on commit 26966b0

Please sign in to comment.