Skip to content

Commit eea0041

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit a310f76 of spec repo (#3811)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9f18908 commit eea0041

14 files changed

Lines changed: 262 additions & 7 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52338,6 +52338,10 @@ components:
5233852338
LLMObsCustomEvalConfigBedrockOptions:
5233952339
description: AWS Bedrock-specific options for LLM provider configuration.
5234052340
properties:
52341+
inference_profile:
52342+
description: Bedrock inference profile identifier, such as an application inference profile ARN.
52343+
example: "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123"
52344+
type: string
5234152345
region:
5234252346
description: AWS region for Bedrock.
5234352347
example: "us-east-1"
@@ -52428,6 +52432,11 @@ components:
5242852432
properties:
5242952433
assessment_criteria:
5243052434
$ref: "#/components/schemas/LLMObsCustomEvalConfigAssessmentCriteria"
52435+
context_query:
52436+
description: Query used to extract additional context for the evaluation.
52437+
example: "@input.context"
52438+
nullable: true
52439+
type: string
5243152440
inference_params:
5243252441
$ref: "#/components/schemas/LLMObsCustomEvalConfigInferenceParams"
5243352442
last_used_library_prompt_template_name:
@@ -52452,6 +52461,15 @@ components:
5245252461
items:
5245352462
$ref: "#/components/schemas/LLMObsCustomEvalConfigPromptMessage"
5245452463
type: array
52464+
target_query:
52465+
description: Query used to extract the target value to evaluate.
52466+
example: "@output.value"
52467+
nullable: true
52468+
type: string
52469+
user_specified_json_post_processing_function:
52470+
description: User-provided function applied to post-process the JSON output of the LLM judge.
52471+
nullable: true
52472+
type: string
5245552473
required:
5245652474
- inference_params
5245752475
type: object
@@ -52473,16 +52491,29 @@ components:
5247352491
vertex_ai:
5247452492
$ref: "#/components/schemas/LLMObsCustomEvalConfigVertexAIOptions"
5247552493
type: object
52494+
LLMObsCustomEvalConfigListResponse:
52495+
description: Response containing a list of custom LLM Observability evaluator configurations.
52496+
properties:
52497+
data:
52498+
description: List of custom evaluator configuration data objects.
52499+
items:
52500+
$ref: "#/components/schemas/LLMObsCustomEvalConfigData"
52501+
type: array
52502+
required:
52503+
- data
52504+
type: object
5247652505
LLMObsCustomEvalConfigParsingType:
5247752506
description: Output parsing type for a custom LLM judge evaluator.
5247852507
enum:
5247952508
- structured_output
5248052509
- json
52510+
- keyword_search
5248152511
example: "structured_output"
5248252512
type: string
5248352513
x-enum-varnames:
5248452514
- STRUCTURED_OUTPUT
5248552515
- JSON
52516+
- KEYWORD_SEARCH
5248652517
LLMObsCustomEvalConfigPromptContent:
5248752518
description: A content block within a prompt message.
5248852519
properties:
@@ -52589,6 +52620,13 @@ components:
5258952620
eval_scope:
5259052621
$ref: "#/components/schemas/LLMObsCustomEvalConfigEvalScope"
5259152622
nullable: true
52623+
experiment_project_ids:
52624+
description: Experiment project IDs this evaluator is scoped to.
52625+
items:
52626+
description: An experiment project ID.
52627+
format: uuid
52628+
type: string
52629+
type: array
5259252630
filter:
5259352631
description: Filter expression to select which spans to evaluate.
5259452632
example: "@service:my-service"
@@ -116454,6 +116492,67 @@ paths:
116454116492
x-unstable: |-
116455116493
This endpoint is in Preview and may introduce breaking changes.
116456116494
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
116495+
/api/unstable/llm-obs/config/evaluators/custom:
116496+
get:
116497+
description: List all custom LLM Observability evaluator configurations for the organization.
116498+
operationId: ListLLMObsCustomEvalConfigs
116499+
responses:
116500+
"200":
116501+
content:
116502+
application/json:
116503+
examples:
116504+
default:
116505+
value:
116506+
data:
116507+
- attributes:
116508+
category: "Custom"
116509+
created_at: "2024-01-15T10:30:00Z"
116510+
created_by:
116511+
email: "user@example.com"
116512+
eval_name: "my-custom-evaluator"
116513+
last_updated_by:
116514+
email: "user@example.com"
116515+
llm_judge_config:
116516+
inference_params:
116517+
max_tokens: 1024
116518+
temperature: 0.7
116519+
parsing_type: "structured_output"
116520+
llm_provider:
116521+
integration_provider: "openai"
116522+
model_name: "gpt-4o"
116523+
target:
116524+
application_name: "my-llm-app"
116525+
enabled: true
116526+
sampling_percentage: 50.0
116527+
updated_at: "2024-01-15T10:30:00Z"
116528+
id: "my-custom-evaluator"
116529+
type: "evaluator_config"
116530+
schema:
116531+
$ref: "#/components/schemas/LLMObsCustomEvalConfigListResponse"
116532+
description: OK
116533+
"401":
116534+
content:
116535+
application/json:
116536+
schema:
116537+
$ref: "#/components/schemas/JSONAPIErrorResponse"
116538+
description: Unauthorized
116539+
"403":
116540+
content:
116541+
application/json:
116542+
schema:
116543+
$ref: "#/components/schemas/JSONAPIErrorResponse"
116544+
description: Forbidden
116545+
"429":
116546+
$ref: "#/components/responses/TooManyRequestsResponse"
116547+
security:
116548+
- apiKeyAuth: []
116549+
appKeyAuth: []
116550+
summary: List custom evaluator configurations
116551+
tags:
116552+
- LLM Observability
116553+
x-unstable: |-
116554+
**Note**: This endpoint is in preview and is subject to change.
116555+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
116457116556
/api/unstable/llm-obs/config/evaluators/custom/{eval_name}:
116458116557
delete:
116459116558
description: Delete a custom LLM Observability evaluator configuration by its name.

docs/datadog_api_client.v2.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22180,6 +22180,13 @@ datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_integration\_provi
2218022180
:members:
2218122181
:show-inheritance:
2218222182

22183+
datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_list\_response module
22184+
-----------------------------------------------------------------------------------
22185+
22186+
.. automodule:: datadog_api_client.v2.model.llm_obs_custom_eval_config_list_response
22187+
:members:
22188+
:show-inheritance:
22189+
2218322190
datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_llm\_judge\_config module
2218422191
---------------------------------------------------------------------------------------
2218522192

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
List custom evaluator configurations returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_llm_obs_custom_eval_configs"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = LLMObservabilityApi(api_client)
12+
response = api_instance.list_llm_obs_custom_eval_configs()
13+
14+
print(response)

examples/v2/llm-observability/UpdateLLMObsCustomEvalConfig.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
],
5454
pass_when=True,
5555
),
56+
context_query="@input.context",
5657
inference_params=LLMObsCustomEvalConfigInferenceParams(
5758
frequency_penalty=0.0,
5859
max_tokens=1024,
@@ -91,9 +92,12 @@
9192
role="user",
9293
),
9394
],
95+
target_query="@output.value",
96+
user_specified_json_post_processing_function=None,
9497
),
9598
llm_provider=LLMObsCustomEvalConfigLLMProvider(
9699
bedrock=LLMObsCustomEvalConfigBedrockOptions(
100+
inference_profile="arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123",
97101
region="us-east-1",
98102
),
99103
integration_account_id="my-account-id",
@@ -108,6 +112,7 @@
108112
application_name="my-llm-app",
109113
enabled=True,
110114
eval_scope=LLMObsCustomEvalConfigEvalScope.SPAN,
115+
experiment_project_ids=[],
111116
filter="@service:my-service",
112117
root_spans_only=True,
113118
sampling_percentage=50.0,

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ def __init__(
298298
"v2.get_llm_obs_prompt": False,
299299
"v2.get_llm_obs_prompt_version": False,
300300
"v2.list_llm_obs_annotation_queues": False,
301+
"v2.list_llm_obs_custom_eval_configs": False,
301302
"v2.list_llm_obs_dataset_records": False,
302303
"v2.list_llm_obs_datasets": False,
303304
"v2.list_llm_obs_dataset_versions": False,

src/datadog_api_client/v2/api/llm_observability_api.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
UnsetType,
1414
unset,
1515
)
16+
from datadog_api_client.v2.model.llm_obs_custom_eval_config_list_response import LLMObsCustomEvalConfigListResponse
1617
from datadog_api_client.v2.model.llm_obs_custom_eval_config_response import LLMObsCustomEvalConfigResponse
1718
from datadog_api_client.v2.model.llm_obs_custom_eval_config_update_request import LLMObsCustomEvalConfigUpdateRequest
1819
from datadog_api_client.v2.model.llm_obs_data_deletion_response import LLMObsDataDeletionResponse
@@ -1029,6 +1030,22 @@ def __init__(self, api_client=None):
10291030
api_client=api_client,
10301031
)
10311032

1033+
self._list_llm_obs_custom_eval_configs_endpoint = _Endpoint(
1034+
settings={
1035+
"response_type": (LLMObsCustomEvalConfigListResponse,),
1036+
"auth": ["apiKeyAuth", "appKeyAuth"],
1037+
"endpoint_path": "/api/unstable/llm-obs/config/evaluators/custom",
1038+
"operation_id": "list_llm_obs_custom_eval_configs",
1039+
"http_method": "GET",
1040+
"version": "v2",
1041+
},
1042+
params_map={},
1043+
headers_map={
1044+
"accept": ["application/json"],
1045+
},
1046+
api_client=api_client,
1047+
)
1048+
10321049
self._list_llm_obs_dataset_records_endpoint = _Endpoint(
10331050
settings={
10341051
"response_type": (LLMObsDatasetRecordsListResponse,),
@@ -2921,6 +2938,18 @@ def list_llm_obs_annotation_queues(
29212938

29222939
return self._list_llm_obs_annotation_queues_endpoint.call_with_http_info(**kwargs)
29232940

2941+
def list_llm_obs_custom_eval_configs(
2942+
self,
2943+
) -> LLMObsCustomEvalConfigListResponse:
2944+
"""List custom evaluator configurations.
2945+
2946+
List all custom LLM Observability evaluator configurations for the organization.
2947+
2948+
:rtype: LLMObsCustomEvalConfigListResponse
2949+
"""
2950+
kwargs: Dict[str, Any] = {}
2951+
return self._list_llm_obs_custom_eval_configs_endpoint.call_with_http_info(**kwargs)
2952+
29242953
def list_llm_obs_dataset_records(
29252954
self,
29262955
project_id: str,

src/datadog_api_client/v2/model/llm_obs_custom_eval_config_bedrock_options.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,29 @@ class LLMObsCustomEvalConfigBedrockOptions(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"inference_profile": (str,),
2021
"region": (str,),
2122
}
2223

2324
attribute_map = {
25+
"inference_profile": "inference_profile",
2426
"region": "region",
2527
}
2628

27-
def __init__(self_, region: Union[str, UnsetType] = unset, **kwargs):
29+
def __init__(
30+
self_, inference_profile: Union[str, UnsetType] = unset, region: Union[str, UnsetType] = unset, **kwargs
31+
):
2832
"""
2933
AWS Bedrock-specific options for LLM provider configuration.
3034
35+
:param inference_profile: Bedrock inference profile identifier, such as an application inference profile ARN.
36+
:type inference_profile: str, optional
37+
3138
:param region: AWS region for Bedrock.
3239
:type region: str, optional
3340
"""
41+
if inference_profile is not unset:
42+
kwargs["inference_profile"] = inference_profile
3443
if region is not unset:
3544
kwargs["region"] = region
3645
super().__init__(kwargs)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.llm_obs_custom_eval_config_data import LLMObsCustomEvalConfigData
16+
17+
18+
class LLMObsCustomEvalConfigListResponse(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
from datadog_api_client.v2.model.llm_obs_custom_eval_config_data import LLMObsCustomEvalConfigData
22+
23+
return {
24+
"data": ([LLMObsCustomEvalConfigData],),
25+
}
26+
27+
attribute_map = {
28+
"data": "data",
29+
}
30+
31+
def __init__(self_, data: List[LLMObsCustomEvalConfigData], **kwargs):
32+
"""
33+
Response containing a list of custom LLM Observability evaluator configurations.
34+
35+
:param data: List of custom evaluator configuration data objects.
36+
:type data: [LLMObsCustomEvalConfigData]
37+
"""
38+
super().__init__(kwargs)
39+
40+
self_.data = data

0 commit comments

Comments
 (0)