Skip to content
Merged
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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ log4j2-slf4j = { group= "org.apache.logging.log4j", name="log4j-slf4j2-impl", ve
log4j2-core = { group= "org.apache.logging.log4j", name="log4j-core", version.ref="log4j2"}

# Instrumented libraries
openaiClient = "com.openai:openai-java:2.7.0"
openaiClient = "com.openai:openai-java:2.12.0"

[bundles]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static class AdviceClass {
public static OpenAIClient onExit(
@Advice.Return OpenAIClient result,
@Advice.FieldValue("clientOptions") ClientOptions.Builder clientOptions) {
return InstrumentedOpenAiClient.wrap(result).baseUrl(clientOptions.baseUrl()).build();
return InstrumentedOpenAiClient.wrap(result).baseUrl(clientOptions.build().baseUrl()).build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[for reviewer] this means the builder .build() method will be executed twice, but a quick look at the implementation indicates that there isn't any non-idempotent operation in it, which means it should be fine.

}
}
}
Loading