Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
399 changes: 399 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18204,13 +18204,48 @@ datadog\_api\_client.v2.model.list\_vulnerable\_assets\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_by\_trace\_item module
--------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interaction_by_trace_item
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_item module
---------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interaction_item
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_data\_attributes\_response module
-------------------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_data_attributes_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_data\_response module
-------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_data_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_response module
-------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_type module
---------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_data\_attributes\_response module
--------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -18463,6 +18498,13 @@ datadog\_api\_client.v2.model.llm\_obs\_anthropic\_thinking\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_any\_interaction\_type module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_any_interaction_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_azure\_open\_ai\_metadata module
------------------------------------------------------------------------

Expand Down Expand Up @@ -19632,6 +19674,55 @@ datadog\_api\_client.v2.model.llm\_obs\_open\_ai\_reasoning\_summary module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_data\_attributes\_response module
--------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_data_attributes_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_data\_response module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_data_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_response module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_type module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_update\_data module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_update_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_update\_data\_attributes module
------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_update_data_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_org\_config\_update\_request module
---------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.llm_obs_org_config_update_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_project\_data\_attributes\_request module
---------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Get annotated interactions by content IDs returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi

configuration = Configuration()
configuration.unstable_operations["get_llm_obs_annotated_interactions_by_trace_i_ds"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
response = api_instance.get_llm_obs_annotated_interactions_by_trace_i_ds(
content_ids=[],
)

print(response)
14 changes: 14 additions & 0 deletions examples/v2/llm-observability/GetLLMObsOrgConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Get LLM Observability org configuration returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi

configuration = Configuration()
configuration.unstable_operations["get_llm_obs_org_config"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
response = api_instance.get_llm_obs_org_config()

print(response)
26 changes: 26 additions & 0 deletions examples/v2/llm-observability/UpdateLLMObsOrgConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
Update LLM Observability org configuration returns "No Content" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
from datadog_api_client.v2.model.llm_obs_org_config_type import LLMObsOrgConfigType
from datadog_api_client.v2.model.llm_obs_org_config_update_data import LLMObsOrgConfigUpdateData
from datadog_api_client.v2.model.llm_obs_org_config_update_data_attributes import LLMObsOrgConfigUpdateDataAttributes
from datadog_api_client.v2.model.llm_obs_org_config_update_request import LLMObsOrgConfigUpdateRequest

body = LLMObsOrgConfigUpdateRequest(
data=LLMObsOrgConfigUpdateData(
attributes=LLMObsOrgConfigUpdateDataAttributes(
trace_idle_timer_s=30,
),
id="12345",
type=LLMObsOrgConfigType.ORG_CONFIG,
),
)

configuration = Configuration()
configuration.unstable_operations["update_llm_obs_org_config"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
api_instance.update_llm_obs_org_config(body=body)
3 changes: 3 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ def __init__(
"v2.delete_llm_obs_experiments": False,
"v2.delete_llm_obs_projects": False,
"v2.get_llm_obs_annotated_interactions": False,
"v2.get_llm_obs_annotated_interactions_by_trace_i_ds": False,
"v2.get_llm_obs_annotation_queue_label_schema": False,
"v2.get_llm_obs_custom_eval_config": False,
"v2.get_llm_obs_org_config": False,
"v2.list_llm_obs_annotation_queues": False,
"v2.list_llm_obs_dataset_records": False,
"v2.list_llm_obs_datasets": False,
Expand All @@ -303,6 +305,7 @@ def __init__(
"v2.update_llm_obs_dataset": False,
"v2.update_llm_obs_dataset_records": False,
"v2.update_llm_obs_experiment": False,
"v2.update_llm_obs_org_config": False,
"v2.update_llm_obs_project": False,
"v2.anonymize_users": False,
"v2.validate": False,
Expand Down
143 changes: 143 additions & 0 deletions src/datadog_api_client/v2/api/llm_observability_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
from datadog_api_client.v2.model.llm_obs_custom_eval_config_update_request import LLMObsCustomEvalConfigUpdateRequest
from datadog_api_client.v2.model.llm_obs_data_deletion_response import LLMObsDataDeletionResponse
from datadog_api_client.v2.model.llm_obs_data_deletion_request import LLMObsDataDeletionRequest
from datadog_api_client.v2.model.llm_obs_org_config_response import LLMObsOrgConfigResponse
from datadog_api_client.v2.model.llm_obs_org_config_update_request import LLMObsOrgConfigUpdateRequest
from datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_response import (
LLMObsAnnotatedInteractionsByTraceResponse,
)
from datadog_api_client.v2.model.llm_obs_annotation_queues_response import LLMObsAnnotationQueuesResponse
from datadog_api_client.v2.model.llm_obs_annotation_queue_response import LLMObsAnnotationQueueResponse
from datadog_api_client.v2.model.llm_obs_annotation_queue_request import LLMObsAnnotationQueueRequest
Expand Down Expand Up @@ -523,6 +528,48 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._get_llm_obs_annotated_interactions_by_trace_i_ds_endpoint = _Endpoint(
settings={
"response_type": (LLMObsAnnotatedInteractionsByTraceResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/llm-obs/v1/annotated-interactions",
"operation_id": "get_llm_obs_annotated_interactions_by_trace_i_ds",
"http_method": "GET",
"version": "v2",
},
params_map={
"content_ids": {
"required": True,
"openapi_types": ([str],),
"attribute": "contentIds",
"location": "query",
"collection_format": "multi",
},
"offset": {
"validation": {
"inclusive_maximum": 2147483647,
"inclusive_minimum": 0,
},
"openapi_types": (int,),
"attribute": "offset",
"location": "query",
},
"limit": {
"validation": {
"inclusive_maximum": 2147483647,
"inclusive_minimum": 1,
},
"openapi_types": (int,),
"attribute": "limit",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._get_llm_obs_annotation_queue_label_schema_endpoint = _Endpoint(
settings={
"response_type": (LLMObsAnnotationQueueLabelSchemaResponse,),
Expand Down Expand Up @@ -569,6 +616,22 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._get_llm_obs_org_config_endpoint = _Endpoint(
settings={
"response_type": (LLMObsOrgConfigResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/llm-obs/org/config",
"operation_id": "get_llm_obs_org_config",
"http_method": "GET",
"version": "v2",
},
params_map={},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._list_llm_obs_annotation_queues_endpoint = _Endpoint(
settings={
"response_type": (LLMObsAnnotationQueuesResponse,),
Expand Down Expand Up @@ -1153,6 +1216,26 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._update_llm_obs_org_config_endpoint = _Endpoint(
settings={
"response_type": None,
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/llm-obs/org/config",
"operation_id": "update_llm_obs_org_config",
"http_method": "PUT",
"version": "v2",
},
params_map={
"body": {
"required": True,
"openapi_types": (LLMObsOrgConfigUpdateRequest,),
"location": "body",
},
},
headers_map={"accept": ["*/*"], "content_type": ["application/json"]},
api_client=api_client,
)

self._update_llm_obs_project_endpoint = _Endpoint(
settings={
"response_type": (LLMObsProjectResponse,),
Expand Down Expand Up @@ -1555,6 +1638,36 @@ def get_llm_obs_annotated_interactions(

return self._get_llm_obs_annotated_interactions_endpoint.call_with_http_info(**kwargs)

def get_llm_obs_annotated_interactions_by_trace_i_ds(
self,
content_ids: List[str],
*,
offset: Union[int, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
) -> LLMObsAnnotatedInteractionsByTraceResponse:
"""Get annotated interactions by content IDs.

Returns annotated interactions across all annotation queues for the given content IDs. Results include queue metadata (ID and name) for each interaction.

:param content_ids: One or more content IDs to retrieve annotated interactions for. At least one is required.
:type content_ids: [str]
:param offset: Pagination offset. Must be >= 0. Defaults to 0.
:type offset: int, optional
:param limit: Maximum number of results to return. Must be > 0. Defaults to 100.
:type limit: int, optional
:rtype: LLMObsAnnotatedInteractionsByTraceResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["content_ids"] = content_ids

if offset is not unset:
kwargs["offset"] = offset

if limit is not unset:
kwargs["limit"] = limit

return self._get_llm_obs_annotated_interactions_by_trace_i_ds_endpoint.call_with_http_info(**kwargs)

def get_llm_obs_annotation_queue_label_schema(
self,
queue_id: str,
Expand Down Expand Up @@ -1589,6 +1702,18 @@ def get_llm_obs_custom_eval_config(

return self._get_llm_obs_custom_eval_config_endpoint.call_with_http_info(**kwargs)

def get_llm_obs_org_config(
self,
) -> LLMObsOrgConfigResponse:
"""Get LLM Observability org configuration.

Retrieve the LLM Observability configuration for the authenticated organization.

:rtype: LLMObsOrgConfigResponse
"""
kwargs: Dict[str, Any] = {}
return self._get_llm_obs_org_config_endpoint.call_with_http_info(**kwargs)

def list_llm_obs_annotation_queues(
self,
*,
Expand Down Expand Up @@ -2135,6 +2260,24 @@ def update_llm_obs_experiment(

return self._update_llm_obs_experiment_endpoint.call_with_http_info(**kwargs)

def update_llm_obs_org_config(
self,
body: LLMObsOrgConfigUpdateRequest,
) -> None:
"""Update LLM Observability org configuration.

Update the LLM Observability configuration for the authenticated organization.
The ``trace_idle_timer_s`` value must be between 1 and 600 seconds.

:param body: Org configuration update payload.
:type body: LLMObsOrgConfigUpdateRequest
:rtype: None
"""
kwargs: Dict[str, Any] = {}
kwargs["body"] = body

return self._update_llm_obs_org_config_endpoint.call_with_http_info(**kwargs)

def update_llm_obs_project(
self,
project_id: str,
Expand Down
Loading
Loading