-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LLM Observability to ListStreamSource (#2054)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
- Loading branch information
1 parent
d5e3ae3
commit d942279
Showing
7 changed files
with
132 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...dashboards/Create-a-new-dashboard-with-llm-observability-stream-list-stream-widget.frozen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-10-15T21:46:06.749Z |
51 changes: 51 additions & 0 deletions
51
...v1/dashboards/Create-a-new-dashboard-with-llm-observability-stream-list-stream-widget.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Create a new dashboard with llm_observability_stream list_stream widget | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V1::DashboardsAPI.new | ||
|
||
body = DatadogAPIClient::V1::Dashboard.new({ | ||
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, | ||
title: "Example-Dashboard with list_stream widget", | ||
widgets: [ | ||
DatadogAPIClient::V1::Widget.new({ | ||
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({ | ||
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM, | ||
requests: [ | ||
DatadogAPIClient::V1::ListStreamWidgetRequest.new({ | ||
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST, | ||
query: DatadogAPIClient::V1::ListStreamQuery.new({ | ||
data_source: DatadogAPIClient::V1::ListStreamSource::LLM_OBSERVABILITY_STREAM, | ||
query_string: "@event_type:span @parent_id:undefined", | ||
indexes: [], | ||
}), | ||
columns: [ | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@status", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::COMPACT, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@content.prompt", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@content.response.content", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "timestamp", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@ml_app", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "service", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@meta.evaluations.quality", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@meta.evaluations.security", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
DatadogAPIClient::V1::ListStreamColumn.new({ | ||
field: "@duration", | ||
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, | ||
}), | ||
], | ||
}), | ||
], | ||
}), | ||
}), | ||
], | ||
}) | ||
p api_instance.create_dashboard(body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters