Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f9fe66a
Add openai java test app
ygree Feb 19, 2026
8829033
Generate missing cassettes. openai-java generates requests differently.
ygree Feb 20, 2026
53695b1
Add /evp_proxy/v4 support for openai-java tests
ygree Feb 20, 2026
91edef8
Fix TestOpenAiEmbeddingInteractions for java.
ygree Feb 27, 2026
eda8ace
set env and version in openai-java test app
ygree Feb 27, 2026
d26893b
Fix openai_app
ygree Mar 6, 2026
c9c6534
Merge branch 'main' into ygree/openai-java-tests
ygree Mar 17, 2026
5765ba8
Update docker image
ygree Mar 17, 2026
fec0549
detect the latest openai version by default
ygree Mar 17, 2026
5d0c54e
java: implement LLMObs parametric tests
ygree Mar 17, 2026
dc6c188
manifests: mark Test_Dataset as incomplete_test_app for Java
ygree Mar 17, 2026
1201239
fix: set FLOAT encoding format in Java embedding call to align with o…
ygree Mar 17, 2026
0289d40
fix format
ygree Mar 18, 2026
06e1c30
remove gradle init
ygree Mar 18, 2026
31eeed7
fix: handle missing ml_app in evaluation submission
ygree Mar 19, 2026
e039b7f
feat(ci): add openai-java weblog to integration_frameworks_weblogs
ygree Mar 19, 2026
ea45820
fix(openai-java): use multi-stage build with runtime image and app.sh
ygree Mar 19, 2026
9604517
Enable llm/openai java tests starting v1.61.0
ygree Mar 24, 2026
a8b160e
Merge branch 'main' into ygree/openai-java-tests
ygree Mar 24, 2026
27ae1f8
Merge branch 'main' into ygree/openai-java-tests
ygree Mar 25, 2026
6f7a4d1
Merge branch 'main' into ygree/openai-java-tests
ygree Mar 25, 2026
769c962
Update integration_frameworks.py
ygree Mar 25, 2026
2186eba
Merge branch 'main' into ygree/openai-java-tests
ygree Mar 25, 2026
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
11 changes: 10 additions & 1 deletion manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3068,6 +3068,8 @@ manifest:
tests/ffe/test_exposures.py::Test_FFE_EXP_5_Missing_Targeting_Key: bug (FFL-1729)
tests/ffe/test_flag_eval_metrics.py: missing_feature
tests/integration_frameworks/llm/anthropic/test_anthropic_llmobs.py::TestAnthropicLlmObsMessages::test_create_error: bug (MLOB-1234)
tests/integration_frameworks/llm/openai/test_openai_apm.py: v1.61.0
tests/integration_frameworks/llm/openai/test_openai_llmobs.py: v1.61.0
tests/integrations/crossed_integrations/test_kafka.py::Test_Kafka:
- weblog_declaration:
"*": irrelevant
Expand Down Expand Up @@ -3566,7 +3568,14 @@ manifest:
tests/parametric/test_library_tracestats.py::Test_Library_Tracestats::test_sample_rate_0_TS007: # Modified by easy win activation script
- declaration: 'missing_feature (FIXME: Undefined behavior according the java tracer core team)'
component_version: <1.58.2+06122213c8
tests/parametric/test_llm_observability/: incomplete_test_app
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation: missing_feature (prompt annotation not supported in Java LLMObs SDK)
Comment thread
ygree marked this conversation as resolved.
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_default_id: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_in_annotation_context: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_supports_hallucinations: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_supports_tags: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_updates_existing_prompt: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability.py::Test_Prompts::test_prompt_annotation_with_string_template: missing_feature (prompt annotation not supported in Java LLMObs SDK)
tests/parametric/test_llm_observability/test_llm_observability_dne.py::Test_Dataset::test_dataset_create_delete: incomplete_test_app (Java parametric app does not implement /llm_observability/dataset endpoints)
tests/parametric/test_otel_api_interoperability.py: missing_feature
tests/parametric/test_otel_env_vars.py::Test_Otel_Env_Vars: v1.35.2
tests/parametric/test_otel_env_vars.py::Test_Otel_Env_Vars::test_dd_trace_sample_ignore_parent_false: missing_feature (dd_trace_sample_ignore_parent requires an RFC, this feature is not implemented in any language)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ def test_embedding(self, test_agent: TestAgentAPI, test_client: FrameworkTestCli
metrics=mock.ANY,
)
assert llm_span_event["metrics"]["input_tokens"] == mock.ANY
assert llm_span_event["metrics"]["output_tokens"] == mock.ANY
Comment thread
Kyle-Verhoog marked this conversation as resolved.
assert llm_span_event["metrics"]["total_tokens"] == mock.ANY

def test_embedding_error(self, test_agent: TestAgentAPI, test_client: FrameworkTestClientApi):
Expand Down
3 changes: 3 additions & 0 deletions tests/integration_frameworks/llm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def _library_to_language_tag() -> str:
if context.library == "nodejs":
return "javascript"

if context.library == "java":
return "jvm"

return context.library.name


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"request": {
"method": "POST",
"url": "https://api.openai.com/v1/chat/completions",
"headers": {
"User-Agent": "OpenAIClientImpl/Java unknown",
"X-Stainless-Arch": "arm64",
"X-Stainless-Lang": "java",
"X-Stainless-OS": "Linux",
"X-Stainless-OS-Version": "6.12.65-linuxkit",
"X-Stainless-Package-Version": "unknown",
"X-Stainless-Retry-Count": "0",
"X-Stainless-Runtime": "JRE",
"X-Stainless-Runtime-Version": "17.0.9",
"X-Stainless-Read-Timeout": "600",
"X-Stainless-Timeout": "600",
"Content-Type": "application/json",
"Content-Length": "96",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip"
},
"body": "{\"messages\":[{\"content\":\"Hello OpenAI!\",\"role\":\"user\"}],\"model\":\"gpt-3.5-turbo\",\"max_tokens\":35}"
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": "Fri, 20 Feb 2026 00:00:43 GMT",
"Content-Type": "application/json",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"access-control-expose-headers": "X-Request-ID",
"openai-processing-ms": "796",
"openai-project": "proj_gt6TQZPRbZfoY2J9AQlEJMpd",
"openai-version": "2020-10-01",
"Server": "cloudflare",
"x-ratelimit-limit-requests": "10000",
"x-ratelimit-limit-tokens": "50000000",
"x-ratelimit-remaining-requests": "9999",
"x-ratelimit-remaining-tokens": "49999994",
"x-ratelimit-reset-requests": "6ms",
"x-ratelimit-reset-tokens": "0s",
"x-request-id": "req_ac2897c2c6e840a0a0e12c7684ecfaae",
"x-openai-proxy-wasm": "v0.1",
"cf-cache-status": "DYNAMIC",
"set-cookie": "__cf_bm=gxZLEchqKMKTztQgXT8SUS624bU_sDykIXEy5gIFT_0-1771545642.824098-1.0.1.1-QpgexMX9Wbte8oAZv3LqUJZ1h0k6pkjTClR8qrer4op9P_ZpyvkkAKda8jZv24esL4dcf9wH2J0QFkZwslpRyBNi17Ws.QFAgt18DyHO8dv4c_nHnZ_4GYCIU1r8ldNt; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Fri, 20 Feb 2026 00:30:43 GMT",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
"X-Content-Type-Options": "nosniff",
"Content-Encoding": "gzip",
"CF-RAY": "9d09b9aba85630ad-SEA",
"alt-svc": "h3=\":443\"; ma=86400"
},
"body": "{\n \"id\": \"chatcmpl-DB8ElAOKW90QXI3wOJx1LBxBOdfgf\",\n \"object\": \"chat.completion\",\n \"created\": 1771545643,\n \"model\": \"gpt-3.5-turbo-0125\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 11,\n \"completion_tokens\": 9,\n \"total_tokens\": 20,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"request": {
"method": "POST",
"url": "https://api.openai.com/v1/chat/completions",
"headers": {
"User-Agent": "OpenAIClientImpl/Java unknown",
"X-Stainless-Arch": "arm64",
"X-Stainless-Lang": "java",
"X-Stainless-OS": "Linux",
"X-Stainless-OS-Version": "6.12.65-linuxkit",
"X-Stainless-Package-Version": "unknown",
"X-Stainless-Retry-Count": "0",
"X-Stainless-Runtime": "JRE",
"X-Stainless-Runtime-Version": "17.0.9",
"X-Stainless-Read-Timeout": "600",
"X-Stainless-Timeout": "600",
"Content-Type": "application/json",
"Content-Length": "537",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip"
},
"body": "{\"messages\":[{\"content\":\"Bob is a student at Stanford University. He is studying computer science.\",\"role\":\"user\"}],\"model\":\"gpt-3.5-turbo\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"extract_student_info\",\"description\":\"Get the student information from the body of the input text\",\"parameters\":{\"type\":\"object\",\"properties\":{\"major\":{\"description\":\"Major subject.\",\"type\":\"string\"},\"school\":{\"description\":\"The university name.\",\"type\":\"string\"},\"name\":{\"description\":\"Name of the person\",\"type\":\"string\"}}}},\"type\":\"function\"}]}"
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": "Fri, 20 Feb 2026 00:01:06 GMT",
"Content-Type": "application/json",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"access-control-expose-headers": "X-Request-ID",
"openai-processing-ms": "463",
"openai-project": "proj_gt6TQZPRbZfoY2J9AQlEJMpd",
"openai-version": "2020-10-01",
"Server": "cloudflare",
"x-ratelimit-limit-requests": "10000",
"x-ratelimit-limit-tokens": "50000000",
"x-ratelimit-remaining-requests": "9999",
"x-ratelimit-remaining-tokens": "49999979",
"x-ratelimit-reset-requests": "6ms",
"x-ratelimit-reset-tokens": "0s",
"x-request-id": "req_1503996b1cea4bca91a0697db9eec68e",
"x-openai-proxy-wasm": "v0.1",
"cf-cache-status": "DYNAMIC",
"set-cookie": "__cf_bm=Y.uMUvKXcR9Yk6xXzcExCuLDDxpKWoS90CZWc5aj_78-1771545665.585499-1.0.1.1-qZlmanRqlTnlgnA_UKxWN6ccJeGJMZ5cU8hQn4XOsKn2_XJnm1IuHxGV8ejtnSlnbsmSfy6dmFNMOlDANMzF9kJG1U4ZD82BHh6ZqUZnE5Xgyn07s46Z66pomW1vQ4BI; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Fri, 20 Feb 2026 00:31:06 GMT",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
"X-Content-Type-Options": "nosniff",
"Content-Encoding": "gzip",
"CF-RAY": "9d09ba39ea9bdf09-SEA",
"alt-svc": "h3=\":443\"; ma=86400"
},
"body": "{\n \"id\": \"chatcmpl-DB8F79pRqLfT6pTKajxAu4MpCpMZe\",\n \"object\": \"chat.completion\",\n \"created\": 1771545665,\n \"model\": \"gpt-3.5-turbo-0125\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_NAE9VXAzyT6ftmPl4lmeSb4E\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"extract_student_info\",\n \"arguments\": \"{\\\"name\\\":\\\"Bob\\\",\\\"school\\\":\\\"Stanford University\\\",\\\"major\\\":\\\"computer science\\\"}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 89,\n \"completion_tokens\": 26,\n \"total_tokens\": 115,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n"
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"request": {
"method": "POST",
"url": "https://api.openai.com/v1/responses",
"headers": {
"User-Agent": "OpenAIClientImpl/Java unknown",
"X-Stainless-Arch": "arm64",
"X-Stainless-Lang": "java",
"X-Stainless-OS": "Linux",
"X-Stainless-OS-Version": "6.12.65-linuxkit",
"X-Stainless-Package-Version": "unknown",
"X-Stainless-Retry-Count": "0",
"X-Stainless-Runtime": "JRE",
"X-Stainless-Runtime-Version": "17.0.9",
"X-Stainless-Read-Timeout": "600",
"X-Stainless-Timeout": "600",
"Content-Type": "application/json",
"Content-Length": "151",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip"
},
"body": "{\"input\":\"Where is the nearest Dunkin' Donuts?\",\"instructions\":\"Talk with a Boston accent.\",\"max_output_tokens\":50,\"model\":\"gpt-4.1\",\"temperature\":0.1}"
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": "Fri, 20 Feb 2026 00:01:31 GMT",
"Content-Type": "application/json",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"Server": "cloudflare",
"openai-version": "2020-10-01",
"openai-project": "proj_gt6TQZPRbZfoY2J9AQlEJMpd",
"x-request-id": "req_796176c9da464aaf8c000e63907a2bf7",
"openai-processing-ms": "1286",
"cf-cache-status": "DYNAMIC",
"set-cookie": "__cf_bm=HilBezoeGvyXngzMc0Hg5DN6LG9wn_W3H8k.lG1Jz20-1771545689.5935988-1.0.1.1-bWm4zCWS6C.HmOejInX98jG7KXqlhLKGLxZlPVQtSvp_ZVUH8sbSxIOSCmYHzImhWSX55AD1yIc.F4swLEWMcUUtZPrBalOmf3KSpx75d.0DPU0BD_n4nstlZ1bNu0LX; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Fri, 20 Feb 2026 00:31:31 GMT",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
"X-Content-Type-Options": "nosniff",
"Content-Encoding": "gzip",
"CF-RAY": "9d09bacffb441760-SEA",
"alt-svc": "h3=\":443\"; ma=86400"
},
"body": "{\n \"id\": \"resp_081d29a052f49e9a016997a459f6fc819681f5286582acecea\",\n \"object\": \"response\",\n \"created_at\": 1771545690,\n \"status\": \"incomplete\",\n \"background\": false,\n \"billing\": {\n \"payer\": \"developer\"\n },\n \"completed_at\": null,\n \"error\": null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": {\n \"reason\": \"max_output_tokens\"\n },\n \"instructions\": \"Talk with a Boston accent.\",\n \"max_output_tokens\": 50,\n \"max_tool_calls\": null,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"output\": [\n {\n \"id\": \"msg_081d29a052f49e9a016997a45a44608196a2d157dfe2ab47ff\",\n \"type\": \"message\",\n \"status\": \"incomplete\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": [],\n \"text\": \"Ah, ya lookin\\u2019 for a Dunkies, huh? Classic! In Boston, ya can\\u2019t throw a rock without hittin\\u2019 a Dunkin\\u2019. There\\u2019s prob\\u2019ly one on the next block, right next to the T stop.\"\n }\n ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": false,\n \"temperature\": 0.1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 27,\n \"input_tokens_details\": {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 50,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 77\n },\n \"user\": null,\n \"metadata\": {}\n}"
}
}
9 changes: 8 additions & 1 deletion utils/_context/_scenarios/integration_frameworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, name: str, doc: str) -> None:
name,
doc=doc,
github_workflow="endtoend",
agent_image="ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.38.0",
agent_image="ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.42.0",
scenario_groups=(groups.integration_frameworks,),
)

Expand Down Expand Up @@ -159,3 +159,10 @@ def _set_dd_trace_integrations_enabled(self, library: str) -> None:
self.environment["DD_TRACE_DNS_ENABLED"] = "false"
self.environment["DD_TRACE_NET_ENABLED"] = "false"
self.environment["DD_TRACE_FETCH_ENABLED"] = "false"
elif library == "java":
# Disable Jetty/Javalin/servlet instrumentation to only see OpenAI spans
self.environment["DD_INTEGRATION_OKHTTP_ENABLED"] = "false"
self.environment["DD_INTEGRATION_JETTY_ENABLED"] = "false"
# Reduce telemetry intervals for faster metric reporting in tests
self.environment["DD_TELEMETRY_HEARTBEAT_INTERVAL"] = "1"
self.environment["DD_TELEMETRY_METRICS_INTERVAL"] = "1"
2 changes: 1 addition & 1 deletion utils/_context/_scenarios/parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, name: str, doc: str) -> None:
name,
doc=doc,
github_workflow="parametric",
agent_image="ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.39.0",
agent_image="ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.42.0",
)
self._parametric_tests_confs = ParametricScenario.PersistentParametricTestConf(self)

Expand Down
34 changes: 34 additions & 0 deletions utils/build/docker/java/openai-java.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM maven:3.9.14-eclipse-temurin-17 AS build

ARG FRAMEWORK_VERSION=latest
ENV FRAMEWORK_VERSION=${FRAMEWORK_VERSION}

WORKDIR /app

COPY utils/build/docker/java/openai_app /app

# Copy DD trace installation scripts and binaries
COPY utils/build/docker/java/install_ddtrace.sh binaries* /binaries/

RUN /binaries/install_ddtrace.sh

# Build the shadow (fat) JAR
RUN ["./gradlew", "shadowJar"]

FROM eclipse-temurin:17-jre

WORKDIR /app

COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION /binaries/SYSTEM_TESTS_LIBRARY_VERSION
COPY --from=build /app/build/libs/single-file-server-1.0.0-all.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar /app/dd-java-agent.jar
COPY --from=build /app/system_tests_library_version.sh /app/system_tests_library_version.sh

COPY utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh /app/system_tests_library_version.sh

ENV DD_TRACE_STARTUP_LOGS=true
ENV DD_ENV="test-env"
ENV DD_VERSION="1.0"

CMD ["/app/app.sh"]
2 changes: 2 additions & 0 deletions utils/build/docker/java/openai_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.gradle/
build/
44 changes: 44 additions & 0 deletions utils/build/docker/java/openai_app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

group = 'com.example'
version = '1.0.0'

sourceCompatibility = '17'
targetCompatibility = '17'

repositories {
mavenCentral()
}

dependencies {
implementation 'io.javalin:javalin:5.3.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
implementation 'org.json:json:20230227'
implementation 'org.slf4j:slf4j-simple:2.0.3'
def openaiVersion = System.getenv('FRAMEWORK_VERSION')
if (openaiVersion == null || openaiVersion.isEmpty() || openaiVersion == 'latest') {
openaiVersion = '+'
}
implementation "com.openai:openai-java:${openaiVersion}"
implementation 'com.anthropic:anthropic-java:2.4.0'

compileOnly files('/dd-tracer/dd-java-agent.jar')
}

application {
mainClass = 'SingleFileServer'
}

tasks.register('printOpenAIVersion') {
dependsOn configurations.runtimeClasspath
doLast {
def artifact = configurations.runtimeClasspath.resolvedConfiguration.resolvedArtifacts
.find { it.name == 'openai-java' }
println "openai-java resolved version: ${artifact?.moduleVersion?.id?.version}"
}
}
build.finalizedBy 'printOpenAIVersion'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading