-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 68368962 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Oct 15, 2024
1 parent
f5e98f5
commit 574c59a
Showing
7 changed files
with
148 additions
and
5 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
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,84 @@ | ||
""" | ||
Create a new dashboard with llm_observability_stream list_stream widget | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v1.api.dashboards_api import DashboardsApi | ||
from datadog_api_client.v1.model.dashboard import Dashboard | ||
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType | ||
from datadog_api_client.v1.model.list_stream_column import ListStreamColumn | ||
from datadog_api_client.v1.model.list_stream_column_width import ListStreamColumnWidth | ||
from datadog_api_client.v1.model.list_stream_query import ListStreamQuery | ||
from datadog_api_client.v1.model.list_stream_response_format import ListStreamResponseFormat | ||
from datadog_api_client.v1.model.list_stream_source import ListStreamSource | ||
from datadog_api_client.v1.model.list_stream_widget_definition import ListStreamWidgetDefinition | ||
from datadog_api_client.v1.model.list_stream_widget_definition_type import ListStreamWidgetDefinitionType | ||
from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest | ||
from datadog_api_client.v1.model.widget import Widget | ||
|
||
body = Dashboard( | ||
layout_type=DashboardLayoutType.ORDERED, | ||
title="Example-Dashboard with list_stream widget", | ||
widgets=[ | ||
Widget( | ||
definition=ListStreamWidgetDefinition( | ||
type=ListStreamWidgetDefinitionType.LIST_STREAM, | ||
requests=[ | ||
ListStreamWidgetRequest( | ||
response_format=ListStreamResponseFormat.EVENT_LIST, | ||
query=ListStreamQuery( | ||
data_source=ListStreamSource.LLM_OBSERVABILITY_STREAM, | ||
query_string="@event_type:span @parent_id:undefined", | ||
indexes=[], | ||
), | ||
columns=[ | ||
ListStreamColumn( | ||
field="@status", | ||
width=ListStreamColumnWidth.COMPACT, | ||
), | ||
ListStreamColumn( | ||
field="@content.prompt", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="@content.response.content", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="timestamp", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="@ml_app", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="service", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="@meta.evaluations.quality", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="@meta.evaluations.security", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
ListStreamColumn( | ||
field="@duration", | ||
width=ListStreamColumnWidth.AUTO, | ||
), | ||
], | ||
), | ||
], | ||
), | ||
), | ||
], | ||
) | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = DashboardsApi(api_client) | ||
response = api_instance.create_dashboard(body=body) | ||
|
||
print(response) |
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
...arios/test_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 |
45 changes: 45 additions & 0 deletions
45
...enarios/test_create_a_new_dashboard_with_llm_observability_stream_list_stream_widget.yaml
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,45 @@ | ||
interactions: | ||
- request: | ||
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_llm_observability_stream_list_stream_widget-1729028766 | ||
with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"@status","width":"compact"},{"field":"@content.prompt","width":"auto"},{"field":"@content.response.content","width":"auto"},{"field":"timestamp","width":"auto"},{"field":"@ml_app","width":"auto"},{"field":"service","width":"auto"},{"field":"@meta.evaluations.quality","width":"auto"},{"field":"@meta.evaluations.security","width":"auto"},{"field":"@duration","width":"auto"}],"query":{"data_source":"llm_observability_stream","indexes":[],"query_string":"@event_type:span | ||
@parent_id:undefined"},"response_format":"event_list"}],"type":"list_stream"}}]}' | ||
headers: | ||
accept: | ||
- application/json | ||
content-type: | ||
- application/json | ||
method: POST | ||
uri: https://api.datadoghq.com/api/v1/dashboard | ||
response: | ||
body: | ||
string: '{"id":"k3w-qcg-ug8","title":"Test-Create_a_new_dashboard_with_llm_observability_stream_list_stream_widget-1729028766 | ||
with list_stream widget","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI | ||
Account","layout_type":"ordered","url":"/dashboard/k3w-qcg-ug8/test-createanewdashboardwithllmobservabilitystreamliststreamwidget-1729028766-wi","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"columns":[{"field":"@status","width":"compact"},{"field":"@content.prompt","width":"auto"},{"field":"@content.response.content","width":"auto"},{"field":"timestamp","width":"auto"},{"field":"@ml_app","width":"auto"},{"field":"service","width":"auto"},{"field":"@meta.evaluations.quality","width":"auto"},{"field":"@meta.evaluations.security","width":"auto"},{"field":"@duration","width":"auto"}],"query":{"data_source":"llm_observability_stream","indexes":[],"query_string":"@event_type:span | ||
@parent_id:undefined"},"response_format":"event_list"}],"type":"list_stream"},"id":8221646523831060}],"notify_list":null,"created_at":"2024-10-15T21:46:06.954265+00:00","modified_at":"2024-10-15T21:46:06.954265+00:00","restricted_roles":[]} | ||
' | ||
headers: | ||
content-type: | ||
- application/json | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
accept: | ||
- application/json | ||
method: DELETE | ||
uri: https://api.datadoghq.com/api/v1/dashboard/k3w-qcg-ug8 | ||
response: | ||
body: | ||
string: '{"deleted_dashboard_id":"k3w-qcg-ug8"} | ||
' | ||
headers: | ||
content-type: | ||
- application/json | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
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