Skip to content

Commit c4bfa20

Browse files
committed
fix shadowing problem
1 parent 2da40a0 commit c4bfa20

File tree

1 file changed

+8
-7
lines changed
  • foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai

1 file changed

+8
-7
lines changed

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiTool.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ ChatCompletionTool createChatCompletionTool() {
8282
OpenAiUtils.getOpenAiObjectMapper()
8383
.convertValue(schema, new TypeReference<Map<String, Object>>() {});
8484

85-
final var function =
86-
new FunctionObject()
87-
.name(getName())
88-
.description(getDescription())
89-
.parameters(schemaMap)
90-
.strict(getStrict());
91-
return new ChatCompletionTool().type(FUNCTION).function(function);
85+
return new ChatCompletionTool()
86+
.type(FUNCTION)
87+
.function(
88+
new FunctionObject()
89+
.name(getName())
90+
.description(getDescription())
91+
.parameters(schemaMap)
92+
.strict(getStrict()));
9293
}
9394

9495
private static SchemaGenerator createSchemaGenerator() {

0 commit comments

Comments
 (0)