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
613 changes: 613 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16517,6 +16517,167 @@ datadog\_api\_client.v2.model.llm\_obs\_cursor\_meta module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_assessment\_criteria module
-----------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_attributes module
-------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_bedrock\_options module
-------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_data module
-------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_eval\_scope module
--------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_inference\_params module
--------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_integration\_provider module
------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_llm\_judge\_config module
---------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_llm\_provider module
----------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_parsing\_type module
----------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_prompt\_content module
------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_prompt\_content\_value module
-------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_prompt\_message module
------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_prompt\_tool\_call module
---------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_prompt\_tool\_result module
-----------------------------------------------------------------------------------------

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

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

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_target module
---------------------------------------------------------------------------

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

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

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_update\_attributes module
---------------------------------------------------------------------------------------

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

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

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

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

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_user module
-------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.llm\_obs\_custom\_eval\_config\_vertex\_ai\_options module
----------------------------------------------------------------------------------------

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

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

Expand Down
14 changes: 14 additions & 0 deletions examples/v2/llm-observability/DeleteLLMObsCustomEvalConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Delete a custom evaluator configuration returns "No Content" response
"""

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

configuration = Configuration()
configuration.unstable_operations["delete_llm_obs_custom_eval_config"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
api_instance.delete_llm_obs_custom_eval_config(
eval_name="eval_name",
)
16 changes: 16 additions & 0 deletions examples/v2/llm-observability/GetLLMObsCustomEvalConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Get a custom evaluator 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_custom_eval_config"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
response = api_instance.get_llm_obs_custom_eval_config(
eval_name="eval_name",
)

print(response)
125 changes: 125 additions & 0 deletions examples/v2/llm-observability/UpdateLLMObsCustomEvalConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
"""
Create or update a custom evaluator configuration returns "OK" 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_custom_eval_config_assessment_criteria import (
LLMObsCustomEvalConfigAssessmentCriteria,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_bedrock_options import LLMObsCustomEvalConfigBedrockOptions
from datadog_api_client.v2.model.llm_obs_custom_eval_config_eval_scope import LLMObsCustomEvalConfigEvalScope
from datadog_api_client.v2.model.llm_obs_custom_eval_config_inference_params import (
LLMObsCustomEvalConfigInferenceParams,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_integration_provider import (
LLMObsCustomEvalConfigIntegrationProvider,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_llm_judge_config import LLMObsCustomEvalConfigLLMJudgeConfig
from datadog_api_client.v2.model.llm_obs_custom_eval_config_llm_provider import LLMObsCustomEvalConfigLLMProvider
from datadog_api_client.v2.model.llm_obs_custom_eval_config_parsing_type import LLMObsCustomEvalConfigParsingType
from datadog_api_client.v2.model.llm_obs_custom_eval_config_prompt_content import LLMObsCustomEvalConfigPromptContent
from datadog_api_client.v2.model.llm_obs_custom_eval_config_prompt_content_value import (
LLMObsCustomEvalConfigPromptContentValue,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_prompt_message import LLMObsCustomEvalConfigPromptMessage
from datadog_api_client.v2.model.llm_obs_custom_eval_config_prompt_tool_call import LLMObsCustomEvalConfigPromptToolCall
from datadog_api_client.v2.model.llm_obs_custom_eval_config_prompt_tool_result import (
LLMObsCustomEvalConfigPromptToolResult,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_target import LLMObsCustomEvalConfigTarget
from datadog_api_client.v2.model.llm_obs_custom_eval_config_type import LLMObsCustomEvalConfigType
from datadog_api_client.v2.model.llm_obs_custom_eval_config_update_attributes import (
LLMObsCustomEvalConfigUpdateAttributes,
)
from datadog_api_client.v2.model.llm_obs_custom_eval_config_update_data import LLMObsCustomEvalConfigUpdateData
from datadog_api_client.v2.model.llm_obs_custom_eval_config_update_request import LLMObsCustomEvalConfigUpdateRequest
from datadog_api_client.v2.model.llm_obs_custom_eval_config_vertex_ai_options import (
LLMObsCustomEvalConfigVertexAIOptions,
)

body = LLMObsCustomEvalConfigUpdateRequest(
data=LLMObsCustomEvalConfigUpdateData(
attributes=LLMObsCustomEvalConfigUpdateAttributes(
category="Custom",
eval_name="my-custom-evaluator",
llm_judge_config=LLMObsCustomEvalConfigLLMJudgeConfig(
assessment_criteria=LLMObsCustomEvalConfigAssessmentCriteria(
max_threshold=1.0,
min_threshold=0.7,
pass_values=[
"pass",
"yes",
],
pass_when=True,
),
inference_params=LLMObsCustomEvalConfigInferenceParams(
frequency_penalty=0.0,
max_tokens=1024,
presence_penalty=0.0,
temperature=0.7,
top_k=50,
top_p=1.0,
),
last_used_library_prompt_template_name="sentiment-analysis-v1",
modified_library_prompt_template=False,
output_schema=None,
parsing_type=LLMObsCustomEvalConfigParsingType.STRUCTURED_OUTPUT,
prompt_template=[
LLMObsCustomEvalConfigPromptMessage(
content="Rate the quality of the following response:",
contents=[
LLMObsCustomEvalConfigPromptContent(
type="text",
value=LLMObsCustomEvalConfigPromptContentValue(
text="What is the sentiment of this review?",
tool_call=LLMObsCustomEvalConfigPromptToolCall(
arguments='{"location": "San Francisco"}',
id="call_abc123",
name="get_weather",
type="function",
),
tool_call_result=LLMObsCustomEvalConfigPromptToolResult(
name="get_weather",
result="sunny, 72F",
tool_id="call_abc123",
type="function",
),
),
),
],
role="user",
),
],
),
llm_provider=LLMObsCustomEvalConfigLLMProvider(
bedrock=LLMObsCustomEvalConfigBedrockOptions(
region="us-east-1",
),
integration_account_id="my-account-id",
integration_provider=LLMObsCustomEvalConfigIntegrationProvider.OPENAI,
model_name="gpt-4o",
vertex_ai=LLMObsCustomEvalConfigVertexAIOptions(
location="us-central1",
project="my-gcp-project",
),
),
target=LLMObsCustomEvalConfigTarget(
application_name="my-llm-app",
enabled=True,
eval_scope=LLMObsCustomEvalConfigEvalScope.SPAN,
filter="@service:my-service",
root_spans_only=True,
sampling_percentage=50.0,
),
),
id="my-custom-evaluator",
type=LLMObsCustomEvalConfigType.EVALUATOR_CONFIG,
),
)

configuration = Configuration()
configuration.unstable_operations["update_llm_obs_custom_eval_config"] = True
with ApiClient(configuration) as api_client:
api_instance = LLMObservabilityApi(api_client)
api_instance.update_llm_obs_custom_eval_config(eval_name="eval_name", body=body)
51 changes: 27 additions & 24 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,33 @@ def __init__(
"v2.list_fleet_schedules": False,
"v2.trigger_fleet_schedule": False,
"v2.update_fleet_schedule": False,
"v2.create_llm_obs_annotation_queue": False,
"v2.create_llm_obs_annotation_queue_interactions": False,
"v2.create_llm_obs_dataset": False,
"v2.create_llm_obs_dataset_records": False,
"v2.create_llm_obs_experiment": False,
"v2.create_llm_obs_experiment_events": False,
"v2.create_llm_obs_project": False,
"v2.delete_llm_obs_annotation_queue": False,
"v2.delete_llm_obs_annotation_queue_interactions": False,
"v2.delete_llm_obs_custom_eval_config": False,
"v2.delete_llm_obs_dataset_records": False,
"v2.delete_llm_obs_datasets": False,
"v2.delete_llm_obs_experiments": False,
"v2.delete_llm_obs_projects": False,
"v2.get_llm_obs_annotated_interactions": False,
"v2.get_llm_obs_custom_eval_config": False,
"v2.list_llm_obs_annotation_queues": False,
"v2.list_llm_obs_dataset_records": False,
"v2.list_llm_obs_datasets": False,
"v2.list_llm_obs_experiments": False,
"v2.list_llm_obs_projects": False,
"v2.update_llm_obs_annotation_queue": False,
"v2.update_llm_obs_custom_eval_config": False,
"v2.update_llm_obs_dataset": False,
"v2.update_llm_obs_dataset_records": False,
"v2.update_llm_obs_experiment": False,
"v2.update_llm_obs_project": False,
"v2.create_open_api": False,
"v2.delete_open_api": False,
"v2.get_open_api": False,
Expand Down Expand Up @@ -409,30 +436,6 @@ def __init__(
"v2.update_jira_issue_template": False,
"v2.create_tenancy_config": False,
"v2.get_tenancy_configs": False,
"v2.create_llm_obs_annotation_queue": False,
"v2.create_llm_obs_annotation_queue_interactions": False,
"v2.create_llm_obs_dataset": False,
"v2.create_llm_obs_dataset_records": False,
"v2.create_llm_obs_experiment": False,
"v2.create_llm_obs_experiment_events": False,
"v2.create_llm_obs_project": False,
"v2.delete_llm_obs_annotation_queue": False,
"v2.delete_llm_obs_annotation_queue_interactions": False,
"v2.delete_llm_obs_dataset_records": False,
"v2.delete_llm_obs_datasets": False,
"v2.delete_llm_obs_experiments": False,
"v2.delete_llm_obs_projects": False,
"v2.get_llm_obs_annotated_interactions": False,
"v2.list_llm_obs_annotation_queues": False,
"v2.list_llm_obs_dataset_records": False,
"v2.list_llm_obs_datasets": False,
"v2.list_llm_obs_experiments": False,
"v2.list_llm_obs_projects": False,
"v2.update_llm_obs_annotation_queue": False,
"v2.update_llm_obs_dataset": False,
"v2.update_llm_obs_dataset_records": False,
"v2.update_llm_obs_experiment": False,
"v2.update_llm_obs_project": False,
"v2.add_role_to_restriction_query": False,
"v2.create_restriction_query": False,
"v2.delete_restriction_query": False,
Expand Down
Loading
Loading