Skip to content

Commit 4e3ffca

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8124774 of spec repo
1 parent 1030403 commit 4e3ffca

38 files changed

Lines changed: 3630 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 946 additions & 0 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18358,6 +18358,48 @@ datadog\_api\_client.v2.model.llm\_obs\_annotation\_schema module
1835818358
:members:
1835918359
:show-inheritance:
1836018360

18361+
datadog\_api\_client.v2.model.llm\_obs\_anthropic\_effort module
18362+
----------------------------------------------------------------
18363+
18364+
.. automodule:: datadog_api_client.v2.model.llm_obs_anthropic_effort
18365+
:members:
18366+
:show-inheritance:
18367+
18368+
datadog\_api\_client.v2.model.llm\_obs\_anthropic\_metadata module
18369+
------------------------------------------------------------------
18370+
18371+
.. automodule:: datadog_api_client.v2.model.llm_obs_anthropic_metadata
18372+
:members:
18373+
:show-inheritance:
18374+
18375+
datadog\_api\_client.v2.model.llm\_obs\_anthropic\_thinking\_config module
18376+
--------------------------------------------------------------------------
18377+
18378+
.. automodule:: datadog_api_client.v2.model.llm_obs_anthropic_thinking_config
18379+
:members:
18380+
:show-inheritance:
18381+
18382+
datadog\_api\_client.v2.model.llm\_obs\_anthropic\_thinking\_type module
18383+
------------------------------------------------------------------------
18384+
18385+
.. automodule:: datadog_api_client.v2.model.llm_obs_anthropic_thinking_type
18386+
:members:
18387+
:show-inheritance:
18388+
18389+
datadog\_api\_client.v2.model.llm\_obs\_azure\_open\_ai\_metadata module
18390+
------------------------------------------------------------------------
18391+
18392+
.. automodule:: datadog_api_client.v2.model.llm_obs_azure_open_ai_metadata
18393+
:members:
18394+
:show-inheritance:
18395+
18396+
datadog\_api\_client.v2.model.llm\_obs\_bedrock\_metadata module
18397+
----------------------------------------------------------------
18398+
18399+
.. automodule:: datadog_api_client.v2.model.llm_obs_bedrock_metadata
18400+
:members:
18401+
:show-inheritance:
18402+
1836118403
datadog\_api\_client.v2.model.llm\_obs\_content\_block module
1836218404
-------------------------------------------------------------
1836318405

@@ -19345,6 +19387,125 @@ datadog\_api\_client.v2.model.llm\_obs\_experiments\_response module
1934519387
:members:
1934619388
:show-inheritance:
1934719389

19390+
datadog\_api\_client.v2.model.llm\_obs\_inference\_code module
19391+
--------------------------------------------------------------
19392+
19393+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_code
19394+
:members:
19395+
:show-inheritance:
19396+
19397+
datadog\_api\_client.v2.model.llm\_obs\_inference\_content module
19398+
-----------------------------------------------------------------
19399+
19400+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_content
19401+
:members:
19402+
:show-inheritance:
19403+
19404+
datadog\_api\_client.v2.model.llm\_obs\_inference\_content\_value module
19405+
------------------------------------------------------------------------
19406+
19407+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_content_value
19408+
:members:
19409+
:show-inheritance:
19410+
19411+
datadog\_api\_client.v2.model.llm\_obs\_inference\_error\_response module
19412+
-------------------------------------------------------------------------
19413+
19414+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_error_response
19415+
:members:
19416+
:show-inheritance:
19417+
19418+
datadog\_api\_client.v2.model.llm\_obs\_inference\_function module
19419+
------------------------------------------------------------------
19420+
19421+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_function
19422+
:members:
19423+
:show-inheritance:
19424+
19425+
datadog\_api\_client.v2.model.llm\_obs\_inference\_message module
19426+
-----------------------------------------------------------------
19427+
19428+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_message
19429+
:members:
19430+
:show-inheritance:
19431+
19432+
datadog\_api\_client.v2.model.llm\_obs\_inference\_run\_result module
19433+
---------------------------------------------------------------------
19434+
19435+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_run_result
19436+
:members:
19437+
:show-inheritance:
19438+
19439+
datadog\_api\_client.v2.model.llm\_obs\_inference\_tool module
19440+
--------------------------------------------------------------
19441+
19442+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_tool
19443+
:members:
19444+
:show-inheritance:
19445+
19446+
datadog\_api\_client.v2.model.llm\_obs\_inference\_tool\_call module
19447+
--------------------------------------------------------------------
19448+
19449+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_tool_call
19450+
:members:
19451+
:show-inheritance:
19452+
19453+
datadog\_api\_client.v2.model.llm\_obs\_inference\_tool\_result module
19454+
----------------------------------------------------------------------
19455+
19456+
.. automodule:: datadog_api_client.v2.model.llm_obs_inference_tool_result
19457+
:members:
19458+
:show-inheritance:
19459+
19460+
datadog\_api\_client.v2.model.llm\_obs\_integration\_account module
19461+
-------------------------------------------------------------------
19462+
19463+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_account
19464+
:members:
19465+
:show-inheritance:
19466+
19467+
datadog\_api\_client.v2.model.llm\_obs\_integration\_inference\_request module
19468+
------------------------------------------------------------------------------
19469+
19470+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_inference_request
19471+
:members:
19472+
:show-inheritance:
19473+
19474+
datadog\_api\_client.v2.model.llm\_obs\_integration\_inference\_response module
19475+
-------------------------------------------------------------------------------
19476+
19477+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_inference_response
19478+
:members:
19479+
:show-inheritance:
19480+
19481+
datadog\_api\_client.v2.model.llm\_obs\_integration\_model module
19482+
-----------------------------------------------------------------
19483+
19484+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_model
19485+
:members:
19486+
:show-inheritance:
19487+
19488+
datadog\_api\_client.v2.model.llm\_obs\_integration\_model\_region\_prefix\_overrides module
19489+
--------------------------------------------------------------------------------------------
19490+
19491+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_model_region_prefix_overrides
19492+
:members:
19493+
:show-inheritance:
19494+
19495+
datadog\_api\_client.v2.model.llm\_obs\_integration\_name module
19496+
----------------------------------------------------------------
19497+
19498+
.. automodule:: datadog_api_client.v2.model.llm_obs_integration_name
19499+
:members:
19500+
:show-inheritance:
19501+
19502+
datadog\_api\_client.v2.model.llm\_obs\_internal\_reasoning module
19503+
------------------------------------------------------------------
19504+
19505+
.. automodule:: datadog_api_client.v2.model.llm_obs_internal_reasoning
19506+
:members:
19507+
:show-inheritance:
19508+
1934819509
datadog\_api\_client.v2.model.llm\_obs\_label\_schema module
1934919510
------------------------------------------------------------
1935019511

@@ -19373,6 +19534,27 @@ datadog\_api\_client.v2.model.llm\_obs\_metric\_score\_type module
1937319534
:members:
1937419535
:show-inheritance:
1937519536

19537+
datadog\_api\_client.v2.model.llm\_obs\_open\_ai\_metadata module
19538+
-----------------------------------------------------------------
19539+
19540+
.. automodule:: datadog_api_client.v2.model.llm_obs_open_ai_metadata
19541+
:members:
19542+
:show-inheritance:
19543+
19544+
datadog\_api\_client.v2.model.llm\_obs\_open\_ai\_reasoning\_effort module
19545+
--------------------------------------------------------------------------
19546+
19547+
.. automodule:: datadog_api_client.v2.model.llm_obs_open_ai_reasoning_effort
19548+
:members:
19549+
:show-inheritance:
19550+
19551+
datadog\_api\_client.v2.model.llm\_obs\_open\_ai\_reasoning\_summary module
19552+
---------------------------------------------------------------------------
19553+
19554+
.. automodule:: datadog_api_client.v2.model.llm_obs_open_ai_reasoning_summary
19555+
:members:
19556+
:show-inheritance:
19557+
1937619558
datadog\_api\_client.v2.model.llm\_obs\_project\_data\_attributes\_request module
1937719559
---------------------------------------------------------------------------------
1937819560

@@ -19625,6 +19807,13 @@ datadog\_api\_client.v2.model.llm\_obs\_trace\_interaction\_type module
1962519807
:members:
1962619808
:show-inheritance:
1962719809

19810+
datadog\_api\_client.v2.model.llm\_obs\_vertex\_ai\_metadata module
19811+
-------------------------------------------------------------------
19812+
19813+
.. automodule:: datadog_api_client.v2.model.llm_obs_vertex_ai_metadata
19814+
:members:
19815+
:show-inheritance:
19816+
1962819817
datadog\_api\_client.v2.model.log module
1962919818
----------------------------------------
1963019819

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
"""
2+
Run an LLM inference 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+
from datadog_api_client.v2.model.llm_obs_anthropic_effort import LLMObsAnthropicEffort
8+
from datadog_api_client.v2.model.llm_obs_anthropic_metadata import LLMObsAnthropicMetadata
9+
from datadog_api_client.v2.model.llm_obs_anthropic_thinking_config import LLMObsAnthropicThinkingConfig
10+
from datadog_api_client.v2.model.llm_obs_anthropic_thinking_type import LLMObsAnthropicThinkingType
11+
from datadog_api_client.v2.model.llm_obs_azure_open_ai_metadata import LLMObsAzureOpenAIMetadata
12+
from datadog_api_client.v2.model.llm_obs_bedrock_metadata import LLMObsBedrockMetadata
13+
from datadog_api_client.v2.model.llm_obs_inference_content import LLMObsInferenceContent
14+
from datadog_api_client.v2.model.llm_obs_inference_content_value import LLMObsInferenceContentValue
15+
from datadog_api_client.v2.model.llm_obs_inference_function import LLMObsInferenceFunction
16+
from datadog_api_client.v2.model.llm_obs_inference_message import LLMObsInferenceMessage
17+
from datadog_api_client.v2.model.llm_obs_inference_tool import LLMObsInferenceTool
18+
from datadog_api_client.v2.model.llm_obs_inference_tool_call import LLMObsInferenceToolCall
19+
from datadog_api_client.v2.model.llm_obs_inference_tool_result import LLMObsInferenceToolResult
20+
from datadog_api_client.v2.model.llm_obs_integration_inference_request import LLMObsIntegrationInferenceRequest
21+
from datadog_api_client.v2.model.llm_obs_integration_name import LLMObsIntegrationName
22+
from datadog_api_client.v2.model.llm_obs_open_ai_metadata import LLMObsOpenAIMetadata
23+
from datadog_api_client.v2.model.llm_obs_open_ai_reasoning_effort import LLMObsOpenAIReasoningEffort
24+
from datadog_api_client.v2.model.llm_obs_open_ai_reasoning_summary import LLMObsOpenAIReasoningSummary
25+
from datadog_api_client.v2.model.llm_obs_vertex_ai_metadata import LLMObsVertexAIMetadata
26+
27+
body = LLMObsIntegrationInferenceRequest(
28+
anthropic_metadata=LLMObsAnthropicMetadata(
29+
effort=LLMObsAnthropicEffort.MEDIUM,
30+
thinking=LLMObsAnthropicThinkingConfig(
31+
budget_tokens=1024,
32+
type=LLMObsAnthropicThinkingType.ENABLED,
33+
),
34+
),
35+
azure_openai_metadata=LLMObsAzureOpenAIMetadata(
36+
deployment_id="my-gpt4-deployment",
37+
model_version="0613",
38+
resource_name="my-azure-resource",
39+
),
40+
bedrock_metadata=LLMObsBedrockMetadata(
41+
region="us-east-1",
42+
),
43+
frequency_penalty=0.0,
44+
json_schema='{"type":"object","properties":{"answer":{"type":"string"}}}',
45+
max_completion_tokens=1024,
46+
max_tokens=1024,
47+
messages=[
48+
LLMObsInferenceMessage(
49+
content="What is the capital of France?",
50+
contents=[
51+
LLMObsInferenceContent(
52+
type="text",
53+
value=LLMObsInferenceContentValue(
54+
text="Hello, how can I help you?",
55+
tool_call=LLMObsInferenceToolCall(
56+
arguments=dict([("location", "San Francisco")]),
57+
name="get_weather",
58+
tool_id="call_abc123",
59+
type="function",
60+
),
61+
tool_call_result=LLMObsInferenceToolResult(
62+
name="get_weather",
63+
result="The weather in San Francisco is 68°F and sunny.",
64+
tool_id="call_abc123",
65+
type="function",
66+
),
67+
),
68+
),
69+
],
70+
id="msg_001",
71+
role="user",
72+
tool_calls=[
73+
LLMObsInferenceToolCall(
74+
arguments=dict([("location", "San Francisco")]),
75+
name="get_weather",
76+
tool_id="call_abc123",
77+
type="function",
78+
),
79+
],
80+
tool_results=[
81+
LLMObsInferenceToolResult(
82+
name="get_weather",
83+
result="The weather in San Francisco is 68°F and sunny.",
84+
tool_id="call_abc123",
85+
type="function",
86+
),
87+
],
88+
),
89+
],
90+
model_id="gpt-4o",
91+
openai_metadata=LLMObsOpenAIMetadata(
92+
reasoning_effort=LLMObsOpenAIReasoningEffort.MEDIUM,
93+
reasoning_summary=LLMObsOpenAIReasoningSummary.AUTO,
94+
),
95+
presence_penalty=0.0,
96+
temperature=0.7,
97+
tools=[
98+
LLMObsInferenceTool(
99+
function=LLMObsInferenceFunction(
100+
description="Get the current weather for a location.",
101+
name="get_weather",
102+
parameters=dict([("properties", "{'location': {'type': 'string'}}"), ("type", "object")]),
103+
),
104+
type="function",
105+
),
106+
],
107+
top_k=50,
108+
top_p=1.0,
109+
vertex_ai_metadata=LLMObsVertexAIMetadata(
110+
location="us-central1",
111+
project="my-gcp-project",
112+
project_ids=[
113+
"my-gcp-project",
114+
],
115+
),
116+
)
117+
118+
configuration = Configuration()
119+
configuration.unstable_operations["create_llm_obs_integration_inference"] = True
120+
with ApiClient(configuration) as api_client:
121+
api_instance = LLMObservabilityApi(api_client)
122+
response = api_instance.create_llm_obs_integration_inference(
123+
integration=LLMObsIntegrationName.OPENAI, account_id="account_id", body=body
124+
)
125+
126+
print(response)

0 commit comments

Comments
 (0)